0% found this document useful (0 votes)
113 views39 pages

API Documentation for Developers

The API documentation describes the REST APIs for various functions like getting an OAuth token, listing services, getting user information, activating/relocating a service, changing a service, dismantling a service, and checking status of these processes. It provides details on the API endpoints, request and response formats for each API.

Uploaded by

g4zerock
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
113 views39 pages

API Documentation for Developers

The API documentation describes the REST APIs for various functions like getting an OAuth token, listing services, getting user information, activating/relocating a service, changing a service, dismantling a service, and checking status of these processes. It provides details on the API endpoints, request and response formats for each API.

Uploaded by

g4zerock
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

FSIS – API

DOCUMENTATION
VER 2.1

Prepared By: System Application Team


PT. MEGA AKSES PERSADA (FIBERSTAR) | 2021
TABLE OF CONTENT

I. REST API DOCUMENTATION................................................................................................... 2


1. OAuth Token ............................................................................................................................ 2
2. Services List ............................................................................................................................. 4
3. User Information...................................................................................................................... 5
4. Activation / Relocation........................................................................................................... 7
4.1 Activation .......................................................................................................................... 7
4.2 Relocation ......................................................................................................................... 9
4.3 Cancel Activation / Relocation .................................................................................. 12
4.4 Activation / Relocation Status ................................................................................... 13
5. Change Service...................................................................................................................... 16
5.1 Change Service.............................................................................................................. 16
5.2 Change Service and Add Equipment ....................................................................... 18
5.3 Change Service and Dismantle Equipment............................................................ 20
5.4 Add Equipment .............................................................................................................. 23
5.5 Dismantle Equipment ................................................................................................... 25
5.6 Cancel Change Service ............................................................................................... 27
5.7 Change Service Status ................................................................................................ 29
6. Dismantle ................................................................................................................................ 32
6.1 Dismantle ........................................................................................................................ 32
6.2 Cancel Dismantle .......................................................................................................... 34
6.3 Dismantle Status ........................................................................................................... 36

1
I. REST API DOCUMENTATION

API End Point Testing https://fab.fiberstar.co.id:8443/FAB_TESTAPI


API End Point https://fab.fiberstar.co.id:8443/FAB_API

1. OAuth Token

Specification
API Route /oauth/token
Method POST
Content Type application/x-www-form-urlencoded
Authentication Header Basic {client_id:client_secret}

Request Parameter
Field Type State Description
grant_type string required grant_type = password

Response
Field Type Description
access_token string Generated access token
token_type string Token Type
expires_in integer Token expiration time (1 day)

Example (Postman)

Request :

Step 1

2
Step 2

Response :

If response Ok :

If client_id or client_secret incorrect :

3
2. Services List

Specification
API Route /api/case/services
Method GET
Content Type -
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
- - - -

Response
Field Type Description
List containing BA, ServiceId and
- string[]
ServiceName

Example (Postman)

Request : -

Response :

If response Ok :

4
3. User Information

Specification
API Route /api/case/user/info
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter : provide either cid, crt_id, name, or all of them


Field Type State Description
cid string optional Customer ID (owned by ISP)
crt_id string optional Circtuit ID
name String optional End customer name

Response : if customer(s) found, will return an array of customers


Field Type Description
circuitid string End customer Circuit ID
city string End customer city
district string End customer district
name string End customer name
endcustomername string End customer name
state string End customer state
status string Status of end customer
street string End customer street address
endcustomerphone string End customer Phone
group string End customer group
layanan string End customer layanan
serviceid string End Customer service ID (ID Layanan)
cid string End customer ID (owned by ISP)
endcustomerid string End customer ID
requesttime datetime The request timestamp

Response for bad Request, caused by parameter mismatch or no data posted


Field Type Description
Message string Error message

5
Example (Postman)

Request :

Response :

If response Ok :

If request parameter not filled :

If customer not found :

6
4. Activation / Relocation

4.1 Activation

Specification
API Route /api/v2/activation
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
RequestType int (5) required Input code = 26
CustomerID string (30) required Customer ID (owned by ISP)
CustomerName string (250) required Customer name
IdentityNumber string (50) optional Customer identity number
HomeID string (100) required Home ID
PhoneNumber string (20) required Customer phone number
MobilePhoneNumber string (20) required Customer mobile phone number
UserName string (50) optional Username of customer router
Password string (150) optional Password of customer router
Vlan string (150) required Vlan
The Service ID that has been
Service string (50) required obtained from Service List
(/api/case/services) API
PromoBandwidth int (5) optional Promo bandwidth
PromoPeriod Int (5) optional Promo period in month
Notes string (500) optional Note for others information
Device that will be installed
in cutomer location.
[DeviceName]=[DeviceQuantity];
[DeviceName]=[DeviceQuantity];
[DeviceName]=[DeviceQuantity]
Device string required
Exp: Router=2;STB=3

If there is no device, use this format


=> Router=0;STB=0
Schedule for installation.
InstallationSchedule datetime required
Format : yyyy-MM-dd HH:mm:ss

7
SalesName string (50) optional Sales person that handled customer
Person that submitted activation
Submitter string (255) required
request

Response : if successfully submitted


Field Type Description
- string Message

Response for bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

8
If some required parameter not filled :

If double input data with same customer id and the data already proceed by FiberStar
presales :

4.2 Relocation

Specification
API Route /api/v2/activation
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
RequestType int (5) required Input code = 28
CustomerID string (30) required Customer ID (owned by ISP)
CustomerName string (250) required Customer name
IdentityNumber string (50) optional Customer identity number
HomeID string (100) required Home ID
PhoneNumber string (20) required Customer phone number
MobilePhoneNumber string (20) required Customer mobile phone number
UserName string (50) optional Username of customer router
Password string (150) optional Password of customer router
Vlan string (150) required Vlan

9
The Service ID that has been
Service string (50) required obtained from Service List
(/api/case/services) API
PromoBandwidth int (5) optional Promo bandwidth
PromoPeriod Int (5) optional Promo period in month
Notes string (500) optional Note for others information
Device that will be installed
in cutomer location.
[DeviceName]=[DeviceQuantity];
[DeviceName]=[DeviceQuantity];
[DeviceName]=[DeviceQuantity]
Device string required
Exp: Router=2;STB=3

If there is no device, use this format


=> Router=0;STB=0
Schedule for installation.
InstallationSchedule datetime required
Format : yyyy-MM-dd HH:mm:ss
SalesName string (50) optional Sales person that handled customer
Person that submitted activation
Submitter string (255) required
request

Response : if successfully submitted


Field Type Description
- string Message

Response for bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

10
Example (Postman)

Request :

Response :

If response Ok :

If some required parameter not filled :

If double input data with same customer id and the data already proceed by FiberStar
presales :

11
4.3 Cancel Activation / Relocation

Specification
API Route /api/case/cancelation
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
customer_id string (30) required End Customer ID (owned by ISP)
FABSubmitter string (150) required Person that canceling activation
Reason / symptom of cancelation
symptom string (500) required
activation

Response
Field Type Description
- string[] Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

12
If customer does not exist :

If some required parameter not filled :

4.4 Activation / Relocation Status

Specification
API Route /api/case/fab_status
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter : provide one of request parameter or all of them


Field Type State Description
isp_custid string optional End Customer ID (owned by ISP)
username string optional Username of router customer

Response : array of customer(s)


Field Type Description
ID int Record ID in Database
FAB_NBR string Activation Number
STATUS_NAME string Status name of the activation
ISP_CUSTID int Customer ID in ISP
CUSTOMER_NAME string The name of Customer
HOMEID int Home ID of the Customer
NUMBERID int Number ID of the Customer

13
POSTAL_CODE int Postal Code of the Customer
PROVINCE string The Province of the Customer
CITY string The City of the Customer
DISTRICT string The District of the Customer
SUB_DISTRICT string The Sub District of the Customer
ADDRESS string The Address of the Customer
ISP_NAME string The ISP Name of the Customer
CBN_SALES string The Sales Name for the Customer
The Submit Date of the activation for the
SUBMIT_DATE datetime
customer
The Username of the customer on the
USERNAME string
installed system
CONTACT_PERSON string The contact person name of the customer
CONTACT_PHONE int The contact phone of the customer
COORDINATE string The coordinate of the customer house’s
BANDWITH string The bandwith given to the customer
The promo bandwith description given to the
PROMO_BANDWITH string
customer
PROMO_PERIOD string Promo period given to the customer
PROMO_END_DATE datetime Promo end date given to the customer
ACTIVATION_DATE datetime The activation date of the customer
NOTES string Notes for the record
RFS_DATE datetime RFS Date (Installation Date)
SERVICE string Customer Internet Service Name
STATUS_FAB string Activation Status
SALES_FS string The Sales of the customer from Fiberstar
REGION string Customer Region Place
IS_ALIVE bool Indicator if fate still valid or not
CREATE_DATE datetime The record created date
CREATED_BY string The record created by

Response if customer doesn’t exist


Field Type Description
- array Empty array

14
Example (Postman)

Request :

Response :

If response Ok :

15
If customer does not exist :

5. Change Service

5.1 Change Service

Specification
API Route /api/case/change-service
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of customer
required circuit id, that has been
circuit_id string (100)
without “cid” obtained from UserInfo
API
required
cid string (50) without ISP Customer ID
“circuit_id”
The service id that has been
new_service string (100) yes obtained from
/api/case/services API
The name of promo, if
promo_name string (250) no customer subscribe
promo version
The total bandwidth of
promo_bandwidth int no
promo period
The date on which change
effective_date date (mm-dd-yyyy) yes
service will be changed
Take notes for additional
notes string (500) no
information
The submitter user
submitter string (200) yes
identification

16
Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

If customer does not exist :

17
If some required parameter not filled :

5.2 Change Service and Add Equipment

Specification
API Route /api/case/change-service-add-equipment
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of customer
required circuit id, that has been
circuit_id string (100)
without “cid” obtained from UserInfo
API
required
cid string (50) without ISP Customer ID
“circuit_id”
The service id that has
new_service string (100) yes been obtained from
/api/case/services API
The name of promo, if
promo_name string (250) no customer subscribe
promo version
The total bandwidth of
promo_bandwidth int no
promo period
The date on which
date change service and
effective_datetime yes
(mm-dd-yyyy h:i:s) devices
must be installed

18
Take notes for additional
notes string (500) no
information

The submitter user


submitter string (200) yes
identification

Device that will be installed


devices string[] yes in customer
location

Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

19
Response :

If response Ok :

If re-input data with same customer id and the data already proceed by FiberStar
presales:

5.3 Change Service and Dismantle Equipment

Specification
API Route /api/case/change-service-dismantle-equipment
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of customer
required circuit id, that has been
circuit_id string (100)
without “cid” obtained from UserInfo
API
required
cid string (50) without ISP Customer ID
“circuit_id”
The service id that has
new_service string (100) yes been obtained from
/api/case/services API

20
The name of promo, if
promo_name string (250) no customer subscribe
promo version

The total bandwidth of


promo_bandwidth Int no
promo period

The datetime on which


date change service changed
effective_datetime yes
(mm-dd-yyyy h:i:s) and devices
must be dismantled

Take notes for additional


notes string (500) no
information

The submitter user


submitter string (200) yes
identification

Device that will be


devices string[] yes dismantled in customer
location

Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

21
Example (Postman)

Request :

Response :

If response Ok :

If customer does not exist :

If some required parameter not filled :

22
If re-input data with same customer id and the data already proceed by FiberStar
presales:

5.4 Add Equipment

Specification
API Route /api/case/add-equipment
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of
customer
required circuit id, that has
circuit_id string (100) without been
“cid” obtained from
UserInfo
API
required
cid string (50) without ISP Customer ID
“circuit_id”
The date on which
date
device_installation_datetime yes devices
(mm-dd-yyyy h:i:s)
must be installed

Take notes for


notes string (500) yes
information
The submitter user
submitter string (200) yes
identification
Device that will be
devices string[] yes installed in customer
location

23
Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

24
If customer does not exist :

If some required parameter not filled :

If re-input data with same customer id and the data already proceed by FiberStar
presales:

5.5 Dismantle Equipment

Specification
API Route /api/case/dismantle-equipment
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of customer
required circuit id, that has been
circuit_id string (100)
without “cid” obtained from UserInfo
API
required
cid string (50) without ISP Customer ID
“circuit_id”

25
date The date on which
device_dismantle_dateti
(mm-dd-yyyy yes devices
me
h:i:s) must be installed
Take notes for
notes string (500) yes
information

The submitter user


submitter string (200) yes
identification
Device that will be
devices string[] yes dismantled in customer
location

Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

26
Response :

If response Ok :

If customer does not exist :

If some required parameter not filled :

If re-input data with same customer id and the data already proceed by FiberStar
presales:

5.6 Cancel Change Service

Specification
API Route /api/case/cancelation/change-service
Method POST
Content Type application/json
Authentication Header Bearer {token}

27
Request Parameter
Field Type State Description
CustomerID string (50) required ISP Customer ID

The submitter user


Submitter string (200) required
identification
Reason / symptom of
ReasonCancel string (500) required
cancelation change service

Response
Field Type Description
success bool Indication of success operation
message string Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

If customer does not exist :

28
If some required parameter not filled :

5.7 Change Service Status

Specification
API Route /api/case/change-service-status
Method GET
Content Type application/json
Authentication Header Bearer {token}

Request Parameter : provide one of request parameter or all of them


Field Type State Description
customer_id string (50) optional ISP Customer ID
Information of customer
circuit id, that has been
circuit_id string (100) optional
obtained from UserInfo
API

Response : array of customer(s)


Field Type Description
id int Record in database
request_no string Request number
request_type string Request type of change service
cid string ISP Customer ID
endcustomer_id string FS end customer ID
endcustomer_name string End customer name
circuit_id string FS circuit id
current_service_id string Current service id
current_service_name string Current service name

29
new_service_name string New request service id
new_capacity int New request capacity
new_unit string New request unit for capacity
The name of promo, if
promo_name string customer subscribe
promo version
The total bandwidth of
promo_bandwidth int
promo period
Device that will be
devices array installed / dismantled in customer
location
The datetime on which change service
effective_date datetime
and/or devices ust be installed
note string Note from isp
submitter string Person that submitted change service
status_name string Change service status
created datetime The record created date
created_by string The record created by

Response if customer doesn’t exist


Field Type Description
- array Empty array

Example (Postman)

Request :

30
Response :

If response Ok :

If customer does not exist :

31
If some required parameter not filled :

6. Dismantle

6.1 Dismantle

Specification
API Route /api/case/dismantle
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
Information of customer
required if
Circuit ID, that has been
CircuitId string (100) “CustomerId”
obtained from User Info
is empty
API
required if
CustomerId string (50) “CircuitId” is Customer ID (owned by ISP)
empty
The date on which devices
EndServiceDate date (yyyy-mm-dd) required
must be dismantled
Any type of devices being
Devices string[] optional dismantled after end of
service
Additional notes, may
Notes string (500) optional contains specific
information

Response
Field Type Description
message string A message from system

32
requestNo string A request number for reference
Numbering status with 0 or 1, indicate of
succession of request. If number 1 indicate
status int the request successfully received by server,
if number 0 the request has been failed to
received by server
The basic information of customer that
customer string[]
ended the service

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

33
If customer does not exist :

If some required parameter not filled :

If double input data with same customer id and the data already proceed by FiberStar
presales :

6.2 Cancel Dismantle

Specification
API Route /api/case/cancelation/dismantle
Method POST
Content Type application/json
Authentication Header Bearer {token}

Request Parameter
Field Type State Description
CustomerID string (30) required End Customer ID (owned by ISP)
Submitter string (150) required Person that canceling dismantle
Reason / symptom of cancelation
ReasonCancel string (500) required
dismantle

34
Response
Field Type Description
- string[] Message

Response for Bad Request


Field Type Description
Message string Hint message
ModelState string[] Detail if there field not match in model state

Example (Postman)

Request :

Response :

If response Ok :

If customer does not exist :

35
If some required parameter not filled :

6.3 Dismantle Status

Specification
API Route /api/case/dismantle-status
Method GET
Content Type application/json
Authentication Header Bearer {token}

Request Parameter : provide one of request parameter or all of them


Field Type State Description
CustomerID string (50) optional ISP Customer ID

Information of customer Circuit ID,


CircuitID string (100) optional that has been obtained from User
Info API

Response : array of customer


Field Type Description
Id int Record in database
DismantleRequestNo string Request number
CustomerID string ISP Customer ID
CircuitId string FS Circuit ID
FSEndCustomerId string FS End Customer ID
EndCustomerName string FS End Customer Name
HomeId string HomeID of customer
Address string Address of customer
PhoneNo string Phone number of customer

36
ServiceId string Current service id
ServiceName string Current service name
The date on which customer will be
DismantledDate date
dismantled
ReasonCancel string Reason / symptom of cancelation
Notes string Note from ISP
StatusName string Dismantle status
Devices array Device that will be dismantled in customer
Created datetime The record created date
CreatedBy string The record created by

Response for Bad Request


Field Type Description
Message string Hint message

Example (Postman)

Request :

37
Response :

If response Ok :

If customer does not exist :

If some required parameter not filled :

{
"Message": "Either CustomerID or CircuitID have to be filled as a parameter"
}

! End of Document

38

You might also like