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.


API specification

Test the API on SwaggerHub


Base URL

https://api-prd.kpn.com/data/cws/fax


Conceptual model

Conceptual model


API workflow

Sequence diagram


Getting started

Make sure you've read Getting Started for more info on how to register your application and start trying out our APIs.

Authentication

The API follows the KPN Store API Authentication Standard to secure the API. It includes the use of OAuth 2.0 client_id and client_secret to receive an access token.

Go to the Authentication tab on top of this page to find out how to:

  • Authenticate to an API using cURL.
  • Authenticate to an API on Swaggerhub.
  • Import Open API Specifications (OAS), also called Swagger files into Postman.


How to...

Manage outgoing jobs

Request 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 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 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 specified job content page as 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 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 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 transmission status of 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 list of all messages (fax, SMS, etc.) of 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 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 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 content of 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 job for sending 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 job for sending 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 job for sending 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 incoming fax and 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 still pending for processing by consumer

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 incoming job as not processed to make it 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 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 update 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 fax number to which recipient can respond

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 custom fax number configured for 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 custom fax number that appears on coversheet to identify sender of 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 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 set of existing additional e-mails for authorized user

These are e-mails 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 additional e-mail address for validating SMTP senders

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

SwaggerHub:

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

Postman:

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

Remove specified additional e-mail address

SwaggerHub:

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

Postman:

  1. DELETE (RemoveAdditionalEmail).
  2. Supply e-mail 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 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 list of incoming fax numbers (DID) and 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 consumer to customize notifications according to preferred language

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 consumer may customize culture resources

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 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 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 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 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 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 configuration for 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 set of templates for customizing subject line of 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 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 templates used for customizing 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 consumer to adjust date and time according to 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 text with 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.


HTTP response headers

The following tables display the standard response headers that are returned with each API response:

Standard response field name Description
sunset This field will be populated with the deprecation details. By default the value is n/a.
api-version Indicates the API version you have used.
quota-interval Used to specify an integer (for example, 1, 2, 5, 60, and so on) that will be paired with the quota-time-unit you specify (minute, hour, day, week, or month) to determine a time period during which the quota use is calculated.
For example, an interval of 24 with a quota-time-unit of hour means that the quota will be calculated over the course of 24 hours.
quota-limit Number of API calls an user can make within a given time period.
If this limit is exceeded, the user will be throttled and API requests will fail.
quota-reset-UTC All quota times are set to the Coordinated Universal Time (UTC) time zone.
quota-time-unit Used to specify the unit of time applicable to the quota.
For example, an interval of 24 with a quota-time-unit of hour means that the quota will be calculated over the course of 24 hours.
quota-used Number of API calls made within the quota.
strict-transport-security The HTTP Strict-Transport-Security (HSTS) response header lets a web site tell browsers that it should only be accessed using HTTPS, instead of using HTTP. All present and future subdomains will be HTTPS for a maximum of 1 year and access is blocked to pages or sub domains that can only be served over HTTP including HSTS preload lists of web browsers.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload.
Access control field name Description
access-control-allow-credentials Tells browsers whether to expose the response to frontend JavaScript samp when the request's credentials mode (Request.credentials) is include.
When a request's credentials mode (Request.credentials) is include, browsers will only expose the response to frontend JavaScript samp if the Access-Control-Allow-Credentials value is true. Boolean.
access-control-allow-origin Indicates whether the response can be shared with requesting samp from the given origin.
access-control-allow-headers Used in response to a pre-flight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request.
access-control-max-age Indicates how long the results of a pre-flight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.
access-control-allow-methods Indicates which HTTP methods are allowed on a particular endpoint for cross-origin requests.
For example: GET, PUT, POST, DELETE.
content-length The Content-Length entity header indicates the size of the entity-body, in bytes, sent to the recipient.
content-type The Content-Type entity header the client what the content type of the returned content actually is.

Mopinion feedback