eComFax

Cloud Fax - eComFax

eComFax

Send and receive sensitive documents via secure fax

The simplest and most reliable fax solution

  • Communication
  • Security

API reference on SwaggerHub

Introduction

The Cloud Fax API allows operating a broad set of features for messaging services offered by eComFax:

  • Sending of faxes
  • Sending of SMS messages
  • Reception of incoming faxes
  • Consult the status of a sent job
  • Retrieve fax metadata
  • Recover a fax
  • Online display of a fax image
  • Thumbnail display of a fax image
  • Fax page rotation
  • Configuration of any user-related setting: language, timezone preference, subscriber info, dialing codes, fax printing, custody, notification texts, etc

Conceptual model

Conceptual model

API workflow

Sequence diagram

Getting started

Authentication

To authenticate you'll need to request an access token. Use your API Store app's credentials (Consumer Key and Consumer Secret) to make an authentication request. The authorization service returns a JSON message that contains the access_token field.

Use one of the following 3 options:

cURL

Execute below cURL command to receive an access token. Replace APP_CONSUMER_KEY and APP_CONSUMER_SECRET with your app's credentials.

curl -X POST \
 'https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials' \
 -H 'content-type: application/x-www-form-urlencoded' \
 -d 'client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET'

If you are using cURL for Windows, please use the command below instead.

curl -X POST "https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials" -H "content-type: application/x-www-form-urlencoded" -d "client_id=APP_CONSUMER_KEY&client_secret=APP_CONSUMER_SECRET"

The authentication service returns a JSON message that contains the access token field.

{
    "refresh_token_expires_in": "0",
    "api_product_list": "[xxxxxxx]",
    "api_product_list_json": [
        " xxxxxxx"
    ],
    "organization_name": "kpn",
    "developer_email": "demo123@kpn.com",
    "token_type": "Bearer",
    "issued_at": "1521039195424",
    "client_id": "APP_CONSUMER_KEY",
    "access_token": "haf2SDl07E9N7RluNQ4kJ1TkGgso",
    "application_name": "6e38edxxxxxxxxxxxxxxxx4065d79c",
    "scope": "",
    "expires_in": "3599",
    "refresh_count": "0",
    "status": "approved"
}

SwaggerHub

  1. Click on the Authorize button on the top right.
  2. In the form, fill in client_id and client_secret, using your app's credentials.
  3. Click Authorize.

Postman

When using Postman, you will have to import the Swagger file into a Postman collection as follows:

  1. Open the API reference on SwaggerHub.
  2. On the top right, click Export, click Download API and click 'YAML Unresolved'.
  3. In Postman from the menu click File and click Import... Choose the YAML file you downloaded in the previous step. A new collection will be added.
  4. Select Get Access Token from the collection.
  5. Make sure the right environment is selected, corresponding to the API.
  6. Edit the environment variables client_id and client_secret, using your app's credentials.
  7. Check the response code and message.
  8. Press the Send button to get an access token.

Note: Request variables are no longer linked to an environment, but to the collection.

How to...

Manage outgoing jobs

Request an acknowledgement receipt for PCIFax or SecureFax jobs

SwaggerHub:

  1. Request POST /ackreceipt.
  2. Supply payload with jobid,target,notifyTo,jobRemainder information.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (AckRequest).
  2. Supply payload with jobid, target,notifyTo, jobRemainder information.
  3. Click Send.
  4. Check the response code and message.

Get the specified job content

SwaggerHub:

  1. Request GET /document/{key}.
  2. Replace key with jobid in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (GetDocument).
  2. Supply jobid in path.
  3. Click Send.
  4. Check the response code and message.

Get the specified job content page

SwaggerHub:

  1. Request GET /documentpage/{key}.
  2. Replace key with jobid in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (GetDocumentPage).
  2. Supply jobid in path.
  3. Click Send.
  4. Check the response code and message.

Get the specified job content page as a thumbnail

SwaggerHub:

  1. Request GET /documentpreview/{key}.
  2. Replace key with jobid in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (GetDocumentPreview).
  2. Supply jobid in path.
  3. Click Send.
  4. Check the response code and message.

Retrieve data associated with an already processed job

SwaggerHub:

  1. Request GET /jobdetails.
  2. Supply jobid in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetJobDetails).
  2. Supply jobid in path.
  3. Click Send.
  4. Check the response code and message.

Retrieve history events associated with a job

SwaggerHub:

  1. Request GET /jobhistory.
  2. Supply jobid and pagecount in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetJobHistory).
  2. Supply jobid and pagecount in path.
  3. Click Send.
  4. Check the response code and message.

Retrieve the transmission status of an outgoing job

SwaggerHub:

  1. Request GET /jobstatus.
  2. Supply jobid in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetJobStatus).
  2. Supply jobid in path.
  3. Click Send.
  4. Check the response code and message.

Return the list of all messages (fax, SMS, etc.) belonging to the authorized user

SwaggerHub:

  1. Request GET /messages.
  2. Supply pagecount,page,orderby,startDate,endDate,query in query path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetAllMessages).
  2. Supply pagecount,page,orderby,startDate,endDate,query in query path.
  3. Click Send.
  4. Check the response code and message.

Return a specific message identified by ID

SwaggerHub:

  1. Request GET /messages/{id}.
  2. Supply id in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetJobStatus).
  2. Supply id in path.
  3. Click Send.
  4. Check the response code and message.

Return a specific message identified by ID

SwaggerHub:

  1. Request GET /messages.
  2. Supply id in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetMessage).
  2. Supply id in path.
  3. Click Send.
  4. Check the response code and message.

Delete the content of a specific message identified by ID

SwaggerHub:

  1. Request DELETE /messages.
  2. Supply id in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. DELETE (GetMessage).
  2. Supply id in path.
  3. Click Send.
  4. Check the response code and message.

Create a job for sending a new fax to one or more recipients

Documents are base64 encoded.

SwaggerHub:

  1. Request POST /sendfax. If you prefer to upload documents without encoding, send a form-data request to POST /sendfax/raw.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. POST (SendFax).If you prefer to upload documents without encoding, send a form-data request to POST (SendFax as Form-Data)
  2. Click Send.
  3. Check the response code and message.

Create a job for sending a new SMS to one or more recipients

SwaggerHub:

  1. Request POST /sendsms.
  2. Supply id in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (SendSms).
  2. Click Send. 3 Check the response code and message.

Create a job for sending a new SMS to one or more recipients

SwaggerHub:

  1. Request POST /sendsms.
  2. Supply id in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (SendSms).
  2. Click Send.
  3. Check the response code and message.

Manage incoming jobs

Retrieve an incoming fax along with associated metadata

SwaggerHub:

  1. Request GET /infax.
  2. Supply key in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetIncomingFax).
  2. Supply key in path.
  3. Click Send.
  4. Check the response code and message.

Set incoming faxes that are still pending to be processed by the consumer application

SwaggerHub:

  1. Request GET /injobs.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetIncomingJobs).
  2. Click Send.
  3. Check the response code and message.

Mark an incoming job as not processed so that it becomes available again for /injobs and /infax methods

This feature requires the Custody Service enabled for incoming faxes.

SwaggerHub:

  1. Request PATCH /resetincomingjob
  2. Supply key in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PATCH (MarkIncomingJobAsNew).
  2. Supply key in path.
  3. Click Send.
  4. Check the response code and message.

Manage settings

Return the international prefix, country code and interprovincial prefix

With this consumer application you can adapt national numbers to international format.

SwaggerHub:

  1. Request GET /callingcodes.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetCallingCodes).
  2. Click Send.
  3. Check the response code and message.

Set or updates the international, country code and interprovincial prefix

A consumer application can adapt national numbers to international format*

Not specified parameters will be set as null.

SwaggerHub:

  1. Request PUT /callingcodes
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (SetCallingCodes).
  2. Click Send.
  3. Check the response code and message.

Set a fax number where the recipient can respond back

Custom Fax Number refers to the information that is put on the conversheet to identify the sender of a fax.

SwaggerHub:

  1. Request GET /customfaxnumber.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetCustomFaxNumber).
  2. Click Send.
  3. Check the response code and message.

Set the custom fax number that appears on the coversheet to identify the sender of a fax

SwaggerHub:

  1. Request PUT /customfaxnumber.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. PUT (SetCustomFaxNumber).
  2. Click Send.
  3. Check the response code and message.

Remove custom fax number

SwaggerHub:

  1. Request DELETE /customfaxnumber.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. DELETE (RemoveCustomFaxNumber).
  2. Click Send.
  3. Check the response code and message.

Return the custom fax number configured for a particular DID (incoming fax)

Custom Fax Number refers to the information that is put on the conversheet to identify the sender of a fax. Typically it is set to a fax number where the recipient can respond back. Setting this information for DID is intended for mail-to-fax jobs.

If the sender's e-mail address matches the delivery e-mail address assigned to a particular DID (incoming fax number), then the customized information set with this method will be used as sender information. If there is no such configuration, then the DID number itself is used.

SwaggerHub:

  1. Request GET /customfaxnumber.
  2. Supply did in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetCustomFaxNumberById).
  2. Supply did in path.
  3. Click Send.
  4. Check the response code and message.

Set the custom fax number that appears on the coversheet to identify the sender of a fax

This setting is intended for mail-to-fax jobs. If the sender's e-mail address matches the delivery e-mail address assigned to a particular DID (incoming fax number), then the customized information set with this method will be used as sender information.

If there is no such configuration, then the DID number itself is used.

SwaggerHub:

  1. Request PUT /customfaxnumber.
  2. Supply did and customFaxNumber in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetCustomFaxNumberById).
  2. Supply did and customFaxNumber in path.
  3. Click Send.
  4. Check the response code and message.

Remove the specified custom fax number

SwaggerHub:

  1. Request DELETE /customfaxnumber.
  2. Supply did in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. DELETE (RemoveCustomFaxNumberById).
  2. Supply did in path.
  3. Click Send.
  4. Check the response code and message.

Return the set of existing additional emails for the authorized user

These are emails used for validating senders using mail-to-fax jobs.

SwaggerHub:

  1. Request GET /emails
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetAllAdditionalEmails).
  2. Click Send.
  3. Check the response code and message.

Add an additional email address for validating SMTP senders

There is a limit for the number of allowed additional emails. If this limit is exceeded a Forbidden status code is returned.

SwaggerHub:

  1. Request POST /emails.
  2. Supply email in payload.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (AddAdditionalEmail).
  2. Supply email in payload.
  3. Click Send.
  4. Check the response code and message.

Remove the specified additional email address

SwaggerHub:

  1. Request DELETE /emails.
  2. Supply email in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. DELETE (RemoveAdditionalEmail).
  2. Supply email in path.
  3. Click Send.
  4. Check the response code and message.

Return settings for inbound delivery

SwaggerHub:

  1. Request GET /inbounddelivery.
  2. Supply did in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetInboundDelivery).
  2. Supply did in path.
  3. Click Send.
  4. Check the response code and message.

Update the configuration information for inbound delivery

SwaggerHub:

  1. Request PUT /inbounddelivery.
  2. Supply did in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetInboundDelivery).
  2. Supply did in path.
  3. Click Send.
  4. Check the response code and message.

Return the list of incoming fax numbers (DID) along with inbound delivery settings

SwaggerHub:

  1. Request GET /inbounddelivery.
  2. Supply page,pagecount,startDate,endDate,orderby in query path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. GET (GetInboundDeliveryDid).
  2. Supply page,pagecount,startDate,endDate,orderby in query path.
  3. Click Send.
  4. Check the response code and message.

Allow a consumer application to customize notifications according to the language preferred by the user

SwaggerHub:

  1. Request GET /language.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetLanguage).
  2. Click Send.
  3. Check the response code and message.

Set language code so that a consumer application may customize culture resources accordingly

SwaggerHub:

  1. Request PUT /language.
  2. Supply language in query path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetLanguage).
  2. Supply language in query path.
  3. Click Send.
  4. Check the response code and message.

Return settings for delivery notifications to a printer

SwaggerHub:

  1. Request GET /printingconfig.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetPrintingConfig).
  2. Click Send.
  3. Check the response code and message.

Update the configuration information for automatically printing faxes

SwaggerHub:

  1. Request PUT /printingconfig.
  2. Supply address,history,faxType,notificationType in payload.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetLanguage).
  2. Supply address,history,faxType,notificationType in payload.
  3. Click Send.
  4. Check the response code and message.

Return all reports configured for the current user

SwaggerHub:

  1. Request GET /reportconfig.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetAllReportConfigs).
  2. Click Send.
  3. Check the response code and message.

Create a new report configuration

SwaggerHub:

  1. Request POST /reportconfig.
  2. Supply startDate, period, periodUnit, type, format, recipients, language in payload and reportId in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. POST (SetReportConfig).
  2. Supply startDate, period, periodUnit, type, format, recipients, language in payload and reportId in path.
  3. Click Send.
  4. Check the response code and message.

Update the specified report configuration

SwaggerHub:

  1. Request PUT /reportconfig.
  2. Supply reportId in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetReportConfig).
  2. Supply reportId in path.
  3. Click Send.
  4. Check the response code and message.

Remove the specified report configuration

SwaggerHub:

  1. Request DELETE /reportconfig.
  2. Supply reportId in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. DELETE (DeleteReportConfig).
  2. Supply reportId in path.
  3. Click Send.
  4. Check the response code and message.

Update partial report configuration using operations according to RFC6902

SwaggerHub:

  1. Request PATCH /reportconfig.
  2. Supply reportId in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PATCH (UpdateReportConfig).
  2. Supply reportId in path.
  3. Click Send.
  4. Check the response code and message.

Return settings for retention of job contents

SwaggerHub:

  1. Request GET /retentionconfig.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetRetentionConfig).
  2. Click Send.
  3. Check the response code and message.

Update the configuration for the retention or custody of job contents

SwaggerHub:

  1. Request PUT /retentionconfig.
  2. Supply lifetime,JobType,secureAccessDays in payload.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetRetentionConfig).
  2. Supply lifetime,JobType,secureAccessDays in payload.
  3. Click Send.
  4. Check the response code and message.

Return a set of templates for customizing the subject line of a job notification

SwaggerHub:

  1. Request GET /subjects.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetSubjects).
  2. Click Send.
  3. Check the response code and message.

Update the specified report configuration

SwaggerHub:

  1. Request PUT /reportconfig.
  2. Supply ackReceipt, incomingFax, outgoingFax, outgoingSms in payload.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetSubjects).
  2. Supply ackReceipt, incomingFax, outgoingFax, outgoingSms in payload.
  3. Click Send.
  4. Check the response code and message.

Update one or more templates used for customizing the subject line of job notifications

Update operations are according to RFC6902.

SwaggerHub:

  1. Request PATCH /subjects.
  2. Supply op, path, value in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PATCH (UpdateSubjects).
  2. Supply op, path, value in path.
  3. Click Send.
  4. Check the response code and message.

Return subscriber information

SwaggerHub:

  1. Request GET /subscriberinfo.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetSubscriberInfo).
  2. Click Send.
  3. Check the response code and message.

Update subscriber information

SwaggerHub:

  1. Request PUT /subscriberinfo.
  2. Supply name, contactEmail, contactPhoneNumber, postalAddress, city, zipCode, taxInfo in payload.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetSubjects).
  2. Supply name, contactEmail, contactPhoneNumber, postalAddress, city, zipCode, taxInfo in payload.
  3. Click Send.
  4. Check the response code and message.

Update partial subscriber information using operations according to RFC6902

SwaggerHub:

  1. Request PATCH /subscriberinfo.
  2. Supply op,path,value in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PATCH (UpdateSubscriberInfo).
  2. Supply op, path, value in path.
  3. Click Send.
  4. Check the response code and message.

Allows a consumer application to adjust date and time information according to the user's local time

SwaggerHub:

  1. Request GET /timezone.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetTimeZone).
  2. Click Send.
  3. Check the response code and message.

Update subscriber information

SwaggerHub:

  1. Request PUT /subscriberinfo.
  2. Supply timeZone in path.
  3. Click Execute.
  4. Check the response code and message.

Postman:

  1. PUT (SetTimeZone).
  2. Supply timeZone in path.
  3. Click Send.
  4. Check the response code and message.

Manage other operations

Return a text with a random usage tip

SwaggerHub:

  1. Request GET /tip.
  2. Click Execute.
  3. Check the response code and message.

Postman:

  1. GET (GetTip).
  2. Click Send.
  3. Check the response code and message.

Return codes

Code   Description
200   Success
201   Created
202   Accepted
302   Found. Link in location header
400   Bad request
401   Unauthorized
403   Forbidden
404   Not found
405   Method not allowed
412   Precondition failed
429   Too many requests
500   Internal server error
502   Bad gateway
503   Service unavailable