const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 getOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31'
}
const req = await OutboxApiFp(config).getOutboxFax(reqParams);
const resp = await req(axios);
}
getOutboxFax()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.get_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("outbox_fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
{
"comment": {
"tags": [],
"text": ""
},
"contact_name": "",
"designated_src": "",
"extra_info": {},
"file_changes": [],
"files": [
"/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
],
"id": "13a4afb0585345639733857e8f36df8d",
"initiated_from": {
"from_id": "",
"type": ""
},
"ip": "8.8.8.8",
"last_updated_status_time": "2017-09-24 06:43:04",
"options": {},
"page_count": 0,
"retry": {
"count": 0,
"delay": 0
},
"send_time": "2017-09-24 06:43:04 +0000",
"should_enhance": false,
"src": "+16699990000",
"status": "submitted",
"status_changes": [
{
"at": "2017-09-24 06:43:04",
"status": "submitted"
}
],
"submit_time": "2017-09-24 06:43:04 +0000",
"to": [
"+16699990000"
],
"uid": "53a1afb8585345a39033857e1f36bf8d"
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Get outgoing fax
Get specific details of a fax currently scheduled for sending. (Permitted scopes: fax:all:read, fax:fax:read)
const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 getOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31'
}
const req = await OutboxApiFp(config).getOutboxFax(reqParams);
const resp = await req(axios);
}
getOutboxFax()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.get_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("outbox_fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
{
"comment": {
"tags": [],
"text": ""
},
"contact_name": "",
"designated_src": "",
"extra_info": {},
"file_changes": [],
"files": [
"/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
],
"id": "13a4afb0585345639733857e8f36df8d",
"initiated_from": {
"from_id": "",
"type": ""
},
"ip": "8.8.8.8",
"last_updated_status_time": "2017-09-24 06:43:04",
"options": {},
"page_count": 0,
"retry": {
"count": 0,
"delay": 0
},
"send_time": "2017-09-24 06:43:04 +0000",
"should_enhance": false,
"src": "+16699990000",
"status": "submitted",
"status_changes": [
{
"at": "2017-09-24 06:43:04",
"status": "submitted"
}
],
"submit_time": "2017-09-24 06:43:04 +0000",
"to": [
"+16699990000"
],
"uid": "53a1afb8585345a39033857e1f36bf8d"
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}const axios = require('axios');
const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp;
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 getOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31'
}
const req = await OutboxApiFp(config).getOutboxFax(reqParams);
const resp = await req(axios);
}
getOutboxFax()
from faxplus import ApiClient, OutboxApi
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 = OutboxApi(api_client)
resp = api.get_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31')
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'13d8z73c'");
pathParams.put("outbox_fax_id", "'132esd4cs31'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}");
String result = Request
.Get(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
try {
$response = $client->request('GET','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
Authorizations
OAuth2 Authorization Grant
Path Parameters
User ID. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.
ID of the outgoing fax to get
Response
Response containing a single outbox object
Model for the outbound fax stored in the outbox
Fax ID
Outbound fax status
submitted, converting, scheduled_for_sending, sending User ID
Comment to set for the fax job
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Files to send
Show child attributes
Show child attributes
IP address from which the send request originated
Time and date when the send request status was last updated. Format: YYYY-MM-DD HH:mm:ss
^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}Additional configuration for sending a fax
Show child attributes
Show child attributes
Number of fax pages
x >= 0Fax retry settings
Show child attributes
Show child attributes
{ "retry": { "count": 2, "delay": 10 } }
Show child attributes
Show child attributes
Date and time when the fax was submitted for sending
Fax cover page
Show child attributes
Show child attributes