const axios = require('axios');
const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function bulkUpdateFaxes() {
const reqParams = {
"userId": "self",
"bulkFaxUpdateRequest": {
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}
};
const req = await FaxesApiFp(config).bulkUpdateFaxes(reqParams);
const resp = await req(axios);
}
bulkUpdateFaxes();
from faxplus import ApiClient, FaxesApi, BulkFaxUpdateRequest
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FaxesApi(api_client)
payload = BulkFaxUpdateRequest(
ids=[
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc",
],
is_read=True,
comment="updated via bulk",
)
resp = api.bulk_update_faxes(user_id="self", body=payload)
# You can also use wget
curl -X PUT "https://restapi.fax.plus/v3/accounts/self/faxes" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: YOUR_CLIENT_ID' \
-d '{
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}'
{
"results": [
{
"id": "<string>",
"code": 204
}
]
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "unauthorized",
"description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Bulk update fax records
Bulk update multiple fax records (mark as read/unread and/or update comment). Maximum 100 fax IDs per request. Duplicate IDs are automatically ignored. (Permitted scopes: fax:all:edit, fax:fax:edit)
const axios = require('axios');
const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function bulkUpdateFaxes() {
const reqParams = {
"userId": "self",
"bulkFaxUpdateRequest": {
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}
};
const req = await FaxesApiFp(config).bulkUpdateFaxes(reqParams);
const resp = await req(axios);
}
bulkUpdateFaxes();
from faxplus import ApiClient, FaxesApi, BulkFaxUpdateRequest
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FaxesApi(api_client)
payload = BulkFaxUpdateRequest(
ids=[
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc",
],
is_read=True,
comment="updated via bulk",
)
resp = api.bulk_update_faxes(user_id="self", body=payload)
# You can also use wget
curl -X PUT "https://restapi.fax.plus/v3/accounts/self/faxes" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: YOUR_CLIENT_ID' \
-d '{
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}'
{
"results": [
{
"id": "<string>",
"code": 204
}
]
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "unauthorized",
"description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}const axios = require('axios');
const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function bulkUpdateFaxes() {
const reqParams = {
"userId": "self",
"bulkFaxUpdateRequest": {
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}
};
const req = await FaxesApiFp(config).bulkUpdateFaxes(reqParams);
const resp = await req(axios);
}
bulkUpdateFaxes();
from faxplus import ApiClient, FaxesApi, BulkFaxUpdateRequest
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = FaxesApi(api_client)
payload = BulkFaxUpdateRequest(
ids=[
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc",
],
is_read=True,
comment="updated via bulk",
)
resp = api.bulk_update_faxes(user_id="self", body=payload)
# You can also use wget
curl -X PUT "https://restapi.fax.plus/v3/accounts/self/faxes" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: YOUR_CLIENT_ID' \
-d '{
"ids": [
"a1b2c3d4e5f6789012345678901234ab",
"b2c3d4e5f6789012345678901234abc"
],
"is_read": true,
"comment": "updated via bulk"
}'
Authorizations
OAuth2 Authorization Grant
Path Parameters
User ID. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.
Body
Request to bulk update multiple fax records
Request to bulk update multiple fax records
List of fax IDs to update (1-100 unique IDs, each ID is max 32 characters). Duplicates are automatically ignored.
1 - 100 elementsMark faxes as read (true) or unread (false). Optional, but at least one of is_read or comment must be provided.
Comment text to set for all faxes. Send empty string to remove comment. Optional, but at least one of is_read or comment must be provided.
100Response
Response containing bulk operation results for faxes
Bulk operation result for faxes
Per-item results for each fax ID
Show child attributes
Show child attributes