API Docs

Overview

Note: This documentatios is unfinished.

This is a simple API that returnes standardized telephone numbers for Sweden and Finland.


This API expects two parameters as inputs: country code and the and telephone numbers. Telephone numbers need to be a string where the numbers are divided with a comma sign. All fields are required. This API returns three parameters: response message, country code and fixed telephone numbers.

Inputs

This API has 2 required input values.

Input: country_code
Description: Country code
Valid range: SE or FI
Type: String
Required: Yes


Input: telephone_numbers
Description: Telepone numbers divided by a comma
Valid range: Telephone numbers
Type: String
Required: Yes

Example of succesfull API calls

Example of a FI call

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/?country_code=FI&telephone_numbers="+58731264413,0058731212345,+358 7 3123-4412,+5873123-4412,005873 123-3332,076 111 12 34,75 113 1244,08 444 555,085556666,08-123-1234,08555-6666"

Response:
{"status":"SUCCESS","country_code":"FI","telephone_numbers":"0731264413,0731212345,0731234412,0731234412,0731233332,0761111234,0751131244,08444555,085556666,081231234,085556666"}

Example of a SE call

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/?country_code=SE&telephone_numbers="+46731264413,0046731212345,+4673123-4412,004673 123-3332,076 111 12 34,75 113 1244,08 444 555,085556666,08-123-1234,08555-6666"

Response:
{"status":"SUCCESS","country_code":"SE","telephone_numbers":"0731264413,0731212345,0731234412,0731233332,0761111234,0751131244,08444555,085556666,081231234,085556666"}

Example of failed API calls

Output JSON without sending the inputs

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/

Response:
{"status":"FAILED ","message":"No country code and no telephone numbers"}

Output JSON without sending the telephone_numbers input

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/?country_code=SE

Response:
{"status":"FAILED ","message":"No telephone numbers"}

Output JSON without sending the country_code input

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/?telephone_numbers="+46731264413,0046731212345,+4673123-4412,004673 123-3332,076 111 12 34,75 113 1244,08 444 555,085556666,08-123-1234,08555-6666"

Response:
{"status":"FAILED ","message":"No country code"}

Output JSON without sending the proper country_code input

GET Request:
https://tools.incodaq.com/api/v1/formattelnumbers/?country_code=ST&telephone_numbers="+46731264413,0046731212345,+4673123-4412,004673 123-3332,076 111 12 34,75 113 1244,08 444 555,085556666,08-123-1234,08555-6666"

Response:
{"status":"FAILED","message":"Unknown country code"}