Skip to main content
GET
/
accounts
/
{user_id}
/
faxes
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 listFaxes() {
    const reqParams = {
        "userId": '13d8z73c',
        "category": 'inbox',
        "after": '2018-01-01 00:00:00',
        "before": '2020-01-01 00:00:00',
        "limit": '50'
    }
    const req = await FaxesApiFp(config).listFaxes(reqParams);
    const resp = await req(axios);
}

listFaxes()
{
  "data": {
    "records": [
      {
        "comment": "",
        "cost": 2,
        "cost_details": {
          "multiplier": 1,
          "notification_cost": 0
        },
        "description": "OK",
        "direction": "incoming",
        "duration": 0,
        "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
        "file_name": "fax-from-12076001783",
        "from_number": "+12076001783",
        "header": null,
        "id": "5e7de3ad54cfd54eb568cc76",
        "is_read": false,
        "is_spam": false,
        "last_update": "2020-03-27 11:29:49",
        "max_retry": null,
        "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
        "pages": 2,
        "retry_delay": null,
        "scheduled_time": null,
        "start_time": "2020-03-27 11:29:21",
        "status": "failed",
        "submit_time": null,
        "to": "+12076001783"
      }
    ]
  }
}
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 listFaxes() {
    const reqParams = {
        "userId": '13d8z73c',
        "category": 'inbox',
        "after": '2018-01-01 00:00:00',
        "before": '2020-01-01 00:00:00',
        "limit": '50'
    }
    const req = await FaxesApiFp(config).listFaxes(reqParams);
    const resp = await req(axios);
}

listFaxes()

Authorizations

Authorization
string
header
required

OAuth2 Authorization Grant

Path Parameters

user_id
string
default:self
required

User ID. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.

Query Parameters

category
enum<string>
default:inbox

Category parameter. Valid string values: inbox (received faxes), sent (outgoing faxes), or spam (spam faxes). Optional, defaults to 'inbox'.

Available options:
inbox,
sent,
spam
after
string

Start date to get records from that date. Format: YYYY-MM-DD HH:mm:ss (e.g., '2018-01-01 00:00:00'). Optional, if omitted returns all records from the beginning.

before
string

End date to get records before that date. Format: YYYY-MM-DD HH:mm:ss (e.g., '2020-01-01 00:00:00'). Optional, if omitted returns all records up to the current time.

limit
integer
default:50

Maximum number of fax records to return per request. Must be between 1 and 50. Optional, defaults to 50. Use with 'offset' for pagination.

Required range: 1 <= x <= 50
offset
integer
default:0

Offset for pagination. Specifies the number of records to skip before starting to return records. Optional, defaults to 0.

Required range: 0 <= x <= 2147483647
sort_by
enum<string>

Field to sort the results by. Valid values: date, from, to, comment, pages. Optional.

Available options:
date,
from,
to,
comment,
pages
order
enum<string>
default:asc

Order of the sorting. Valid values: asc for ascending, desc for descending. Optional, defaults to 'asc'.

Available options:
asc,
desc
in_progress
boolean
default:false

Return in-progress incoming faxes. Optional, defaults to false. This functionality can be enabled on request.

status
enum<string>[]

Filter by transmission status. Comma-separated list of valid fax statuses

Fax status. Some failure codes use failed_fs_* values which represent low-level fax transport issues (for example, fax protocol incompatibility, the remote endpoint stopping responding, or remote disconnections). In particular: failed_fs_8/failed_fs_9 indicate protocol incompatibility; failed_fs_31/failed_fs_32 indicate that the remote stopped responding; failed_fs_35/failed_fs_39 indicate that the remote disconnected.

Available options:
success,
partially_sent,
partially_received,
in_progress,
insufficient_credit,
failed,
failed_internal_process_error,
failed_user_busy,
failed_no_answer,
failed_unallocated_number,
failed_office_converter_issue,
failed_separate_file_pages_issue,
failed_render_header_issue,
failed_invalid_number_format,
failed_mimetype_not_supported,
failed_destination_not_supported,
failed_image_preparation,
failed_to_send,
failed_normal_temporary_failure,
failed_unknown_converter_issue,
failed_normal_clearing,
failed_convert_to_tiff_issue,
failed_fs_2,
failed_fs_3,
failed_fs_8,
failed_fs_9,
failed_fs_31,
failed_fs_32,
failed_fs_35,
failed_fs_39,
failed_fs_48,
failed_fs_49
from_number
string

Filter by source/from fax number in E.164 format

Required string length: 2 - 16
to_number
string

Filter by destination/to fax number in E.164 format

Required string length: 2 - 16
is_read
boolean

Filter by read status. true for read faxes, false for unread faxes

min_pages
integer

Filter faxes with at least this many pages

Required range: 0 <= x <= 9999
max_pages
integer

Filter faxes with at most this many pages

Required range: 0 <= x <= 9999

Response

Response containing a list of faxes

List of fax data

data
object