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));$accessToken = urlencode('<ACCESS TOKEN>');
$url = 'https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee';
$ch = curl_init($url);
curl_setopt(
$ch,
CURLOPT_HTTPHEADER,
array('Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer ' . $accessToken)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$json = json_decode($response);
if($json->success){
echo $json->data[0]->availability;
}
curl_close($ch);curl https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS TOKEN>"
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));
$accessToken = urlencode('<ACCESS TOKEN>');
$url = 'https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee';
$data = ['fee_min' => 1000, 'fee_max' => 3000];
$ch = curl_init($url);
curl_setopt(
$ch,
CURLOPT_HTTPHEADER,
array('Content-Type: application/x-www-form-urlencoded', 'Authorization: Bearer ' . $accessToken)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
$response = curl_exec($ch);
$json = json_decode($response);
if($json->success){
var_dump($json->data);
}
curl_close($ch);curl -X POST https://public-api.expertfile.com/v2/organization/:corporation/expert/:username/fee \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS TOKEN>" \
-d '{"fee_min": 1000, "fee_max": 3000}'Last updated
Was this helpful?