UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 136 kB
{"openapi":"3.0.3","servers":[{"description":"Production server","url":"https://unify.apideck.com"}],"info":{"contact":{"email":"hello@apideck.com","url":"https://developers.apideck.com"},"description":"Welcome to the Vault API 👋\n\nWhen you're looking to connect to an API, the first step is authentication.\n\nVault helps you handle OAuth flows, store API keys, and refresh access tokens from users (called consumers in Apideck).\n\n## Base URL\n\nThe base URL for all API requests is `https://unify.apideck.com`\n\n## Get Started\n\nTo use the Apideck APIs, you need to sign up for free at [https://app.apideck.com/signup](). Follow the steps below to get started.\n\n- [Create a free account.](https://app.apideck.com/signup)\n- Go to the [Dashboard](https://app.apideck.com/unify/unified-apis/dashboard).\n- Get your API key and the application ID.\n- Select and configure the integrations you want to make available to your users. Through the Unify dashboard, you can configure which connectors you want to support as integrations.\n- Retrieve the client_id and client_secret for the integration you want to activate (Only needed for OAuth integrations).\n- Soon, you can skip the previous step and use the Apideck sandbox credentials to get you started instead (upcoming)\n- Register the redirect URI for the example app (https://unify.apideck.com/vault/callback) in the list of redirect URIs under your app's settings\n- Use the [publishing guides](/app-listing-requirements) to get your integration listed across app marketplaces.\n\n### Hosted Vault\n\nHosted Vault (vault.apideck.com) is a no-code solution, so you don't need to build your own UI to handle the integration settings and authentication.\n\n![Hosted Vault - Integrations portal](https://github.com/apideck-samples/integration-settings/raw/master/public/img/vault.png)\n\nBehind the scenes, Hosted Vault implements the Vault API endpoints and handles the following features for your customers:\n\n- Add a connection\n- Handle the OAuth flow\n- Configure connection settings per integration\n- Manage connections\n- Discover and propose integration options\n- Search for integrations (upcoming)\n- Give integration suggestions based on provided metadata (email or website) when creating the session (upcoming)\n\nTo use Hosted Vault, you will need to first [**create a session**](https://developers.apideck.com/apis/vault/reference#operation/sessionsCreate). This can be achieved by making a POST request to the Vault API to create a valid session for a user, hereafter referred to as the consumer ID.\n\nExample using curl:\n\n```\ncurl -X POST https://unify.apideck.com/vault/sessions\n -H \"Content-Type: application/json\"\n -H \"Authorization: Bearer <your-api-key>\"\n -H \"X-APIDECK-CONSUMER-ID: <consumer-id>\"\n -H \"X-APIDECK-APP-ID: <application-id>\"\n -d '{\"consumer_metadata\": { \"account_name\" : \"Sample\", \"user_name\": \"Sand Box\", \"email\": \"sand@box.com\", \"image\": \"https://unavatar.now.sh/jake\" }, \"theme\": { \"vault_name\": \"Intercom\", \"primary_color\": \"#286efa\", \"sidepanel_background_color\": \"#286efa\",\"sidepanel_text_color\": \"#FFFFFF\", \"favicon\": \"https://res.cloudinary.com/apideck/icons/intercom\" }}'\n```\n\n### Vault API\n\n_Beware, this is strategy takes more time to implement in comparison to Hosted Vault._\n\nIf you are building your integration settings UI manually, you can call the Vault API directly.\n\nThe Vault API is for those who want to completely white label the in-app integrations overview and authentication experience. All the available endpoints are listed below.\n\nThrough the API, your customers authenticate directly in your app, where Vault will still take care of redirecting to the auth provider and back to your app.\n\nIf you're already storing access tokens, we will help you migrate through our Vault Migration API (upcoming).\n\n## Domain model\n\nAt its core, a domain model creates a web of interconnected entities.\n\nOur domain model contains five main entity types: Consumer (user, account, team, machine), Application, Connector, Integration, and Connection.\n\n## Connection state\n\nThe connection state is computed based on the connection flow below.\n\n![](https://developers.apideck.com/api-references/vault/connection-flow.png)\n\nMore information about the connection state can be found in the [Connection state](https://developers.apideck.com/guides/connection-states) guide.\n\n## Unify and Proxy integration\n\nThe only thing you need to use the Unify APIs and Proxy is the consumer id; thereafter, Vault will do the look-up in the background to handle the token injection before performing the API call(s).\n\n## Headers\n\nCustom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230) states header names are case insensitive.\n\n| Name | Type | Required | Description |\n| --------------------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| x-apideck-app-id | String | Yes | The id of your Unify application. Available at https://app.apideck.com/api-keys. |\n| x-apideck-consumer-id | String | Yes | The id of the customer stored inside Apideck Vault. This can be a user id, account id, device id or whatever entity that can have integration within your app. |\n| x-apideck-raw | Boolean | No | Include raw response. Mostly used for debugging purposes. |\n\n## Guides\n\n- [Get started with Apideck](https://developers.apideck.com/getting-started)\n- [Get started with Vault](https://developers.apideck.com/guides/vault)\n- [Authorize connection via Vault](https://developers.apideck.com/guides/authorize-connections)\n- [Vault connection status](https://developers.apideck.com/guides/connection-states)\n- [How to build an integrations UI with Vault](https://github.com/apideck-samples/integration-settings)\n\n\n## FAQ\n\n**What purpose does Vault serve? Can I just handle the authentication and access token myself?**\nYou can store everything yourself, but that defeats the purpose of using Apideck Unify. Handling tokens for multiple providers can quickly become very complex.\n\n### Is my data secure?\n\nVault employs data minimization, therefore only requesting the minimum amount of scopes needed to perform an API request.\n\n### How do I migrate existing data?\n\nUsing our migration API, you can migrate the access tokens and accounts to Apideck Vault.\n\n### Can I use Vault in combination with existing integrations?\n\nYes, you can. The flexibility of Unify allows you to quickly the use cases you need while keeping a gradual migration path based on your timeline and requirements.\n\n### How does Vault work for Apideck Ecosystem customers?\n\nOnce logged in, pick your ecosystem; on the left-hand side of the screen, you'll have the option to create an application underneath the Unify section.\n\n### How to integrate Apideck Vault\n\nThis section covers everything you need to know to authenticate your customers through Vault.\nVault provides **three auth strategies** to use API tokens from your customers:\n\n- Vault API\n- Hosted Vault\n- Vault Widget (JS, React, Vue)\n\nYou can also opt to bypass Vault and still take care of authentication flows yourself. Make sure to put the right safeguards in place to protect your customers' tokens and other sensitive data.\n\n### What auth types does Vault support?\n\nWe support all the common authentication types, including: API keys, OAuth, Basic auth, and more.\n\n#### API keys\n\nFor Services supporting the API key strategy, you can use Hosted Vault will need to provide an in-app form where users can configure their API keys provided by the integration service.\n\n#### OAuth 2.0\n\n##### Authorization Code Grant Type Flow\n\nVault handles the complete Authorization Code Grant Type Flow for you. This flow only supports browser-based (passive) authentication because most identity providers don't allow entering a username and password to be entered into applications that they don't own.\n\nCertain connectors require an OAuth redirect authentication flow, where the end-user is redirected to the provider's website or mobile app to authenticate.\n\nThis is being handled by the `/authorize` endpoint.\n\n#### Basic auth\n\nBasic authentication is a simple authentication scheme built into the HTTP protocol. The required fields to complete basic auth are handled by Hosted Vault or by updating the connection through the Vault API below.\n\n","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"title":"Vault API","version":"10.0.0","x-apideck-api":"vault","x-apideck-sdk-support":true,"x-apisguru-categories":["developer_tools"],"x-logo":{"url":"https://developers.apideck.com/icon.png"},"x-origin":[{"format":"openapi","url":"https://raw.githubusercontent.com/apideck-libraries/openapi-specs/master/vault.yml","version":"3.0"}],"x-providerName":"apideck.com","x-serviceName":"vault","x-tags":["partner"]},"externalDocs":{"description":"Apideck Developer Docs","url":"https://developers.apideck.com"},"security":[{"apiKey":[],"applicationId":[]}],"tags":[{"description":"A session represents an authorized session for a consumer. A session is a JWT token that is valid for a short time (1h by default). Use this session token to open Hosted Vault or Vault JS for a consumer.","name":"Sessions","x-apideck-model":{"$ref":"#/components/schemas/Session"}},{"description":"A connection represents an account of a consumer for a connector. For example a consumer with ID \"test-consumer\" has a Salesforce connection for the CRM API. Connections securely save credentials and settings for a connector.","name":"Connections","x-apideck-model":{"$ref":"#/components/schemas/Connection"}},{"description":"A consumer represents an account or user in your system. All connections to connectors are scoped to a consumer.","name":"Consumers","x-apideck-model":{"$ref":"#/components/schemas/Consumer"}},{"description":"A log represents a request made for a given consumer. Logs include requests made to unified APIs, connectors and the Vault API.","name":"Logs","x-apideck-model":{"$ref":"#/components/schemas/Log"}},{"description":"A custom mapping represents a mapping between a connector and a Unified API. Custom mappings allow you to map downstream properties to the Unified API response.","name":"Custom Mappings","x-apideck-model":{"$ref":"#/components/schemas/CustomMapping"}}],"paths":{"/vault/authorize/{service_id}/{application_id}":{"get":{"description":"__In most cases the authorize link is provided in the ``/connections`` endpoint. Normally you don't need to manually generate these links.__\n\nUse this endpoint to authenticate a user with a connector. It will return a 301 redirect to the downstream connector endpoints.\n\nAuth links will have a state parameter included to verify the validity of the request. This is the url your users will use to activate OAuth supported integration providers.\n\nVault handles the complete Authorization Code Grant Type Flow for you and will redirect you to the dynamic redirect uri you have appended to the url in case this is missing the default redirect uri you have configured for your Unify application.\n","operationId":"connectionsAuthorize","parameters":[{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/application_id"},{"$ref":"#/components/parameters/state"},{"$ref":"#/components/parameters/redirect_uri"},{"$ref":"#/components/parameters/scope"}],"responses":{"301":{"description":"redirect"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[],"summary":"Authorize","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n applicationId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX',\n state:\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk',\n redirectUri: 'http://example.com/integrations'\n}\n\ntry {\n const { data } = await apideck.vault.connectionsAuthorize(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-sdk-exclude":true}},"/vault/callback":{"get":{"description":"This endpoint gets called after the triggering the authorize flow.\n\nCallback links need a state and code parameter to verify the validity of the request.\n","operationId":"connectionsCallback","parameters":[{"$ref":"#/components/parameters/state"},{"$ref":"#/components/parameters/code"}],"responses":{"301":{"description":"callback"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[],"summary":"Callback","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY'\n})\n\nconst params = {\n state:\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsInVuaWZpZWRfYXBpIjoiZGVmYXVsdCIsInNlcnZpY2VfaWQiOiJ0ZWFtbGVhZGVyIiwiYXBwbGljYXRpb25faWQiOiIxMTExIiwiaWF0IjoxNjIyMTI2Nzg3fQ.97_pn1UAXc7mctXBdr15czUNO1jjdQ9sJUOIE_Myzbk',\n code: 'g0ZGZmNjVmOWI'\n}\n\ntry {\n const { data } = await apideck.vault.connectionsCallback(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-sdk-exclude":true}},"/vault/connections":{"get":{"description":"This endpoint includes all the configured integrations and contains the required assets\nto build an integrations page where your users can install integrations.\nOAuth2 supported integrations will contain authorize and revoke links to handle the authentication flows.\n","operationId":"connectionsAll","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/api"},{"$ref":"#/components/parameters/configured"}],"responses":{"200":{"$ref":"#/components/responses/GetConnectionsResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get all connections","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\ntry {\n const { data } = await apideck.vault.connectionsAll({})\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/connections/{unified_api}/{service_id}":{"delete":{"description":"Deletes a connection","operationId":"connectionsDelete","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"responses":{"204":{"description":"Resource deleted"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Deletes a connection","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\ntry {\n const { data } = await apideck.vault.connectionsDelete({\n serviceId: 'pipedrive',\n unifiedApi: 'crm'\n })\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"get":{"description":"Get a connection","operationId":"connectionsOne","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"responses":{"200":{"$ref":"#/components/responses/GetConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get connection","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\ntry {\n const { data } = await apideck.vault.connectionsOne({\n serviceId: 'pipedrive',\n unifiedApi: 'crm'\n })\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"patch":{"description":"Update a connection","operationId":"connectionsUpdate","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"Fields that need to be updated on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/UpdateConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Update connection","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n unifiedApi: 'crm',\n connection: {\n enabled: true,\n settings: {\n instance_url: 'https://eu28.salesforce.com',\n api_key: '12345xxxxxx'\n },\n metadata: {\n account: {\n name: 'My Company',\n id: 'c01458a5-7276-41ce-bc19-639906b0450a'\n },\n plan: 'enterprise'\n },\n configuration: [\n {\n resource: 'leads',\n defaults: [\n {\n id: 'ProductInterest',\n options: [Array],\n value: 'GC5000 series'\n }\n ]\n }\n ],\n custom_mappings: [\n {\n value: '$.root.training.first_aid'\n }\n ]\n }\n}\n\ntry {\n const { data } = await apideck.vault.connectionsUpdate(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"post":{"description":"Create an authorized connection\n","operationId":"connectionsAdd","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"Fields that need to be persisted on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/CreateConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Create connection","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n unifiedApi: 'crm',\n connection: {\n enabled: true,\n settings: {\n instance_url: 'https://eu28.salesforce.com',\n api_key: '12345xxxxxx'\n },\n metadata: {\n account: {\n name: 'My Company',\n id: 'c01458a5-7276-41ce-bc19-639906b0450a'\n },\n plan: 'enterprise'\n },\n configuration: [\n {\n resource: 'leads',\n defaults: [\n {\n id: 'ProductInterest',\n options: [Array],\n value: 'GC5000 series'\n }\n ]\n }\n ],\n custom_mappings: [\n {\n value: '$.root.training.first_aid'\n }\n ]\n }\n}\n\ntry {\n const { data } = await apideck.vault.connectionsAdd(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-sdk-exclude":true}},"/vault/connections/{unified_api}/{service_id}/import":{"post":{"description":"Import an authorized connection.\n","operationId":"connectionsImport","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionImportData"}}},"description":"Fields that need to be persisted on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/CreateConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Import connection","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n unifiedApi: 'crm',\n connection: {\n credentials: {\n access_token:\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c',\n refresh_token:\n 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.cThIIoDvwdueQB468K5xDc5633seEFoqwxjF_xSJyQQ'\n },\n settings: {\n instance_url: 'https://eu28.salesforce.com'\n },\n metadata: {\n account: {\n name: 'My Company',\n id: 'c01458a5-7276-41ce-bc19-639906b0450a'\n },\n plan: 'enterprise'\n }\n }\n}\n\ntry {\n const { data } = await apideck.vault.connectionsImport(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/connections/{unified_api}/{service_id}/token":{"post":{"description":"Get an access token for a connection and store it in Vault. Currently only supported for connections with the client_credentials OAuth grant type.\n\nNote that the access token will not be returned in the response. A 200 response code indicates a valid access token was stored on the connection.\n","operationId":"connectionsToken","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}}},"responses":{"200":{"$ref":"#/components/responses/GetConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get Access Token","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n unifiedApi: 'crm',\n connectionsToken: {}\n}\n\ntry {\n const { data } = await apideck.vault.connectionsToken(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-sdk-exclude":true}},"/vault/connections/{unified_api}/{service_id}/{resource}/config":{"get":{"description":"This endpoint returns custom settings and their defaults required by connection for a given resource.\n","operationId":"connectionSettingsAll","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/resource"}],"responses":{"200":{"$ref":"#/components/responses/GetConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get resource settings","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n resource: 'leads'\n}\n\ntry {\n const { data } = await apideck.vault.connectionSettingsAll(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"patch":{"description":"Update default values for a connection's resource settings","operationId":"connectionSettingsUpdate","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/resource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}},"description":"Fields that need to be updated on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/UpdateConnectionResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Update settings","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n serviceId: 'pipedrive',\n unifiedApi: 'crm',\n resource: 'leads',\n connection: {\n enabled: true,\n settings: {\n instance_url: 'https://eu28.salesforce.com',\n api_key: '12345xxxxxx'\n },\n metadata: {\n account: {\n name: 'My Company',\n id: 'c01458a5-7276-41ce-bc19-639906b0450a'\n },\n plan: 'enterprise'\n },\n configuration: [\n {\n resource: 'leads',\n defaults: [\n {\n id: 'ProductInterest',\n options: [Array],\n value: 'GC5000 series'\n }\n ]\n }\n ],\n custom_mappings: [\n {\n value: '$.root.training.first_aid'\n }\n ]\n }\n}\n\ntry {\n const { data } = await apideck.vault.connectionSettingsUpdate(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/connections/{unified_api}/{service_id}/{resource}/custom-fields":{"get":{"description":"This endpoint returns an custom fields on a connection resource.\n","operationId":"customFieldsAll","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/resource"}],"responses":{"200":{"$ref":"#/components/responses/GetCustomFieldsResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get resource custom fields","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n resource: 'leads'\n}\n\ntry {\n const { data } = await apideck.vault.customFieldsAll(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/connections/{unified_api}/{service_id}/{resource}/example":{"get":{"description":"This endpoint returns a downstream example of a given resource.\n","operationId":"connectionsExample","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/resource"}],"responses":{"200":{"$ref":"#/components/responses/GetResourceExampleResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get resource example","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n resource: 'leads'\n}\n\ntry {\n const { data } = await apideck.vault.connectionsExample(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-internal":true,"x-sdk-exclude":true}},"/vault/connections/{unified_api}/{service_id}/{resource}/schema":{"get":{"description":"This endpoint returns an approximate JSONSchema of a given resource.\n","operationId":"connectionsSchema","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/resource"}],"responses":{"200":{"$ref":"#/components/responses/GetResourceSchemaResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get resource schema","tags":["Connections"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n resource: 'leads'\n}\n\ntry {\n const { data } = await apideck.vault.connectionsSchema(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-internal":true,"x-sdk-exclude":true}},"/vault/consumers":{"get":{"description":"This endpoint includes all application consumers, along with an aggregated count of requests made.\n","operationId":"consumersAll","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"$ref":"#/components/responses/GetConsumersResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get all consumers","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\ntry {\n const { data } = await apideck.vault.consumersAll({})\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"post":{"description":"Create a consumer","operationId":"consumersAdd","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Consumer"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/CreateConsumerResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Create consumer","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\nconst params = {\n consumer: {\n consumer_id: 'test_consumer_id',\n metadata: {\n account_name: 'SpaceX',\n user_name: 'Elon Musk',\n email: 'elon@musk.com',\n image: 'https://www.spacex.com/static/images/share.jpg'\n }\n }\n}\n\ntry {\n const { data } = await apideck.vault.consumersAdd(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/consumers/{consumer_id}":{"delete":{"description":"Delete consumer and all their connections, including credentials.","operationId":"consumersDelete","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/consumer_id"}],"responses":{"200":{"$ref":"#/components/responses/DeleteConsumerResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Delete consumer","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\ntry {\n const { data } = await apideck.vault.consumersDelete({\n consumerId: 'test_user_id'\n })\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"get":{"description":"Consumer detail including their aggregated counts with the connections they have authorized.\n","operationId":"consumersOne","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/consumer_id"}],"responses":{"200":{"$ref":"#/components/responses/GetConsumerResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get consumer","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\ntry {\n const { data } = await apideck.vault.consumersOne({\n consumerId: 'test_user_id'\n })\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]},"patch":{"description":"Update consumer metadata such as name and email.","operationId":"consumersUpdate","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/consumer_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConsumerRequest"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/UpdateConsumerResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Update consumer","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\nconst params = {\n consumerId: 'test_user_id',\n consumer: {\n metadata: {\n account_name: 'SpaceX',\n user_name: 'Elon Musk',\n email: 'elon@musk.com',\n image: 'https://www.spacex.com/static/images/share.jpg'\n }\n }\n}\n\ntry {\n const { data } = await apideck.vault.consumersUpdate(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/consumers/{consumer_id}/stats":{"get":{"description":"Get consumer request counts within a given datetime range.\n","operationId":"consumerRequestCountsAll","parameters":[{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/consumer_id"},{"$ref":"#/components/parameters/start_datetime"},{"$ref":"#/components/parameters/end_datetime"}],"responses":{"200":{"$ref":"#/components/responses/ConsumerRequestCountsInDateRangeResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Consumer request counts","tags":["Consumers"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID'\n})\n\nconst params = {\n consumerId: 'test_user_id',\n startDatetime: '2021-05-01T12:00:00.000Z',\n endDatetime: '2021-05-30T12:00:00.000Z'\n}\n\ntry {\n const { data } = await apideck.vault.consumerRequestCountsAll(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}]}},"/vault/custom-mappings/{unified_api}/{service_id}/{target_field_id}":{"delete":{"description":"Deletes a custom mapping","operationId":"customMappingsDelete","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/target_field_id"}],"responses":{"204":{"description":"Resource deleted"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Deletes a custom mapping","tags":["Custom Mappings"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n targetFieldId: 'hris+employees+first_aid_training'\n}\n\ntry {\n const { data } = await apideck.vault.customMappingsDelete(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-internal":true,"x-sdk-exclude":true},"get":{"description":"Get a custom mapping","operationId":"customMappingsOne","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/target_field_id"}],"responses":{"200":{"$ref":"#/components/responses/GetCustomMappingResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Get custom mapping","tags":["Custom Mappings"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n targetFieldId: 'hris+employees+first_aid_training'\n}\n\ntry {\n const { data } = await apideck.vault.customMappingsOne(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-internal":true,"x-sdk-exclude":true},"patch":{"description":"Update a custom mapping","operationId":"customMappingsUpdate","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/target_field_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomMappingRequest"}}},"description":"Fields that need to be updated on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/UpdateCustomMappingResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Update custom mapping","tags":["Custom Mappings"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID',\n consumerId: 'REPLACE_WITH_CONSUMER_ID'\n})\n\nconst params = {\n unifiedApi: 'crm',\n serviceId: 'pipedrive',\n targetFieldId: 'hris+employees+first_aid_training',\n customMapping: {\n value: '$.root.training.first_aid'\n }\n}\n\ntry {\n const { data } = await apideck.vault.customMappingsUpdate(params)\n console.log('API called successfully', data)\n} catch (error) {\n console.error(error)\n}\n"}],"x-internal":true,"x-sdk-exclude":true},"post":{"description":"Create a custom mapping","operationId":"customMappingsAdd","parameters":[{"$ref":"#/components/parameters/x-apideck-consumer-id"},{"$ref":"#/components/parameters/x-apideck-app-id"},{"$ref":"#/components/parameters/unified_api"},{"$ref":"#/components/parameters/service_id"},{"$ref":"#/components/parameters/target_field_id"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomMappingRequest"}}},"description":"Fields that need to be updated on the resource","required":true},"responses":{"200":{"$ref":"#/components/responses/CreateCustomMappingResponse"},"400":{"$ref":"#/components/responses/BadRequestResponse"},"401":{"$ref":"#/components/responses/UnauthorizedResponse"},"402":{"$ref":"#/components/responses/PaymentRequiredResponse"},"404":{"$ref":"#/components/responses/NotFoundResponse"},"422":{"$ref":"#/components/responses/UnprocessableResponse"},"default":{"$ref":"#/components/responses/UnexpectedErrorResponse"}},"security":[{"apiKey":[]}],"summary":"Create custom mapping","tags":["Custom Mappings"],"x-apideck-api":"vault","x-codeSamples":[{"label":"Node","lang":"TypeScript","source":"import { Apideck } from '@apideck/node'\n\nconst apideck = new Apideck({\n apiKey: 'REPLACE_WITH_API_KEY',\n appId: 'REPLACE_WITH_APP_ID