Skip to content

Latest commit

 

History

History
249 lines (163 loc) · 8.76 KB

File metadata and controls

249 lines (163 loc) · 8.76 KB

.MembersApi

All URIs are relative to https://api.pandadoc.com

Method HTTP request Description
createMemberToken POST /public/v1/members/{member_id}/token Create Member Token
detailsCurrentMember GET /public/v1/members/current Current Member Details
detailsMember GET /public/v1/members/{id} Member Details
listMembers GET /public/v1/members List Members

createMemberToken

CreateMemberTokenResponse createMemberToken()

🚧 > > This endpoint is only exposed upon request. Please reach out to your Account Manager to get access. > 📘 > > Make sure you're using Public API keys generated by Org Admin, otherwise you'll receive a 403 response.

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.MembersApi(configuration);

const body:pd_api.MembersApiCreateMemberTokenRequest = {
  // string | Member id.
  memberId: "radQBiBkU7MBk59NSgaGf5",
  // CreateMemberTokenRequest (optional)
  createMemberTokenRequest: {
    lifetime: 3600,
  },
};

apiInstance.createMemberToken(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

Name Type Description Notes
createMemberTokenRequest CreateMemberTokenRequest
memberId [string] Member id. defaults to undefined

Return type

CreateMemberTokenResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Authentication error -
403 Permission error -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to README]

detailsCurrentMember

MemberDetailsResponse detailsCurrentMember()

Returns the member details of the current user (the owner of the API key). User - is an account with a license in the Organization. Member - is a User with a predefined Role in the Workspace. | Parameter | Description | |---|---| | user_id | A unique identifier of the user in the organization | | membership_id | A unique identifier of the user in the workspace | | email | A user email address | | first_name | A user's first name | | last_name | A user's last name | | is_active | A boolean value that identifies if a member is active and not blocked | | workspace | A unique identifier of the user's current active workspace | | workspace_name | A name of the user's current active workspace | | email_verified | A boolean value that identifies if the email is verified | | role | A member's role in the workspace | | user_license | A user license in the organization: 
Full (Standard)
Read-only
eSignature
Guest
Creator | | date_created | A date when a member was added to the workspace | | date_modified | Last modified date of a member |

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.MembersApi(configuration);

let body:any = {};

apiInstance.detailsCurrentMember(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

MemberDetailsResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Bad Request -
403 Authentication error -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to README]

detailsMember

MemberDetailsResponse detailsMember()

A method to retrieve a member's details by ID. User - is an account with a license in the Organization. Member - is a User with a predefined Role in the Workspace. | Parameter | Description | |---|---| | user_id | A unique identifier of the user in the organization | | membership_id | A unique identifier of the user in the workspace | | email | A user email address | | first_name | A user's first name | | last_name | A user's last name | | is_active | A boolean value that identifies if a member is active and not blocked | | workspace | A unique identifier of the user's current active workspace | | workspace_name | A name of the user's current active workspace | | email_verified | A boolean value that identifies if the email is verified | | role | A member's role in the workspace | | user_license | A user license in the organization: 
Full (Standard)
Read-only
eSignature
Guest
Creator | | date_created | A date when a member was added to the workspace | | date_modified | Last modified date of a member |

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.MembersApi(configuration);

const body:pd_api.MembersApiDetailsMemberRequest = {
  // string | Membership id.
  id: "radQBiBkU7MBk59NSgaGf5",
};

apiInstance.detailsMember(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

Name Type Description Notes
id [string] Membership id. defaults to undefined

Return type

MemberDetailsResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Authentication error -
403 Permission error -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to README]

listMembers

MemberListResponse listMembers()

Retrieve all members details of the workspace implied by the OAuth token or API key.\ For each member, the workspace parameter shows their active workspace, that is the workspace they are currently working in.\ This means the workspace value can differ from the workspace implied by your API key.

Example

import * as pd_api from 'pandadoc-node-client';

// replace it with your API key
const API_KEY = "YOUR_API_KEY";
const configuration = pd_api.createConfiguration(
    { authMethods: {apiKey: `API-Key ${API_KEY}`} }
);
const apiInstance = new pd_api.MembersApi(configuration);

let body:any = {};

apiInstance.listMembers(body).then((data) => {
  console.log('API called successfully. Returned data: %o', data);
}).catch((error) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

MemberListResponse

Authorization

apiKey, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Bad Request -
403 Authentication error -
429 Too Many Requests -

[Back to top] [Back to API list] [Back to README]