REST request for service type. Provides method for finding, creating, modifiying service type.
-
POST
Create new service type
-
acceptable request format: application/x-www-form-urlencoded
-
acceptable request params:
param type typeName string -
response:
Code: 201
key value error false message Service type successfully added value typeName OR
Code: 200
key value error true message Ooops ! Failed to add service type! value typeName OR
Code: 200
key value error true message Service type already existed value typeName
-
-
PUT
Modify service type
-
acceptable request format: application/x-www-form-urlencoded
-
acceptable param:
param type oldTypeName string newTypeName string -
response:
Code: 201
key value error false message Service type updated OR
Code: 200
key value error true message Service type update failed OR
Code: 200
key value error true message Service type not exist
-
-
GET
Returns all service type name in list
-
Response:
Code: 200
Content: { "type_name" : "rumah sakit" }
-
REST request for service district. Provides method for finding district.
-
GET
Returns all district names
-
response:
Code: 200
Content: { "district_name" : "sukolilo" }
-
REST request for service. Provides method for finding, and creating service.
-
POST
-
accepatable request format: application/x-www-form-urlencoded
-
acceptable param:
param value serviceName string serviceAddress string serviceTelp string serviceEmail string serviceType string (id type) serviceDistrict string (id district) serviceInfo string serviceLocationName string serviceLocationLong string serviceLocationLat string -
response:
Code: 201
key value error false message Service successfully added OR
Code: 200
key value error true message Ooops ! Failed to add service! OR
Code: 200
key value error true message Service already existed
-
-
GET
Returns all services
-
response
-
Code: 200
-
Content:
{
"service_name" : "RSUD xxxx",
"service_address" : "Jl. xxxxx no xxx",
"service_telp" : "0295-111111",
"service_email : "email@email.com",
"service_type" : "1",
"service_district" : "4",
"service_info" : "BPJS Accepted",
"service_img_ur" : "http://url.domain/img.jpg",
"service_location_name" : "dekat xxx",
"service_location_long" : "1.xxxx",
"service_location_lat" : "100.xxxx"
}
-
-
REST request for modifiying service using url paramater
-
PUT
-
URL PARAM: old service name
-
acceptable request format: application/x-wwww-form-urlencoded
-
acceptable param:
param value serviceName string serviceAddress string serviceTelp string serviceEmail string serviceType string (id type) serviceDistrict string (id district) serviceInfo string serviceLocationName string serviceLocationLong string serviceLocationLat string -
response:
Code: 201
key value error false message Service updated OR
Code: 200
key value error true message Service update failed OR
Code: 200
key value error true message Service not exist
-
Returns all service with specific type
-
GET
-
URL PARAM: service type id
-
response:
-
Code: 200
-
Content:
{
"service_name" : "RSUD xxxx",
"service_address" : "Jl. xxxxx no xxx",
"service_telp" : "0295-111111",
"service_email : "email@email.com",
"service_type" : "1",
"service_district" : "4",
"service_info" : "BPJS Accepted",
"service_img_ur" : "http://url.domain/img.jpg",
"service_location_name" : "dekat xxx",
"service_location_long" : "1.xxxx",
"service_location_lat" : "100.xxxx"
}
-
-
Returns all service based on their district
-
GET
-
URL Param: service district id
-
response:
-
Code: 200
-
Content:
{
"service_name" : "RSUD xxxx",
"service_address" : "Jl. xxxxx no xxx",
"service_telp" : "0295-111111",
"service_email : "email@email.com",
"service_type" : "1",
"service_district" : "4",
"service_info" : "BPJS Accepted",
"service_img_ur" : "http://url.domain/img.jpg",
"service_location_name" : "dekat xxx",
"service_location_long" : "1.xxxx",
"service_location_lat" : "100.xxxx"
}
-
-
Returns all service based on their district and their type
-
GET
-
URL PARAM:
param value district service district id (int) type service type id (int) -
response:
-
Code: 200
-
Content:
{
"service_name" : "RSUD xxxx",
"service_address" : "Jl. xxxxx no xxx",
"service_telp" : "0295-111111",
"service_email : "email@email.com",
"service_type" : "1",
"service_district" : "4",
"service_info" : "BPJS Accepted",
"service_img_ur" : "http://url.domain/img.jpg",
"service_location_name" : "dekat xxx",
"service_location_long" : "1.xxxx",
"service_location_lat" : "100.xxxx"
}
-
-