The fax notify intake endpoint accepts documents from fax systems that are capable of delivering to a REST API endpoint.
The endpoint accepts a series of named metadata values follows by a single file containing the incoming document.
Request Details
To submit a document to the platform via the fax notify endpoint, construct an HTTP POST request with the multipart form data content type, and the content sections described below:
Name | Location | Sample Value & Description |
|---|---|---|
faxMessageId | Content Section | bbe58db7-b3f3-461a-9c47-5b803586cc53 A source message identifier that is generated by the originating system. The Source message identifier will be created if one is not passed in. (Optional) |
messageType | Content Section | Inbound Indicates the type of fax document being submitted. Must be one of: Inbound or Outbound |
attachmentName | Content Section | bbe58db7-b3f3-461a-9c47-5b803586cc53.tif Logical file name for the document being submitted. (Optional) |
faxSenderCSID | Content Section | Test User (123-555-1212) Fax CSID value for the sender (Optional) |
callerNumber | Content Section | 1-123-555-1212 The fax number for the sender |
calledNumber | Content Section | 1-123-555-6789 The fax number for the recipient |
faxReceivedDateTime | Content Section | 10/07/2018 10:45:21 AM or 2018-10-07T10:45:21-06:00 The date/time when the fax was received by the source fax system |
faxRecipientTimeZone | Content Section | (GMT-06:00) Central Time (US & Canada) The timezone corresponding to the fax received date/time value, in Windows format (Optional, when fax date/time is in ISO8601 format) |
faxPages | Content Section | 1 The number of pages contained in the fax file |
faxResolution | Content Section | 1 A number indicating the resolution of the fax file (Optional, source system specific) |
attachmentCount | Content Section | 1 The number of attachment files processed by the fax system (Optional, source system specific) |
faxSpeed | Content Section | 9600 A number indicating the transmission speed of the fax (Optional, source system specific) |
account | Content Section | 12345 The NEXTSTEP user account number used for authentication This will be provided by Concord Customer Success team |
authUser | Content Section | 12345-6789-1212-12345-0001 The API key for the provided NEXTSTEP user account This will be provided by Concord Customer Success team |
file | Content Section | <binary file data> The bytes representing the raw file content for the fax file |
Example
An example HTTP POST request for the intake API (in raw text format) is provided below:
| Example | |
|---|---|
POST /api/intake/fax-notify HTTP/1.1 Host: https://nsapi.concord.net Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="FaxMessageId" bbe58db7-b3f3-461a-9c47-5b803586cc53 Content-Disposition: form-data; name="MessageType" Inbound Content-Disposition: form-data; name="AttachmentName" bbe58db7-b3f3-461a-9c47-5b803586cc53.tif Content-Disposition: form-data; name="FaxSenderCSID" Test User (123-555-1212) Content-Disposition: form-data; name="CallerNumber" 1-123-555-1212 Content-Disposition: form-data; name="CalledNumber" 1-123-555-6789 Content-Disposition: form-data; name="FaxReceivedDateTime" 10/07/2018 10:45:21 AM Content-Disposition: form-data; name="FaxRecipientTimeZone" (GMT-06:00) Central Time (US & Canada) Content-Disposition: form-data; name="FaxPages" 1 Content-Disposition: form-data; name="FaxResolution" 1 Content-Disposition: form-data; name="FaxSpeed" 2 Content-Disposition: form-data; name="AttachmentCount" 1 Content-Disposition: form-data; name="Account" 12345 Content-Disposition: form-data; name="AuthUser" 12345-6789-1212-12345-0001 Content-Disposition: form-data; name="File"; filename="bbe58db7-b3f3-461a-9c47-5b803586cc53.tif" Content-Type: file <binary file data> ------WebKitFormBoundary7MA4YWxkTrZu0gW-- | |
Postman
A Postman sample script is provided below:
| Postman sample | |
|---|---|
{
"info": {
"_postman_id": "b86d8ef9-2a8e-4b43-a8bd-7c9f2272c56f",
"name": "NEXTSTEP API Samples",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Document Delivery - Fax Notify",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "FaxMessageId",
"value": "bbe58db7-b3f3-461a-9c47-5b803586cc53",
"type": "default"
},
{
"key": "MessageType",
"value": "Inbound",
"type": "default"
},
{
"key": "AttachmentName",
"value": "Test Fax.pdf",
"type": "default"
},
{
"key": "FaxSenderCSID",
"value": "Test User (123-555-1212)",
"type": "default"
},
{
"key": "CallerNumber",
"value": "1-123-555-1212",
"type": "default"
},
{
"key": "CalledNumber",
"value": "1-123-555-6789",
"type": "default"
},
{
"key": "FaxReceivedDateTime",
"value": "10/07/2018 10:45:21 AM",
"type": "default"
},
{
"key": "FaxRecipientTimeZone",
"value": "(GMT-06:00) Central Time (US & Canada)",
"type": "default"
},
{
"key": "FaxPages",
"value": "1",
"type": "default"
},
{
"key": "FaxResolution",
"value": "1",
"type": "default"
},
{
"key": "FaxSpeed",
"value": "9600",
"type": "default"
},
{
"key": "AttachmentCount",
"value": "1",
"type": "default"
},
{
"key": "Account",
"value": "12345",
"type": "default"
},
{
"key": "AuthUser",
"value": "12345-6789-1212-12345-0001",
"type": "default"
},
{
"key": "File",
"type": "file",
"src": "/C:/Sample Documents/Test Fax.pdf"
}
]
},
"url": {
"raw": "https://nsapi.concord.net/api/intake/fax-notify",
"protocol": "https",
"host": [
"nsapi",
"concord",
"net"
],
"path": [
"api",
"intake",
"fax-notify"
]
}
},
"response": []
}
]
} | |
.NET/C# Sample
A .NET/C# sample is provided below:
| C# sample | |
|---|---|
private static void DocumentIntakeFaxNotify()
{
// The URL to the NEXTSTEP API
const string NextstepApiEndpoint = @"https://nsapi.concord.net/";
// The NEXTSTEP API User/Key values. You may need to contact Concord support to have them generate these for you.
const string NextstepApiUser = @"12345";
const string NextstepApiKey = @"12345-6789-1212-12345-0001";
// Trim any trailing slash from the NEXTSTEP API endpoint
string faxNotifyUrl = NextstepApiEndpoint.TrimEnd("/".ToCharArray());
// Add the fax notify path to the NEXTSTEP API URL
faxNotifyUrl = $"{faxNotifyUrl}/api/intake/fax-notify";
// Create our multi-part form data object
MultipartFormDataContent content = new MultipartFormDataContent();
// Specify the properties we'll use for this request
content.Add(new StringContent(@"bbe58db7-b3f3-461a-9c47-5b803586cc53"), @"FaxMessageId");
content.Add(new StringContent(@"Inbound"), @"MessageType");
content.Add(new StringContent(@"Test Fax.pdf"), @"AttachmentName");
content.Add(new StringContent(@"Test User (123-555-1212)"), @"FaxSenderCSID");
content.Add(new StringContent(@"1-123-555-1212"), @"CallerNumber");
content.Add(new StringContent(@"1-123-555-6789"), @"CalledNumber");
content.Add(new StringContent(@"10/07/2018 10:45:21 AM"), @"FaxReceivedDateTime");
content.Add(new StringContent(@"(GMT-06:00) Central Time (US & Canada)"), @"FaxRecipientTimeZone");
content.Add(new StringContent(@"1"), @"FaxPages");
content.Add(new StringContent(@"1"), @"FaxResolution");
content.Add(new StringContent(@"9600"), @"FaxSpeed");
content.Add(new StringContent(@"2"), @"AttachmentCount");
content.Add(new StringContent(NextstepApiUser), @"Account");
content.Add(new StringContent(NextstepApiKey), @"AuthUser");
// Add a PDF file to the request
byte[] fileBytes = File.ReadAllBytes(@".\Test Fax.pdf");
ByteArrayContent fileByteArray = new ByteArrayContent(fileBytes);
fileByteArray.Headers.ContentType = MediaTypeHeaderValue.Parse(@"application/pdf");
content.Add(fileByteArray, "\"file\"", $"\"Test Fax.pdf\"");
try
{
using (HttpClient client = new HttpClient())
{
client.BaseAddress = new Uri(faxNotifyUrl);
HttpResponseMessage response = client.PostAsync(faxNotifyUrl, content).Result;
string result = response.Content.ReadAsStringAsync().Result;
}
}
catch (Exception ex)
{
// Just outputting the exception details, this exception would normally be handled differently
Console.WriteLine($"EXCEPTION: {ex.Message}");
}
} | |