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
Base URL
https://api-prd.kpn.com/data/cws/fax
Conceptual model
API workflow
Getting started
Make sure you've read What's in it for you for more info on how to register and start testing 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:
- Request
POST /ackreceipt
. - Supply payload with jobid,target,notifyTo,jobRemainder information.
- Click Execute.
- Check the response code and message.
Postman:
POST (AckRequest)
.- Supply payload with jobid, target,notifyTo, jobRemainder information.
- Click Send.
- Check the response code and message.
Get specified job content
SwaggerHub:
- Request
GET /document/{key}
. - Replace key with jobid in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (GetDocument)
.- Supply jobid in path.
- Click Send.
- Check the response code and message.
Get specified job content page
SwaggerHub:
- Request
GET /documentpage/{key}
. - Replace key with jobid in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (GetDocumentPage)
.- Supply jobid in path.
- Click Send.
- Check the response code and message.
Get specified job content page as thumbnail
SwaggerHub:
- Request
GET /documentpreview/{key}
. - Replace key with jobid in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (GetDocumentPreview)
.- Supply jobid in path.
- Click Send.
- Check the response code and message.
Retrieve data associated with processed job
SwaggerHub:
- Request
GET /jobdetails
. - Supply jobid in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetJobDetails)
.- Supply jobid in path.
- Click Send.
- Check the response code and message.
Retrieve history events associated with job
SwaggerHub:
- Request
GET /jobhistory
. - Supply jobid and pagecount in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetJobHistory)
.- Supply jobid and pagecount in path.
- Click Send.
- Check the response code and message.
Retrieve transmission status of outgoing job
SwaggerHub:
- Request
GET /jobstatus
. - Supply jobid in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetJobStatus)
.- Supply jobid in path.
- Click Send.
- Check the response code and message.
Return list of all messages (fax, SMS, etc.) of authorized user
SwaggerHub:
- Request
GET /messages
. - Supply pagecount,page,orderby,startDate,endDate,query in query path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetAllMessages)
.- Supply pagecount,page,orderby,startDate,endDate,query in query path.
- Click Send.
- Check the response code and message.
Return specific message identified by ID
SwaggerHub:
- Request
GET /messages/{id}
. - Supply id in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetJobStatus)
.- Supply id in path.
- Click Send.
- Check the response code and message.
Return specific message identified by ID
SwaggerHub:
- Request
GET /messages
. - Supply id in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetMessage)
.- Supply id in path.
- Click Send.
- Check the response code and message.
Delete content of specific message identified by ID
SwaggerHub:
- Request
DELETE /messages
. - Supply id in path.
- Click Execute.
- Check the response code and message.
Postman:
DELETE (GetMessage)
.- Supply id in path.
- Click Send.
- Check the response code and message.
Create job for sending new fax to one or more recipients
Documents are base64 encoded.
SwaggerHub:
- Request
POST /sendfax
. If you prefer to upload documents without encoding, send a form-data request to POST /sendfax/raw. - Click Execute.
- Check the response code and message.
Postman:
POST (SendFax)
.If you prefer to upload documents without encoding, send a form-data request to POST (SendFax as Form-Data)- Click Send.
- Check the response code and message.
Create job for sending new SMS to one or more recipients
SwaggerHub:
- Request
POST /sendsms
. - Supply id in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (SendSms)
.- Click Send. 3 Check the response code and message.
Create job for sending new SMS to one or more recipients
SwaggerHub:
- Request
POST /sendsms
. - Supply id in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (SendSms)
.- Click Send.
- Check the response code and message.
Manage incoming jobs
Retrieve incoming fax and associated metadata
SwaggerHub:
- Request
GET /infax
. - Supply key in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetIncomingFax)
.- Supply key in path.
- Click Send.
- Check the response code and message.
Set incoming faxes still pending for processing by consumer
SwaggerHub:
- Request
GET /injobs
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetIncomingJobs)
.- Click Send.
- 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:
- Request
PATCH /resetincomingjob
- Supply key in path.
- Click Execute.
- Check the response code and message.
Postman:
PATCH (MarkIncomingJobAsNew)
.- Supply key in path.
- Click Send.
- 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:
- Request
GET /callingcodes
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetCallingCodes)
.- Click Send.
- 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:
- Request
PUT /callingcodes
- Click Execute.
- Check the response code and message.
Postman:
GET (SetCallingCodes)
.- Click Send.
- 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:
- Request
GET /customfaxnumber
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetCustomFaxNumber)
.- Click Send.
- Check the response code and message.
Set the custom fax number that appears on the coversheet to identify the sender of a fax
SwaggerHub:
- Request
PUT /customfaxnumber
. - Click Execute.
- Check the response code and message.
Postman:
PUT (SetCustomFaxNumber)
.- Click Send.
- Check the response code and message.
Remove custom fax number
SwaggerHub:
- Request
DELETE /customfaxnumber
. - Click Execute.
- Check the response code and message.
Postman:
DELETE (RemoveCustomFaxNumber)
.- Click Send.
- 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:
- Request
GET /customfaxnumber
. - Supply did in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetCustomFaxNumberById)
.- Supply did in path.
- Click Send.
- 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:
- Request
PUT /customfaxnumber
. - Supply did and customFaxNumber in path.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetCustomFaxNumberById)
.- Supply did and customFaxNumber in path.
- Click Send.
- Check the response code and message.
Remove specified custom fax number
SwaggerHub:
- Request
DELETE /customfaxnumber
. - Supply did in path.
- Click Execute.
- Check the response code and message.
Postman:
DELETE (RemoveCustomFaxNumberById)
.- Supply did in path.
- Click Send.
- 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:
- Request
GET /emails
- Click Execute.
- Check the response code and message.
Postman:
GET (GetAllAdditionalEmails)
.- Click Send.
- 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:
- Request
POST /emails
. - Supply e-mail in payload.
- Click Execute.
- Check the response code and message.
Postman:
POST (AddAdditionalEmail)
.- Supply e-mail in payload.
- Click Send.
- Check the response code and message.
Remove specified additional e-mail address
SwaggerHub:
- Request
DELETE /emails
. - Supply e-mail in path.
- Click Execute.
- Check the response code and message.
Postman:
DELETE (RemoveAdditionalEmail)
.- Supply e-mail in path.
- Click Send.
- Check the response code and message.
Return settings for inbound delivery
SwaggerHub:
- Request
GET /inbounddelivery
. - Supply did in path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetInboundDelivery)
.- Supply did in path.
- Click Send.
- Check the response code and message.
Update configuration information for inbound delivery
SwaggerHub:
- Request
PUT /inbounddelivery
. - Supply did in path.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetInboundDelivery)
.- Supply did in path.
- Click Send.
- Check the response code and message.
Return list of incoming fax numbers (DID) and inbound delivery settings
SwaggerHub:
- Request
GET /inbounddelivery
. - Supply page,pagecount,startDate,endDate,orderby in query path.
- Click Execute.
- Check the response code and message.
Postman:
GET (GetInboundDeliveryDid)
.- Supply page,pagecount,startDate,endDate,orderby in query path.
- Click Send.
- Check the response code and message.
Allow consumer to customize notifications according to preferred language
SwaggerHub:
- Request
GET /language
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetLanguage)
.- Click Send.
- Check the response code and message.
Set language code so that consumer may customize culture resources
SwaggerHub:
- Request
PUT /language
. - Supply language in query path.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetLanguage)
.- Supply language in query path.
- Click Send.
- Check the response code and message.
Return settings for delivery notifications to a printer
SwaggerHub:
- Request
GET /printingconfig
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetPrintingConfig)
.- Click Send.
- Check the response code and message.
Update configuration information for automatically printing faxes
SwaggerHub:
- Request
PUT /printingconfig
. - Supply address,history,faxType,notificationType in payload.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetLanguage)
.- Supply address,history,faxType,notificationType in payload.
- Click Send.
- Check the response code and message.
Return all reports configured for current user
SwaggerHub:
- Request
GET /reportconfig
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetAllReportConfigs)
.- Click Send.
- Check the response code and message.
Create new report configuration
SwaggerHub:
- Request
POST /reportconfig
. - Supply startDate, period, periodUnit, type, format, recipients, language in payload and reportId in path.
- Click Execute.
- Check the response code and message.
Postman:
POST (SetReportConfig)
.- Supply startDate, period, periodUnit, type, format, recipients, language in payload and reportId in path.
- Click Send.
- Check the response code and message.
Update specified report configuration
SwaggerHub:
- Request
PUT /reportconfig
. - Supply reportId in path.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetReportConfig)
.- Supply reportId in path.
- Click Send.
- Check the response code and message.
Remove specified report configuration
SwaggerHub:
- Request
DELETE /reportconfig
. - Supply reportId in path.
- Click Execute.
- Check the response code and message.
Postman:
DELETE (DeleteReportConfig)
.- Supply reportId in path.
- Click Send.
- Check the response code and message.
Update partial report configuration using operations according to RFC6902
SwaggerHub:
- Request
PATCH /reportconfig
. - Supply reportId in path.
- Click Execute.
- Check the response code and message.
Postman:
PATCH (UpdateReportConfig)
.- Supply reportId in path.
- Click Send.
- Check the response code and message.
Return settings for retention of job contents
SwaggerHub:
- Request
GET /retentionconfig
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetRetentionConfig)
.- Click Send.
- Check the response code and message.
Update configuration for retention or custody of job contents
SwaggerHub:
- Request
PUT /retentionconfig
. - Supply lifetime,JobType,secureAccessDays in payload.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetRetentionConfig)
.- Supply lifetime,JobType,secureAccessDays in payload.
- Click Send.
- Check the response code and message.
Return set of templates for customizing subject line of job notification
SwaggerHub:
- Request
GET /subjects
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetSubjects)
.- Click Send.
- Check the response code and message.
Update specified report configuration
SwaggerHub:
- Request
PUT /reportconfig
. - Supply ackReceipt, incomingFax, outgoingFax, outgoingSms in payload.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetSubjects)
.- Supply ackReceipt, incomingFax, outgoingFax, outgoingSms in payload.
- Click Send.
- Check the response code and message.
Update templates used for customizing subject line of job notifications
Update operations are according to RFC6902.
SwaggerHub:
- Request
PATCH /subjects
. - Supply op, path, value in path.
- Click Execute.
- Check the response code and message.
Postman:
PATCH (UpdateSubjects)
.- Supply op, path, value in path.
- Click Send.
- Check the response code and message.
Return subscriber information
SwaggerHub:
- Request
GET /subscriberinfo
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetSubscriberInfo)
.- Click Send.
- Check the response code and message.
Update subscriber information
SwaggerHub:
- Request
PUT /subscriberinfo
. - Supply name, contactEmail, contactPhoneNumber, postalAddress, city, zipCode, taxInfo in payload.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetSubjects)
.- Supply name, contactEmail, contactPhoneNumber, postalAddress, city, zipCode, taxInfo in payload.
- Click Send.
- Check the response code and message.
Update partial subscriber information using operations according to RFC6902
SwaggerHub:
- Request
PATCH /subscriberinfo
. - Supply op,path,value in path.
- Click Execute.
- Check the response code and message.
Postman:
PATCH (UpdateSubscriberInfo)
.- Supply op, path, value in path.
- Click Send.
- Check the response code and message.
Allows consumer to adjust date and time according to local time
SwaggerHub:
- Request
GET /timezone
. - Click Execute.
- Check the response code and message.
Postman:
- GET
(GetTimeZone)
. - Click Send.
- Check the response code and message.
Update subscriber information
SwaggerHub:
- Request
PUT /subscriberinfo
. - Supply timeZone in path.
- Click Execute.
- Check the response code and message.
Postman:
PUT (SetTimeZone)
.- Supply timeZone in path.
- Click Send.
- Check the response code and message.
Manage other operations
Return text with random usage tip
SwaggerHub:
- Request
GET /tip
. - Click Execute.
- Check the response code and message.
Postman:
GET (GetTip)
.- Click Send.
- 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 website 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 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 if the Access-Control-Allow-Credentials value is true. Boolean. |
access-control-allow-origin | Indicates whether the response can be shared with requesting code 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. |