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 updateOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31',
"payloadOutboxModification": undefined
}
const req = await OutboxApiFp(config).updateOutboxFax(reqParams);
const resp = await req(axios);
}
updateOutboxFax()
from faxplus import ApiClient, OutboxApi, PayloadOutboxModification
from faxplus.configuration import Configuration
payload_outbox_modification = PayloadOutboxModification()
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)
api.update_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31',
body=payload_outbox_modification
)
/**
* 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 jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.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
"Content-Type": []string{"application/json"},
"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("PUT", "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();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Outbox
Modify an outgoing fax
Modify an outgoing fax that is being scheduled for sending. (Permitted scopes: fax:all:edit, fax:fax:edit)
PUT
/
accounts
/
{user_id}
/
outbox
/
{outbox_fax_id}
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 updateOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31',
"payloadOutboxModification": undefined
}
const req = await OutboxApiFp(config).updateOutboxFax(reqParams);
const resp = await req(axios);
}
updateOutboxFax()
from faxplus import ApiClient, OutboxApi, PayloadOutboxModification
from faxplus.configuration import Configuration
payload_outbox_modification = PayloadOutboxModification()
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)
api.update_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31',
body=payload_outbox_modification
)
/**
* 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 jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.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
"Content-Type": []string{"application/json"},
"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("PUT", "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();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
{
"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 updateOutboxFax() {
const reqParams = {
"userId": '13d8z73c',
"outboxFaxId": '132esd4cs31',
"payloadOutboxModification": undefined
}
const req = await OutboxApiFp(config).updateOutboxFax(reqParams);
const resp = await req(axios);
}
updateOutboxFax()
from faxplus import ApiClient, OutboxApi, PayloadOutboxModification
from faxplus.configuration import Configuration
payload_outbox_modification = PayloadOutboxModification()
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)
api.update_outbox_fax(
user_id='13d8z73c',
outbox_fax_id='132esd4cs31',
body=payload_outbox_modification
)
/**
* 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 jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.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
"Content-Type": []string{"application/json"},
"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("PUT", "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();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \
-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"'
Authorizations
oauth2personal_access_token
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 update
Body
application/json
Request object for making changes in an outbox object
Model for updating the outgoing fax
New comment text
Response
204 will be returned on successful fax modification in outbox
⌘I