Expert Profile

CRUD endpoints for a user's full profile. This is the endpoint used to create the full profile for a expert as it includes all data fields.

Please note that in all urls & code samples you'll need to replace:username and :corporation with appropriate values

Get Individual Expert

GET /v2/organization/:corporation/expert/:username

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Url

NameTypeDescription

corporation

number

Corporation ID

username

string

Unique username

Response

 {
  data: {
    accomplishment: [], 
    account: [],
    affiliation: [],
    assessment: [],   
    article: [],
    audio: [],
    audios_all: [],
    availability: [],
    avatar: { s: {}, m: {}, o: {}, l: {} },
    biography: [],
    book: [],
    category: [],
    corporationprofile: [],
    corporationsocial: [],
    course: [],
    cv: [],
    document: [],
    documents_all: [],
    education: [],
    eventappearance: [],
    fee: [],
    industry: [],
    language: [],
    link: [],
    mediaappearance: [],
    patent: [],
    partnership: [],
    photo: [],
    podchaser: [],
    profiletype: [],
    qanda: [],
    researchfocus: [],
    researchgrant: [],
    sampletalk: [],
    seo: []
    social: [],
    slideshare: [],
    spotlight: [],
    tag: [],
    tagline: [],
    testimonial: [],
    topic: [],
    video: [],
    videos_all: [],
    vimeo: [],
    youtube: [],    
  },
  success: true
}

Code

const accessToken = `<ACCESS TOKEN>`

fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Authorization': `Bearer ${accessToken}`
    }
})
.then(response => response.json())
.then(json => {
    const { success, data } = json

    if (success) {
        const profile = data;
        console.log('profile', profile)
    }

})
.catch(error => console.error(error));

Create Expert

POST /v2/organization/:corporation/expert

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Url

NameTypeDescription

corporation

number

Corporation ID

username

string

Unique username

Body

NameTypeDescription

firstname*

string

First Name

lastname*

string

Last Name

job_title*

string

Job

email*

string

Email

company*

string

Company

department

string

Department

phone_number

string

Phone #

phone_number_extension

string

Phone extension

location_city

string

City

location_state

string

State/Province See full list here

location_country

string

Country See full list here

location_postal

string

ZIP/Postal Code

location_address

string

Address

location_building

string

Building

location_room

string

Room #

Response

 {
  data: {
    username: '<USERNAME>', 
    inserted: true
  },
  success: true
}

Code

const data = new URLSearchParams();
const accessToken = `<ACCESS TOKEN>`

data.append('firstname', 'Testfirstname');
data.append('lastname', 'Testlastname');
data.append('job_title', 'Job title');
data.append('email', 'testfromapi@testing.com');
data.append('company', 'Testcompany');
data.append('department', 'Testdepartment');
data.append('phone_number', 'Testphone');
data.append('phone_number_extension', 'Testext');
data.append('location_city', 'Testcity');
data.append('location_state', 'ON');
data.append('location_country', 'CA');
data.append('location_postal', 'Testpostal');
data.append('location_address', 'Testaddress');
data.append('location_building', 'Testbuilding');
data.append('location_room', 'Testroom');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Authorization': `Bearer ${accessToken}`
    },
    body: data
})
.then(response => response.json())
.then(json => {
    const { success, data, error } = json

    if (success) {
        const { username } = data
        console.log('New username', username)
    }

})
.catch(error => console.error(error));

Update Expert

PUT /v2/organization/:corporation/expert/:username

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Url

NameTypeDescription

corporation

number

Corporation ID

username

string

Unique username

Body

NameTypeDescription

firstname

string

First Name

lastname

string

Last Name

job_title

string

Job

email

string

Email

company

string

Company

department

string

Department

phone_number

string

Phone #

phone_number_extension

string

Phone extension

location_city

string

City

location_state

string

State/Province See full list here

location_country

string

Country See full list here

location_postal

string

ZIP/Postal Code

location_address

string

Address

location_building

string

Building

location_room

string

Room #

is_published

number

Published(1 or 0)

is_private

number

Private(1 or 0)

Response

 {
  data: {
    username: '<USERNAME>', 
    updated: true
  },
  success: true
}

Code

const data = new URLSearchParams();
const accessToken = `<ACCESS TOKEN>`

data.append('firstname', 'Testfirstname');
data.append('lastname', 'Testlastname');
data.append('job_title', 'Job title');
data.append('email', 'testfromapi@testing.com');
data.append('company', 'Testcompany');
data.append('department', 'Testdepartment');
data.append('phone_number', 'Testphone');
data.append('phone_number_extension', 'Testext');
data.append('location_city', 'Testcity');
data.append('location_state', 'ON');
data.append('location_country', 'CA');
data.append('location_postal', 'Testpostal');
data.append('location_address', 'Testaddress');
data.append('location_building', 'Testbuilding');
data.append('location_room', 'Testroom');
data.append('is_published', '1');
data.append('is_private', '0');

fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username', {
    method: 'PUT',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Authorization': `Bearer ${accessToken}`
    },
    body: data
})
.then(response => response.json())
.then(json => {
    const { success, data, error } = json

    if (success) {
        const { username } = data
        console.log('Updated username', username)
    }

})
.catch(error => console.error(error));

Delete Expert

DELETE /v2/organization/:corporation/expert/:username

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Url

NameTypeDescription

corporation

number

Corporation ID

username

string

Unique username

Response

{ 
    data: { 
        deleted: true, 
        username: '<USERNAME>', 
    }, 
    success: true 
}

Code

const accessToken = `<ACCESS TOKEN>`

fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username', {
    method: 'DELETE',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
        'Authorization': `Bearer ${accessToken}`
    }
})
.then(response => response.json())
.then(json => {
    const { success, data, error } = json

    if (success) {
        const { username } = data
        console.log('Deleted username', username)
    }

})
.catch(error => console.error(error));

Last updated