Fees
Get or create/update the a user's fees
Get Fees
GET
/v2/organization/:corporation/expert/:username/fee
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Url
Name
Type
Description
corporation
number
Corporation ID
username
string
Unique username
Response
{
data: [
{
fee_min: 1000,
fee_max: 8000
}
],
success: true
}
Code
const accessToken = `<ACCESS TOKEN>`
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee', {
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 fee = data[0]
console.log('fee', fee)
}
})
.catch(error => console.error(error));
Update Fees
POST
/v2/organization/:corporation/expert/:username/fee
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Url
Name
Type
Description
corporation
number
Corporation ID
username
string
Unique username
Body
Name
Type
Description
fee_min*
number
Min. fee
fee_max*
number
Max. fee
Response
{
data: {
id: null
},
success: true
}
Code
const data = new URLSearchParams();
const accessToken = `<ACCESS TOKEN>`
data.append('fee_min', 1000)
data.append('fee_max', 3000)
fetch('https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': `Bearer ${accessToken}`
},
body: data
})
.then(response => response.json())
.then(json => {
const { success, data } = json
})
.catch(error => console.error(error));
Last updated
Was this helpful?