NAV
bash javascript

Info

Welcome to the generated API reference.

Authentication

Controller to Generate Tokens by Login and do Logout, Reset & Register Accounts.

Login

This will generate token after provided email & password

Note: password should be a SHA-512 Hash.

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/login" \
-H "Accept: application/json" \
    -d "email"="magni" \
    -d "password"="magni" \
    -d "g-recaptcha-response"="magni" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/login",
    "method": "POST",
    "data": {
        "email": "magni",
        "password": "magni",
        "g-recaptcha-response": "magni"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/login

Parameters

Parameter Type Status Description
email string required
password string required Minimum: 128
g-recaptcha-response string required

Reset Password

Reset password

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/reset" \
-H "Accept: application/json" \
    -d "email"="justice94@example.com" \
    -d "g-recaptcha-response"="est" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/reset",
    "method": "POST",
    "data": {
        "email": "justice94@example.com",
        "g-recaptcha-response": "est"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/reset

Parameters

Parameter Type Status Description
email email required
g-recaptcha-response string required

Register new Account

Register a new account

Note: all passwords should be a SHA-512 Hash.

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/register" \
-H "Accept: application/json" \
    -d "name"="ut" \
    -d "is_observer"="37294" \
    -d "email"="ut" \
    -d "mobile"="ut" \
    -d "password"="ut" \
    -d "password_confirmation"="ut" \
    -d "g-recaptcha-response"="ut" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/register",
    "method": "POST",
    "data": {
        "name": "ut",
        "is_observer": 37294,
        "email": "ut",
        "mobile": "ut",
        "password": "ut",
        "password_confirmation": "ut",
        "g-recaptcha-response": "ut"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/register

Parameters

Parameter Type Status Description
name string required Maximum: 191
is_observer integer required
email string optional Required if is_observer is 1 Maximum: 191
mobile string required Minimum: 10
password string required Minimum: 128
password_confirmation string required Minimum: 128
g-recaptcha-response string required

Logout

This will logout & delete any tokens related to person.

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/logout" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/logout",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/logout

Awareness Type

Controller to access data about Company

List of all AwarenessType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/awareness_type" \
-H "Accept: application/json" \
    -d "chunk"="rerum" \
    -d "page"="167750" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/awareness_type",
    "method": "GET",
    "data": {
        "chunk": "rerum",
        "page": 167750
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/awareness_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New AwarenessType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/awareness_type" \
-H "Accept: application/json" \
    -d "name"="consectetur" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/awareness_type",
    "method": "POST",
    "data": {
        "name": "consectetur"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/awareness_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected AwarenessType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/awareness_type/{awareness_type}

Update Selected AwarenessType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}" \
-H "Accept: application/json" \
    -d "name"="qui" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}",
    "method": "PUT",
    "data": {
        "name": "qui"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/awareness_type/{awareness_type}

PATCH api/v1/awareness_type/{awareness_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected AwarenessType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/awareness_type/{awareness_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/awareness_type/{awareness_type}

Company

Controller to access data about Company

List of all Company

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/company" \
-H "Accept: application/json" \
    -d "chunk"="et" \
    -d "page"="429590" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/company",
    "method": "GET",
    "data": {
        "chunk": "et",
        "page": 429590
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/company

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New Company

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/company" \
-H "Accept: application/json" \
    -d "name"="et" \
    -d "country_id"="et" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/company",
    "method": "POST",
    "data": {
        "name": "et",
        "country_id": "et"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/company

Parameters

Parameter Type Status Description
name string required Maximum: 191
country_id string required

Show Selected Company

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/company/{company}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/company/{company}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/company/{company}

Update Selected Company

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/company/{company}" \
-H "Accept: application/json" \
    -d "name"="et" \
    -d "country_id"="et" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/company/{company}",
    "method": "PUT",
    "data": {
        "name": "et",
        "country_id": "et"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/company/{company}

PATCH api/v1/company/{company}

Parameters

Parameter Type Status Description
name string required Maximum: 191
country_id string required

Delete Selected Company

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/company/{company}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/company/{company}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/company/{company}

Complaint

Controller to access data about complaints

List of all Complaints

Output will be Paginated to 10 records per page per request.

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/citizen/complaint" \
-H "Accept: application/json" \
    -d "page"="1330933" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/complaint",
    "method": "GET",
    "data": {
        "page": 1330933
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/citizen/complaint

Parameters

Parameter Type Status Description
page integer optional

Create New Complaint (for Owners only)

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : Your mobile number is not verified

02 : Your selected house cannot be found

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/citizen/complaint" \
-H "Accept: application/json" \
    -d "house_id"="90972" \
    -d "district_id"="90972" \
    -d "latitude"="90972" \
    -d "longitude"="90972" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/complaint",
    "method": "POST",
    "data": {
        "house_id": 90972,
        "district_id": 90972,
        "latitude": 90972,
        "longitude": 90972
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/citizen/complaint

Parameters

Parameter Type Status Description
house_id integer optional Required if the parameters district_id, latitude and longitude are not present.
district_id integer optional Required if the parameters house_id are not present.
latitude numeric optional
longitude numeric optional

Delete a Complaint (for Owners only)

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

//////////////////////////////////////////////////////////////////////////////////////////

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/citizen/complaint/{complaint}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/complaint/{complaint}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/citizen/complaint/{complaint}

List of all Complaints

Output will be Paginated to 10 records per page per request.

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/complaint" \
-H "Accept: application/json" \
    -d "page"="6" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/complaint",
    "method": "GET",
    "data": {
        "page": 6
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/complaint

Parameters

Parameter Type Status Description
page integer optional

Show a single Complaint

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/complaint/{complaint}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/complaint/{complaint}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/complaint/{complaint}

Assign a Complaint to a team

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : Unable to parse record reference point

02 : Unable to resolve record data

03 : Complaint already Assigned

04 : Unable to parse house reference point

05 : Unable to resolve house data

06 : Unable to create a new visit for this complaint

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/complaint/assign/{complaint}" \
-H "Accept: application/json" \
    -d "house_id"="70844" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/complaint/assign/{complaint}",
    "method": "POST",
    "data": {
        "house_id": 70844
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/complaint/assign/{complaint}

Parameters

Parameter Type Status Description
house_id integer required

Country

Controller to access data about country

List of all Countries

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/country" \
-H "Accept: application/json" \
    -d "chunk"="odit" \
    -d "page"="0" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/country",
    "method": "GET",
    "data": {
        "chunk": "odit",
        "page": 0
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/country

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New Country

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/country" \
-H "Accept: application/json" \
    -d "name"="necessitatibus" \
    -d "code"="necessitatibus" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/country",
    "method": "POST",
    "data": {
        "name": "necessitatibus",
        "code": "necessitatibus"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/country

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required Maximum: 5

Show Selected Country

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/country/{country}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/country/{country}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/country/{country}

Update Selected Country

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/country/{country}" \
-H "Accept: application/json" \
    -d "name"="tempore" \
    -d "code"="tempore" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/country/{country}",
    "method": "PUT",
    "data": {
        "name": "tempore",
        "code": "tempore"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/country/{country}

PATCH api/v1/country/{country}

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required Maximum: 5

Delete Selected Country

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/country/{country}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/country/{country}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/country/{country}

Device

Controller to access data about Device

List of all Device

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/device" \
-H "Accept: application/json" \
    -d "page"="96939" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device",
    "method": "GET",
    "data": {
        "page": 96939
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/device

Parameters

Parameter Type Status Description
page integer optional

Create New Device

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/device" \
-H "Accept: application/json" \
    -d "name"="quo" \
    -d "code"="quo" \
    -d "device_type_id"="quo" \
    -d "model"="quo" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device",
    "method": "POST",
    "data": {
        "name": "quo",
        "code": "quo",
        "device_type_id": "quo",
        "model": "quo"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/device

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required Maximum: 191
device_type_id string required
model string optional

Show Selected Device

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/device/{device}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device/{device}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/device/{device}

Update Selected Device

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/device/{device}" \
-H "Accept: application/json" \
    -d "name"="omnis" \
    -d "code"="omnis" \
    -d "device_type_id"="omnis" \
    -d "model"="omnis" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device/{device}",
    "method": "PUT",
    "data": {
        "name": "omnis",
        "code": "omnis",
        "device_type_id": "omnis",
        "model": "omnis"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/device/{device}

PATCH api/v1/device/{device}

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required
device_type_id string required
model string optional

Delete Selected Device

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/device/{device}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device/{device}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/device/{device}

Device Type

Controller to access data about DeviceType

List of all DeviceType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/device_type" \
-H "Accept: application/json" \
    -d "page"="0" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device_type",
    "method": "GET",
    "data": {
        "page": 0
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/device_type

Parameters

Parameter Type Status Description
page integer optional

Create New DeviceType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/device_type" \
-H "Accept: application/json" \
    -d "name"="aliquam" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device_type",
    "method": "POST",
    "data": {
        "name": "aliquam"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/device_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected DeviceType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/device_type/{device_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device_type/{device_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/device_type/{device_type}

Update Selected DeviceType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/device_type/{device_type}" \
-H "Accept: application/json" \
    -d "name"="et" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device_type/{device_type}",
    "method": "PUT",
    "data": {
        "name": "et"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/device_type/{device_type}

PATCH api/v1/device_type/{device_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected DeviceType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/device_type/{device_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/device_type/{device_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/device_type/{device_type}

District

Controller to access data about District

List of all Countries

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/district" \
-H "Accept: application/json" \
    -d "chunk"="corporis" \
    -d "page"="390" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/district",
    "method": "GET",
    "data": {
        "chunk": "corporis",
        "page": 390
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/district

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New District

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/district" \
-H "Accept: application/json" \
    -d "name"="numquam" \
    -d "city_id"="numquam" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/district",
    "method": "POST",
    "data": {
        "name": "numquam",
        "city_id": "numquam"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/district

Parameters

Parameter Type Status Description
name string required Maximum: 191
city_id string required

Show Selected District

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/district/{district}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/district/{district}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/district/{district}

Update Selected District

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/district/{district}" \
-H "Accept: application/json" \
    -d "name"="consequatur" \
    -d "city_id"="consequatur" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/district/{district}",
    "method": "PUT",
    "data": {
        "name": "consequatur",
        "city_id": "consequatur"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/district/{district}

PATCH api/v1/district/{district}

Parameters

Parameter Type Status Description
name string required Maximum: 191
city_id string required

Delete Selected District

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/district/{district}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/district/{district}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/district/{district}

Epidemiological Survey

Controller to access data about Epidemiological Survey

List of all Epidemiological Survey

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/epidemiological_survey" \
-H "Accept: application/json" \
    -d "page"="841075934" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/epidemiological_survey",
    "method": "GET",
    "data": {
        "page": 841075934
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/epidemiological_survey

Parameters

Parameter Type Status Description
page integer optional

Create New Epidemiological Survey

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/epidemiological_survey" \
-H "Accept: application/json" \
    -d "reporter_name"="dolorem" \
    -d "reporter_mobile"="dolorem" \
    -d "reporter_district_id"="37" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/epidemiological_survey",
    "method": "POST",
    "data": {
        "reporter_name": "dolorem",
        "reporter_mobile": "dolorem",
        "reporter_district_id": 37
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/epidemiological_survey

Parameters

Parameter Type Status Description
reporter_name string required
reporter_mobile string required
reporter_district_id integer required

Update Selected Epidemiological Survey

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/epidemiological_survey/ack" \
-H "Accept: application/json" \
    -d "report_id"="53412" \
    -d "district_id"="53412" \
    -d "owner_id"="53412" \
    -d "house_id"="53412" \
    -d "latitude"="53412" \
    -d "longitude"="53412" \
    -d "is_positive"="53412" \
    -d "signature"="occaecati" \
    -d "signature_hash"="occaecati" \
    -d "symptom_form"="occaecati" \
    -d "places_visited_by_patient"="occaecati" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/epidemiological_survey/ack",
    "method": "POST",
    "data": {
        "report_id": 53412,
        "district_id": 53412,
        "owner_id": 53412,
        "house_id": 53412,
        "latitude": 53412,
        "longitude": 53412,
        "is_positive": 53412,
        "signature": "occaecati",
        "signature_hash": "occaecati",
        "symptom_form": "occaecati",
        "places_visited_by_patient": "occaecati"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/epidemiological_survey/ack

Parameters

Parameter Type Status Description
report_id integer required
district_id integer required
owner_id integer required
house_id integer optional
latitude numeric required
longitude numeric required
is_positive integer required
signature string required
signature_hash string required
symptom_form array required Must be an array
places_visited_by_patient string optional

GCM Push Notification (Android)

Controller to Manage device token for Push Notification

Update Token

Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/gcm" \
-H "Accept: application/json" \
    -d "token"="similique" \
    -d "version"="415514" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/gcm",
    "method": "POST",
    "data": {
        "token": "similique",
        "version": 415514
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/gcm

Parameters

Parameter Type Status Description
token string required
version numeric required

House

Controller to access data about House

List of all Owner's House

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/select/house" \
-H "Accept: application/json" \
    -d "page"="75" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/select/house",
    "method": "GET",
    "data": {
        "page": 75
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/select/house

Parameters

Parameter Type Status Description
page integer optional

List of all Owner's House

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/citizen/house" \
-H "Accept: application/json" \
    -d "page"="834" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/house",
    "method": "GET",
    "data": {
        "page": 834
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/citizen/house

Parameters

Parameter Type Status Description
page integer optional

List of all Owner's House

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/owner/{owner}/house" \
-H "Accept: application/json" \
    -d "page"="2412754" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}/house",
    "method": "GET",
    "data": {
        "page": 2412754
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/owner/{owner}/house

Parameters

Parameter Type Status Description
page integer optional

Create New House

//////////////////////////// Error Codes ////////////////////////////

00 : Owner is BAD

01 : District ID is Missing

02 : District is BAD

03 : House type ID is Missing

04 : House type is BAD

05 : QrCode Sticker not provided with this house

06 : Unknown QrCode Sticker

07 : QrCode Sticker Already registered for another house

08 : QrCode Sticker Already registered & archived for another house

09 : QrCode Sticker Already registered for this house but it was archived and not be able to use again

110 : House Image checks failed

120 : House Image Hash Check Failed

130 : House Image failed to save

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/owner/{owner}/house" \
-H "Accept: application/json" \
    -d "name"="nemo" \
    -d "district_id"="52" \
    -d "house_type_id"="52" \
    -d "person_count"="52" \
    -d "room_count"="52" \
    -d "is_garden_exists"="52" \
    -d "is_rent"="52" \
    -d "latitude"="52" \
    -d "longitude"="52" \
    -d "sticker_code"="nemo" \
    -d "img"="nemo" \
    -d "img_hash"="nemo" \
    -d "localID"="nemo" \
    -d "house_type_name"="nemo" \
    -d "district_name"="nemo" \
    -d "city_name"="nemo" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}/house",
    "method": "POST",
    "data": {
        "name": "nemo",
        "district_id": 52,
        "house_type_id": 52,
        "person_count": 52,
        "room_count": 52,
        "is_garden_exists": 52,
        "is_rent": 52,
        "latitude": 52,
        "longitude": 52,
        "sticker_code": "nemo",
        "img": "nemo",
        "img_hash": "nemo",
        "localID": "nemo",
        "house_type_name": "nemo",
        "district_name": "nemo",
        "city_name": "nemo"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/owner/{owner}/house

Parameters

Parameter Type Status Description
name string required Maximum: 191
district_id integer required
house_type_id integer required
person_count integer optional
room_count integer optional
is_garden_exists integer required
is_rent integer required
latitude numeric required
longitude numeric required
sticker_code string optional Maximum: 191
img string required
img_hash string required
localID string optional
house_type_name string optional
district_name string optional
city_name string optional

Show Selected House

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/owner/{owner}/house/{house}

Update Selected House

//////////////////////////// Error Codes ////////////////////////////

00 : Owner is BAD

01 : District ID is Missing

02 : District is BAD

03 : House type ID is Missing

04 : House type is BAD

05 : QrCode Sticker not provided with this house

06 : Unknown QrCode Sticker

07 : QrCode Sticker Already registered for another house

08 : QrCode Sticker Already registered & archived for another house

09 : QrCode Sticker Already registered for this house but it was archived and not be able to use again

100 : Record ID is Missing

101 : Record is BAD

110 : House Image checks failed

120 : House Image Hash Check Failed

130 : House Image failed to save

//////////////////////////////////////////////////////////////////////////////////////////

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}" \
-H "Accept: application/json" \
    -d "name"="repellat" \
    -d "district_id"="521791545" \
    -d "house_type_id"="521791545" \
    -d "person_count"="521791545" \
    -d "room_count"="521791545" \
    -d "is_garden_exists"="521791545" \
    -d "is_rent"="521791545" \
    -d "latitude"="521791545" \
    -d "longitude"="521791545" \
    -d "sticker_code"="repellat" \
    -d "img"="repellat" \
    -d "img_hash"="repellat" \
    -d "house_type_name"="repellat" \
    -d "district_name"="repellat" \
    -d "city_name"="repellat" \
    -d "localID"="repellat" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}",
    "method": "PUT",
    "data": {
        "name": "repellat",
        "district_id": 521791545,
        "house_type_id": 521791545,
        "person_count": 521791545,
        "room_count": 521791545,
        "is_garden_exists": 521791545,
        "is_rent": 521791545,
        "latitude": 521791545,
        "longitude": 521791545,
        "sticker_code": "repellat",
        "img": "repellat",
        "img_hash": "repellat",
        "house_type_name": "repellat",
        "district_name": "repellat",
        "city_name": "repellat",
        "localID": "repellat"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/owner/{owner}/house/{house}

PATCH api/v1/owner/{owner}/house/{house}

Parameters

Parameter Type Status Description
name string required Maximum: 191
district_id integer required
house_type_id integer required
person_count integer optional
room_count integer optional
is_garden_exists integer required
is_rent integer required
latitude numeric required
longitude numeric required
sticker_code string optional Maximum: 191
img string optional
img_hash string optional Required if the parameters img are present.
house_type_name string optional
district_name string optional
city_name string optional
localID string optional

Delete Selected House

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}/house/{house}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/owner/{owner}/house/{house}

List of all Owner's House

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/house" \
-H "Accept: application/json" \
    -d "page"="81417" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house",
    "method": "GET",
    "data": {
        "page": 81417
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/house

Parameters

Parameter Type Status Description
page integer optional

Create New House

//////////////////////////// Error Codes ////////////////////////////

00 : Owner is BAD

01 : District ID is Missing

02 : District is BAD

03 : House type ID is Missing

04 : House type is BAD

05 : QrCode Sticker not provided with this house

06 : Unknown QrCode Sticker

07 : QrCode Sticker Already registered for another house

08 : QrCode Sticker Already registered & archived for another house

09 : QrCode Sticker Already registered for this house but it was archived and not be able to use again

110 : House Image checks failed

120 : House Image Hash Check Failed

130 : House Image failed to save

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/house" \
-H "Accept: application/json" \
    -d "name"="et" \
    -d "district_id"="798591" \
    -d "house_type_id"="798591" \
    -d "person_count"="798591" \
    -d "room_count"="798591" \
    -d "is_garden_exists"="798591" \
    -d "is_rent"="798591" \
    -d "latitude"="798591" \
    -d "longitude"="798591" \
    -d "sticker_code"="et" \
    -d "img"="et" \
    -d "img_hash"="et" \
    -d "localID"="et" \
    -d "house_type_name"="et" \
    -d "district_name"="et" \
    -d "city_name"="et" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house",
    "method": "POST",
    "data": {
        "name": "et",
        "district_id": 798591,
        "house_type_id": 798591,
        "person_count": 798591,
        "room_count": 798591,
        "is_garden_exists": 798591,
        "is_rent": 798591,
        "latitude": 798591,
        "longitude": 798591,
        "sticker_code": "et",
        "img": "et",
        "img_hash": "et",
        "localID": "et",
        "house_type_name": "et",
        "district_name": "et",
        "city_name": "et"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/house

Parameters

Parameter Type Status Description
name string required Maximum: 191
district_id integer required
house_type_id integer required
person_count integer optional
room_count integer optional
is_garden_exists integer required
is_rent integer required
latitude numeric required
longitude numeric required
sticker_code string optional Maximum: 191
img string required
img_hash string required
localID string optional
house_type_name string optional
district_name string optional
city_name string optional

Show Selected House

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/house/{house}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house/{house}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/house/{house}

Update Selected House

//////////////////////////// Error Codes ////////////////////////////

00 : Owner is BAD

01 : District ID is Missing

02 : District is BAD

03 : House type ID is Missing

04 : House type is BAD

05 : QrCode Sticker not provided with this house

06 : Unknown QrCode Sticker

07 : QrCode Sticker Already registered for another house

08 : QrCode Sticker Already registered & archived for another house

09 : QrCode Sticker Already registered for this house but it was archived and not be able to use again

100 : Record ID is Missing

101 : Record is BAD

110 : House Image checks failed

120 : House Image Hash Check Failed

130 : House Image failed to save

//////////////////////////////////////////////////////////////////////////////////////////

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/house/{house}" \
-H "Accept: application/json" \
    -d "name"="officia" \
    -d "district_id"="86826" \
    -d "house_type_id"="86826" \
    -d "person_count"="86826" \
    -d "room_count"="86826" \
    -d "is_garden_exists"="86826" \
    -d "is_rent"="86826" \
    -d "latitude"="86826" \
    -d "longitude"="86826" \
    -d "sticker_code"="officia" \
    -d "img"="officia" \
    -d "img_hash"="officia" \
    -d "house_type_name"="officia" \
    -d "district_name"="officia" \
    -d "city_name"="officia" \
    -d "localID"="officia" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house/{house}",
    "method": "PUT",
    "data": {
        "name": "officia",
        "district_id": 86826,
        "house_type_id": 86826,
        "person_count": 86826,
        "room_count": 86826,
        "is_garden_exists": 86826,
        "is_rent": 86826,
        "latitude": 86826,
        "longitude": 86826,
        "sticker_code": "officia",
        "img": "officia",
        "img_hash": "officia",
        "house_type_name": "officia",
        "district_name": "officia",
        "city_name": "officia",
        "localID": "officia"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/house/{house}

PATCH api/v1/house/{house}

Parameters

Parameter Type Status Description
name string required Maximum: 191
district_id integer required
house_type_id integer required
person_count integer optional
room_count integer optional
is_garden_exists integer required
is_rent integer required
latitude numeric required
longitude numeric required
sticker_code string optional Maximum: 191
img string optional
img_hash string optional Required if the parameters img are present.
house_type_name string optional
district_name string optional
city_name string optional
localID string optional

Delete Selected House

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/house/{house}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house/{house}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/house/{house}

Show House By QrCode Sticker

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/qrcode/house" \
-H "Accept: application/json" \
    -d "qrcode"="deleniti" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/qrcode/house",
    "method": "POST",
    "data": {
        "qrcode": "deleniti"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/qrcode/house

Parameters

Parameter Type Status Description
qrcode string required

House Type

Controller to access data about HouseType

List of all HouseType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/house_type" \
-H "Accept: application/json" \
    -d "chunk"="ipsum" \
    -d "page"="59" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house_type",
    "method": "GET",
    "data": {
        "chunk": "ipsum",
        "page": 59
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/house_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New HouseType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/house_type" \
-H "Accept: application/json" \
    -d "name"="placeat" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house_type",
    "method": "POST",
    "data": {
        "name": "placeat"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/house_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected HouseType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/house_type/{house_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house_type/{house_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/house_type/{house_type}

Update Selected HouseType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/house_type/{house_type}" \
-H "Accept: application/json" \
    -d "name"="sit" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house_type/{house_type}",
    "method": "PUT",
    "data": {
        "name": "sit"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/house_type/{house_type}

PATCH api/v1/house_type/{house_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected HouseType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/house_type/{house_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/house_type/{house_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/house_type/{house_type}

Insect

Controller to access data about Insect

List of all Insect

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/insect" \
-H "Accept: application/json" \
    -d "chunk"="recusandae" \
    -d "page"="64073326" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/insect",
    "method": "GET",
    "data": {
        "chunk": "recusandae",
        "page": 64073326
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/insect

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New Insect

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/insect" \
-H "Accept: application/json" \
    -d "name"="a" \
    -d "name_en"="a" \
    -d "insect_category_id"="a" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/insect",
    "method": "POST",
    "data": {
        "name": "a",
        "name_en": "a",
        "insect_category_id": "a"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/insect

Parameters

Parameter Type Status Description
name string required Maximum: 191
name_en string optional Maximum: 191
insect_category_id string required

Show Selected Insect

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/insect/{insect}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/insect/{insect}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/insect/{insect}

Update Selected Insect

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/insect/{insect}" \
-H "Accept: application/json" \
    -d "name"="facere" \
    -d "name_en"="facere" \
    -d "insect_category_id"="facere" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/insect/{insect}",
    "method": "PUT",
    "data": {
        "name": "facere",
        "name_en": "facere",
        "insect_category_id": "facere"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/insect/{insect}

PATCH api/v1/insect/{insect}

Parameters

Parameter Type Status Description
name string required Maximum: 191
name_en string optional Maximum: 191
insect_category_id string required

Delete Selected Insect

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/insect/{insect}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/insect/{insect}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/insect/{insect}

Job Type

Controller to access data about JobType

List of all JobType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/job_type" \
-H "Accept: application/json" \
    -d "chunk"="vel" \
    -d "page"="9373" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/job_type",
    "method": "GET",
    "data": {
        "chunk": "vel",
        "page": 9373
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/job_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New JobType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/job_type" \
-H "Accept: application/json" \
    -d "name"="dolores" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/job_type",
    "method": "POST",
    "data": {
        "name": "dolores"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/job_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected JobType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/job_type/{job_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/job_type/{job_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/job_type/{job_type}

Update Selected JobType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/job_type/{job_type}" \
-H "Accept: application/json" \
    -d "name"="est" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/job_type/{job_type}",
    "method": "PUT",
    "data": {
        "name": "est"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/job_type/{job_type}

PATCH api/v1/job_type/{job_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected JobType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/job_type/{job_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/job_type/{job_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/job_type/{job_type}

Network Tools

Controller to some tools

Ping

Check Service online status.

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/ping" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/ping",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/ping

Data Versions

Check minimal Primitive data version to update them when need it.

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/version" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/version",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/version

Data Versions

Check All Primitive data versions to update them when need it.

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/versions" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/versions",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/versions

Verify IDs

Verify local data ID integrity.

Data Protocol

{ "map": { "country" : [ "aaaaaaaa", "bbbbbbbb", "cccccccc" ], "district" : [ "dddddddd", "eeeeeeee", "ffffffff", "gggggggg", "hhhhhhhh" ], "city" : [ "qqqqqqqq", "yyyyyyyy", "zzzzzzzz" ] } }


Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/verify/ids" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/verify/ids",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/verify/ids

Owner

Controller to access data about Owner

List of all Owner

Output will be Paginated to 10 records per page per request.

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/owner" \
-H "Accept: application/json" \
    -d "word"="enim" \
    -d "page"="761" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner",
    "method": "GET",
    "data": {
        "word": "enim",
        "page": 761
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/owner

Parameters

Parameter Type Status Description
word string optional
page integer optional

Create New Owner

//////////////////////////// Error Codes ////////////////////////////

00 : Country ID is BAD

01 : Job Type ID is BAD

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/owner" \
-H "Accept: application/json" \
    -d "name"="cum" \
    -d "country_id"="3482736" \
    -d "sex"="3482736" \
    -d "birthdate"="2007-04-01" \
    -d "job_type_id"="3482736" \
    -d "mobile"="cum" \
    -d "email"="domenick62@example.net" \
    -d "identity"="cum" \
    -d "localID"="cum" \
    -d "country_name"="cum" \
    -d "job_type_name"="cum" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner",
    "method": "POST",
    "data": {
        "name": "cum",
        "country_id": 3482736,
        "sex": 3482736,
        "birthdate": "2007-04-01",
        "job_type_id": 3482736,
        "mobile": "cum",
        "email": "domenick62@example.net",
        "identity": "cum",
        "localID": "cum",
        "country_name": "cum",
        "job_type_name": "cum"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/owner

Parameters

Parameter Type Status Description
name string required Maximum: 191
country_id integer optional
sex integer required
birthdate date optional
job_type_id integer optional
mobile string optional
email email optional
identity string optional
localID string optional
country_name string optional
job_type_name string optional

Show Selected Owner

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/owner/{owner}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/owner/{owner}

Update Selected Owner

//////////////////////////// Error Codes ////////////////////////////

00 : Country ID is BAD

01 : Job Type ID is BAD

100 : Record ID is Missing

101 : Record is BAD

//////////////////////////////////////////////////////////////////////////////////////////

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/owner/{owner}" \
-H "Accept: application/json" \
    -d "name"="amet" \
    -d "country_id"="3" \
    -d "sex"="3" \
    -d "birthdate"="1980-05-05" \
    -d "job_type_id"="3" \
    -d "mobile"="amet" \
    -d "email"="bartell.vidal@example.net" \
    -d "country_name"="amet" \
    -d "job_type_name"="amet" \
    -d "identity"="amet" \
    -d "localID"="amet" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}",
    "method": "PUT",
    "data": {
        "name": "amet",
        "country_id": 3,
        "sex": 3,
        "birthdate": "1980-05-05",
        "job_type_id": 3,
        "mobile": "amet",
        "email": "bartell.vidal@example.net",
        "country_name": "amet",
        "job_type_name": "amet",
        "identity": "amet",
        "localID": "amet"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/owner/{owner}

PATCH api/v1/owner/{owner}

Parameters

Parameter Type Status Description
name string required Maximum: 191
country_id integer optional
sex integer required
birthdate date optional
job_type_id integer optional
mobile string optional
email email optional
country_name string optional
job_type_name string optional
identity string optional Maximum: 191
localID string optional

Delete Selected Owner

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/owner/{owner}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/owner/{owner}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/owner/{owner}

Pesticide

Controller to access data about Pesticide

List of all Pesticide

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/pesticide" \
-H "Accept: application/json" \
    -d "page"="309" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/pesticide",
    "method": "GET",
    "data": {
        "page": 309
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/pesticide

Parameters

Parameter Type Status Description
page integer optional

Create New Pesticide

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/pesticide" \
-H "Accept: application/json" \
    -d "name"="voluptas" \
    -d "name_en"="voluptas" \
    -d "company_id"="voluptas" \
    -d "country_id"="voluptas" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/pesticide",
    "method": "POST",
    "data": {
        "name": "voluptas",
        "name_en": "voluptas",
        "company_id": "voluptas",
        "country_id": "voluptas"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/pesticide

Parameters

Parameter Type Status Description
name string required Maximum: 191
name_en string optional Maximum: 191
company_id string required
country_id string required

Show Selected Pesticide

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/pesticide/{pesticide}

Update Selected Pesticide

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}" \
-H "Accept: application/json" \
    -d "name"="minus" \
    -d "name_en"="minus" \
    -d "company_id"="minus" \
    -d "country_id"="minus" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}",
    "method": "PUT",
    "data": {
        "name": "minus",
        "name_en": "minus",
        "company_id": "minus",
        "country_id": "minus"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/pesticide/{pesticide}

PATCH api/v1/pesticide/{pesticide}

Parameters

Parameter Type Status Description
name string required Maximum: 191
name_en string optional Maximum: 191
company_id string required
country_id string required

Delete Selected Pesticide

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/pesticide/{pesticide}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/pesticide/{pesticide}

Plan

Controller to access team plan

List of team plan details

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/plan" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/plan",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/plan

Reproduction Area Type

Controller to access data about ReproductionAreaType

List of all ReproductionAreaType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/reproduction_area_type" \
-H "Accept: application/json" \
    -d "chunk"="laudantium" \
    -d "page"="73923" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/reproduction_area_type",
    "method": "GET",
    "data": {
        "chunk": "laudantium",
        "page": 73923
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/reproduction_area_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New ReproductionAreaType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/reproduction_area_type" \
-H "Accept: application/json" \
    -d "name"="nisi" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/reproduction_area_type",
    "method": "POST",
    "data": {
        "name": "nisi"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/reproduction_area_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected ReproductionAreaType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/reproduction_area_type/{reproduction_area_type}

Update Selected ReproductionAreaType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}" \
-H "Accept: application/json" \
    -d "name"="accusantium" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}",
    "method": "PUT",
    "data": {
        "name": "accusantium"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/reproduction_area_type/{reproduction_area_type}

PATCH api/v1/reproduction_area_type/{reproduction_area_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected ReproductionAreaType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/reproduction_area_type/{reproduction_area_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/reproduction_area_type/{reproduction_area_type}

Stickers

Controller to access information about stickers

Check for Sticker Details

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/check/{type}/sticker/{sticker}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/check/{type}/sticker/{sticker}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/check/{type}/sticker/{sticker}

Summary

Controller to show work summary

List all work inserted by observer in Owners, Houses & Visits

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/summary" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/summary",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/summary

Symptom Type

Controller to access data about SymptomType

List of all Symptom Types

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/symptom_type" \
-H "Accept: application/json" \
    -d "chunk"="cumque" \
    -d "page"="3359458" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/symptom_type",
    "method": "GET",
    "data": {
        "chunk": "cumque",
        "page": 3359458
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/symptom_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New Symptom Type

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/symptom_type" \
-H "Accept: application/json" \
    -d "name"="pariatur" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/symptom_type",
    "method": "POST",
    "data": {
        "name": "pariatur"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/symptom_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected Symptom Type

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/symptom_type/{symptom_type}

Update Selected Symptom Type

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}" \
-H "Accept: application/json" \
    -d "name"="est" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}",
    "method": "PUT",
    "data": {
        "name": "est"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/symptom_type/{symptom_type}

PATCH api/v1/symptom_type/{symptom_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected Symptom Type

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/symptom_type/{symptom_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/symptom_type/{symptom_type}

Team

Controller to access data about Team

List of all Team Members

//////////////////////////// Error Codes ////////////////////////////

00 : Person can not be identified

01 : You're not belong to any team

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/team" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/team",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/team

Join a Device or a Car to Team Group

//////////////////////////// Error Codes ////////////////////////////

00 : Person can not be identified

01 : You're not belong to any team

02 : Sticker Not Found

03 : Sticker is not Printed

04 : Sticker is Archived

05 : Sticker is not active

06 : Sticker is used by another car

07 : Sticker is used by another device

08 : Sticker lost reference to car

09 : Team already has a Car

10 : Sticker car reference is a dead point

11 : Team already is full of Traps

12 : Sticker lost reference to device

13 : Sticker trap reference is a dead point

14 : Sticker is owned by another team

15 : Trap was deployed now and it can not be able to join it

16 : Sticker lost reference to device

17 : Team already has sprinkler device

18 : Team already has spray device

19 : Team already has fog device

20 : Sticker device reference is a dead point

21 : This Trap already joined to your team

22 : This car already belong to your team

23 : This device already belong to your team

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/team/join/{sticker}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/team/join/{sticker}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/team/join/{sticker}

Attend a Device or a Car belong to The Team

//////////////////////////// Error Codes ////////////////////////////

00 : Person can not be identified

01 : You're not belong to any team

02 : Sticker Not Found

03 : Sticker is not Printed

04 : Sticker is Archived

05 : Sticker is not active

06 : Sticker is not joined to any team

07 : This Sticker is belong to other team

08 : Car already attended

09 : Sprinkler already attended

10 : Spray already attended

11 : Fog already attended

12 : Traps not require any attends

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/team/attend/{sticker}" \
-H "Accept: application/json" \
    -d "latitude"="94" \
    -d "longitude"="94" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/team/attend/{sticker}",
    "method": "POST",
    "data": {
        "latitude": 94,
        "longitude": 94
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/team/attend/{sticker}

Parameters

Parameter Type Status Description
latitude numeric required
longitude numeric required

Trap

Controller to access data about Trap

List of all Trap

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/trap" \
-H "Accept: application/json" \
    -d "page"="73" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap",
    "method": "GET",
    "data": {
        "page": 73
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/trap

Parameters

Parameter Type Status Description
page integer optional

Create New Trap

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/trap" \
-H "Accept: application/json" \
    -d "name"="placeat" \
    -d "code"="placeat" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap",
    "method": "POST",
    "data": {
        "name": "placeat",
        "code": "placeat"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/trap

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required Maximum: 191

Show Selected Trap

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/trap/{trap}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap/{trap}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/trap/{trap}

Update Selected Trap

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/trap/{trap}" \
-H "Accept: application/json" \
    -d "name"="velit" \
    -d "code"="velit" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap/{trap}",
    "method": "PUT",
    "data": {
        "name": "velit",
        "code": "velit"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/trap/{trap}

PATCH api/v1/trap/{trap}

Parameters

Parameter Type Status Description
name string required Maximum: 191
code string required Maximum: 191

Delete Selected Trap

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/trap/{trap}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap/{trap}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/trap/{trap}

Trap Visits

Controller to access data about visits

List of all Current Traps Visits

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/trap_visit/check" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap_visit/check",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/trap_visit/check

Deploy Traps

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Trap Visit can not be identified

03 : Trap Visit can not be found

04 : Trap can not be deploy, it is already deployed

05 : Trap visit can not be updated any more, it is already done

06 : Trap can not be identified

07 : Trap can not be found

08 : Trap is already deployed and can not be re-deployed again

//////////////////////////////////////////////////////////////////////////////////////////

JSON Request form that server predict:

{ "trap_id": 8, "longitude": 46.7133768, "deploy_date": "2017-08-28 16:23:08", "latitude": 24.7460072, "visit_trap_id": 1 }

Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/trap_visit/deploy" \
-H "Accept: application/json" \
    -d "visit_trap_id"="6594216" \
    -d "trap_id"="6594216" \
    -d "latitude"="6594216" \
    -d "longitude"="6594216" \
    -d "deploy_date"="2007-06-08" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap_visit/deploy",
    "method": "POST",
    "data": {
        "visit_trap_id": 6594216,
        "trap_id": 6594216,
        "latitude": 6594216,
        "longitude": 6594216,
        "deploy_date": "2007-06-08"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/trap_visit/deploy

Parameters

Parameter Type Status Description
visit_trap_id integer required
trap_id integer required
latitude numeric required
longitude numeric required
deploy_date date required

Disband Traps

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Trap Visit can not be identified

03 : Trap Visit can not be found

04 : Trap should be deployed first, then you can disband it

05 : Trap visit can not be updated any more, it is already done

06 : Trap can not be identified

07 : Trap can not be found

08 : Trap is not deployed before! so, you can not disband it

09 : Disband trap is away before supposed time

//////////////////////////////////////////////////////////////////////////////////////////

Note:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/trap_visit/disband" \
-H "Accept: application/json" \
    -d "visit_trap_id"="89926387" \
    -d "trap_id"="89926387" \
    -d "disband_date"="2013-03-04" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/trap_visit/disband",
    "method": "POST",
    "data": {
        "visit_trap_id": 89926387,
        "trap_id": 89926387,
        "disband_date": "2013-03-04"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/trap_visit/disband

Parameters

Parameter Type Status Description
visit_trap_id integer required
trap_id integer required
disband_date date required

Treatment Type

Controller to access data about TreatmentType

List of all TreatmentType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/treatment_type" \
-H "Accept: application/json" \
    -d "chunk"="et" \
    -d "page"="252601631" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/treatment_type",
    "method": "GET",
    "data": {
        "chunk": "et",
        "page": 252601631
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/treatment_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New TreatmentType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/treatment_type" \
-H "Accept: application/json" \
    -d "name"="nisi" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/treatment_type",
    "method": "POST",
    "data": {
        "name": "nisi"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/treatment_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected TreatmentType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/treatment_type/{treatment_type}

Update Selected TreatmentType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}" \
-H "Accept: application/json" \
    -d "name"="sit" \
    -d "desc"="sit" \
    -d "min_fine"="0" \
    -d "max_fine"="0" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}",
    "method": "PUT",
    "data": {
        "name": "sit",
        "desc": "sit",
        "min_fine": 0,
        "max_fine": 0
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/treatment_type/{treatment_type}

PATCH api/v1/treatment_type/{treatment_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191
desc string optional
min_fine integer required
max_fine integer required

Delete Selected TreatmentType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/treatment_type/{treatment_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/treatment_type/{treatment_type}

Verification

Controller to verify mobile numbers.

Check Mobile Number

This is the start request to check mobile number

//////////////////////////// Error Codes ////////////////////////////

00 : invalid node

01 : invalid type

02 : invalid api key

03 : invalid api key reference

04 : invalid reCaptcha response

05 : Mobile already verified

06 : SMS verification already sent

//////////////////////////////////////////////////////////////////////////////////////////

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/check/{node}/{type}" \
-H "Accept: application/json" \
    -d "g-recaptcha-response"="eaque" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/check/{node}/{type}",
    "method": "POST",
    "data": {
        "g-recaptcha-response": "eaque"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/check/{node}/{type}

Parameters

Parameter Type Status Description
g-recaptcha-response string required

Verify Mobile Number

This is the finalization the request to verify mobile number

//////////////////////////// Error Codes ////////////////////////////

00 : invalid node

01 : invalid type

02 : invalid api key

03 : invalid api key reference

04 : request token not found

05 : SMS code mismatch

//////////////////////////////////////////////////////////////////////////////////////////

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/verify/{node}/{type}" \
-H "Accept: application/json" \
    -d "token"="enim" \
    -d "code"="786" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/verify/{node}/{type}",
    "method": "POST",
    "data": {
        "token": "enim",
        "code": 786
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/verify/{node}/{type}

Parameters

Parameter Type Status Description
token string required
code integer required

Update Mobile Number

This is to update mobile number

//////////////////////////// Error Codes ////////////////////////////

00 : invalid node

01 : invalid type

02 : invalid api key

03 : invalid api key reference

04 : not allowed to update to the same mobile number

//////////////////////////////////////////////////////////////////////////////////////////

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/auth/update/{node}/{type}" \
-H "Accept: application/json" \
    -d "mobile"="magnam" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/auth/update/{node}/{type}",
    "method": "POST",
    "data": {
        "mobile": "magnam"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/auth/update/{node}/{type}

Parameters

Parameter Type Status Description
mobile string required

Violation Type

Controller to access data about Violation Type

List of all ViolationType

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/violation_type" \
-H "Accept: application/json" \
    -d "chunk"="reprehenderit" \
    -d "page"="7589" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/violation_type",
    "method": "GET",
    "data": {
        "chunk": "reprehenderit",
        "page": 7589
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/violation_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New ViolationType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/violation_type" \
-H "Accept: application/json" \
    -d "name"="rem" \
    -d "desc"="rem" \
    -d "min_fine"="12202" \
    -d "max_fine"="12202" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/violation_type",
    "method": "POST",
    "data": {
        "name": "rem",
        "desc": "rem",
        "min_fine": 12202,
        "max_fine": 12202
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/violation_type

Parameters

Parameter Type Status Description
name string required Maximum: 191
desc string optional
min_fine integer required
max_fine integer required

Show Selected ViolationType

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/violation_type/{violation_type}

Update Selected ViolationType

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}" \
-H "Accept: application/json" \
    -d "name"="dolore" \
    -d "desc"="dolore" \
    -d "min_fine"="886" \
    -d "max_fine"="886" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}",
    "method": "PUT",
    "data": {
        "name": "dolore",
        "desc": "dolore",
        "min_fine": 886,
        "max_fine": 886
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/violation_type/{violation_type}

PATCH api/v1/violation_type/{violation_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191
desc string optional
min_fine integer required
max_fine integer required

Delete Selected ViolationType

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/violation_type/{violation_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/violation_type/{violation_type}

Visit Reason Type

Controller to access data about Visit Reason Type

List of all Visit Reason Type

Output will be Paginated to 10 records per page per request.

Notes:

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/visit_reason_type" \
-H "Accept: application/json" \
    -d "chunk"="nemo" \
    -d "page"="977" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit_reason_type",
    "method": "GET",
    "data": {
        "chunk": "nemo",
        "page": 977
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/visit_reason_type

Parameters

Parameter Type Status Description
chunk string optional
page integer optional

Create New Visit Reason Type

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit_reason_type" \
-H "Accept: application/json" \
    -d "name"="quia" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit_reason_type",
    "method": "POST",
    "data": {
        "name": "quia"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit_reason_type

Parameters

Parameter Type Status Description
name string required Maximum: 191

Show Selected Visit Reason Type

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/visit_reason_type/{visit_reason_type}

Update Selected Visit Reason Type

Notes:

Example request:

curl -X PUT "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}" \
-H "Accept: application/json" \
    -d "name"="qui" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}",
    "method": "PUT",
    "data": {
        "name": "qui"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

PUT api/v1/visit_reason_type/{visit_reason_type}

PATCH api/v1/visit_reason_type/{visit_reason_type}

Parameters

Parameter Type Status Description
name string required Maximum: 191

Delete Selected Visit Reason Type

Notes:

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit_reason_type/{visit_reason_type}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/visit_reason_type/{visit_reason_type}

Visits

Controller to access data about visits

Search by id for house

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Bad house reference

03 : House not Found

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/citizen/visit/search/byID" \
-H "Accept: application/json" \
    -d "id"="5249" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/visit/search/byID",
    "method": "POST",
    "data": {
        "id": 5249
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/citizen/visit/search/byID

Parameters

Parameter Type Status Description
id integer required

Search by Stickers for available house

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Sticker not Found

03 : Sticker not belong to any house

04 : Sticker belongs to a closed house

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/citizen/visit/search/bySticker" \
-H "Accept: application/json" \
    -d "qrcode"="laborum" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/visit/search/bySticker",
    "method": "POST",
    "data": {
        "qrcode": "laborum"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/citizen/visit/search/bySticker

Parameters

Parameter Type Status Description
qrcode string required

Search by Text for available house

Output will be Paginated to 15 records per page per request.

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/citizen/visit/search/byText" \
-H "Accept: application/json" \
    -d "word"="ut" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/visit/search/byText",
    "method": "POST",
    "data": {
        "word": "ut"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/citizen/visit/search/byText

Parameters

Parameter Type Status Description
word string required

Search by GPS location for available house

Output will be Paginated to 15 records per page per request.

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/citizen/visit/search/byGPS" \
-H "Accept: application/json" \
    -d "latitude"="223798739" \
    -d "longitude"="223798739" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/citizen/visit/search/byGPS",
    "method": "POST",
    "data": {
        "latitude": 223798739,
        "longitude": 223798739
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/citizen/visit/search/byGPS

Parameters

Parameter Type Status Description
latitude numeric required
longitude numeric required

List of all Current Visits

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/check" \
-H "Accept: application/json" \
    -d "ignore"="non" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/check",
    "method": "POST",
    "data": {
        "ignore": "non"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/check

Parameters

Parameter Type Status Description
ignore array optional Must be an array

Send point of the visit

//////////////////////////// Error Codes ////////////////////////////

00 : This Data was sent before, operation canceled

00 : Person can not be identified

01 : Unknown Visit Record

02 : This visit already Acknowledged

03 : Device Type is Bad

04 : Larva Suspicion Image wrong args

05 : Larva Suspicion Reproduction Area Type is Missing

06 : Larva Suspicion Reproduction Area Type is Bad

07 : Item count is require when reproduction_area_type exists

08 : Larva Suspicion Image checks failed

09 : Larva Suspicion Image Hash Check Failed

10 : Larva Suspicion Combating Image wrong args

11 : Larva Suspicion Combating Treatment Type is Missing

12 : Larva Suspicion Combating Treatment Type is Bad

13 : Larva Suspicion Combating Image checks failed

14 : Larva Suspicion Combating Image Hash Check Failed

15 : Larva Suspicion for Unable to Combating Reason is Missing

16 : Preventive Treatment Type is Bad

17 : Preventive Monitoring Image checks failed

18 : Preventive Monitoring Image Hash Check Failed

19 : Awareness Type is Bad

20 : Awareness Monitoring Image checks failed

21 : Awareness Monitoring Image Hash Check Failed

22 : Larva Suspicion Image failed to save

23 : Larva Suspicion Combating Image failed to save

24 : Preventive Monitoring Image failed to save

25 : Awareness Monitoring Image failed to save

26 : Awareness Monitoring Image failed to save

//////////////////////////////////////////////////////////////////////////////////////////

Notes:

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/point" \
-H "Accept: application/json" \
    -d "visit_id"="66016114" \
    -d "sent_ref"="vero" \
    -d "larva_reproduction_area_type_id"="66016114" \
    -d "larva_reproduction_area_type_name"="vero" \
    -d "positive_count"="66016114" \
    -d "larva_suspicion_img"="vero" \
    -d "larva_suspicion_img_hash"="vero" \
    -d "is_combating_possible"="66016114" \
    -d "is_stray_dogs_works"="66016114" \
    -d "is_rodent_works"="66016114" \
    -d "larva_treatment_type_id"="66016114" \
    -d "larva_treatment_type_name"="vero" \
    -d "device_type_id"="66016114" \
    -d "device_type_name"="vero" \
    -d "item_count"="66016114" \
    -d "use_count"="66016114" \
    -d "larva_suspicion_combating_img"="vero" \
    -d "larva_suspicion_combating_img_hash"="vero" \
    -d "reason_combating_not_possible"="vero" \
    -d "preventive_treatment_type_id"="66016114" \
    -d "preventive_treatment_type_name"="vero" \
    -d "preventive_monitoring_img"="vero" \
    -d "preventive_monitoring_img_hash"="vero" \
    -d "awareness_type_id"="66016114" \
    -d "awareness_type_name"="vero" \
    -d "awareness_img"="vero" \
    -d "awareness_img_hash"="vero" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/point",
    "method": "POST",
    "data": {
        "visit_id": 66016114,
        "sent_ref": "vero",
        "larva_reproduction_area_type_id": 66016114,
        "larva_reproduction_area_type_name": "vero",
        "positive_count": 66016114,
        "larva_suspicion_img": "vero",
        "larva_suspicion_img_hash": "vero",
        "is_combating_possible": 66016114,
        "is_stray_dogs_works": 66016114,
        "is_rodent_works": 66016114,
        "larva_treatment_type_id": 66016114,
        "larva_treatment_type_name": "vero",
        "device_type_id": 66016114,
        "device_type_name": "vero",
        "item_count": 66016114,
        "use_count": 66016114,
        "larva_suspicion_combating_img": "vero",
        "larva_suspicion_combating_img_hash": "vero",
        "reason_combating_not_possible": "vero",
        "preventive_treatment_type_id": 66016114,
        "preventive_treatment_type_name": "vero",
        "preventive_monitoring_img": "vero",
        "preventive_monitoring_img_hash": "vero",
        "awareness_type_id": 66016114,
        "awareness_type_name": "vero",
        "awareness_img": "vero",
        "awareness_img_hash": "vero"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/point

Parameters

Parameter Type Status Description
visit_id integer required
sent_ref string required
larva_reproduction_area_type_id integer optional
larva_reproduction_area_type_name string optional
positive_count integer optional Required if the parameters larva_reproduction_area_type_id are present.
larva_suspicion_img string optional Required if the parameters larva_reproduction_area_type_id are present.
larva_suspicion_img_hash string optional Required if the parameters larva_suspicion_img are present.
is_combating_possible integer optional
is_stray_dogs_works integer optional
is_rodent_works integer optional
larva_treatment_type_id integer optional Required if is_combating_possible is 1
larva_treatment_type_name string optional
device_type_id integer optional
device_type_name string optional
item_count integer optional
use_count integer optional
larva_suspicion_combating_img string optional Required if larva_treatment_type_id is 1
larva_suspicion_combating_img_hash string optional Required if the parameters larva_suspicion_combating_img are present.
reason_combating_not_possible string optional Required if larva_treatment_type_id is 0
preventive_treatment_type_id integer optional
preventive_treatment_type_name string optional
preventive_monitoring_img string optional Required if the parameters preventive_treatment_type_id are present.
preventive_monitoring_img_hash string optional Required if the parameters preventive_treatment_type_id are present.
awareness_type_id integer optional
awareness_type_name string optional
awareness_img string optional
awareness_img_hash string optional Required if the parameters awareness_img are present.

Acknowledge for Visited house based on auto-generated plan.

//////////////////////////// Error Codes ////////////////////////////

00 : Person can not be identified

01 : Unknown Visit Record

02 : This visit already Acknowledged

03 : Visit Image checks failed

04 : Visit Image Hash Check Failed

05 : Visit Image failed to save

06 : Inaccessible flag is ON, with no reason supplied

07 : Unknown inaccessible visit reason type

08 : House not Found

09 : You should be nearly to the target house

10 : Unable to select an event date for new rescheduled visit

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/ack" \
-H "Accept: application/json" \
    -d "visit_id"="44" \
    -d "is_inaccessible"="44" \
    -d "visit_reason_type_id"="44" \
    -d "visit_reason_type_name"="magni" \
    -d "latitude"="44" \
    -d "longitude"="44" \
    -d "img"="magni" \
    -d "img_hash"="magni" \
    -d "start_date"="Wednesday, 31-Dec-69 03:00:00 +03" \
    -d "finish_date"="Thursday, 02-Jan-70 03:00:00 +03" \
    -d "notes"="magni" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/ack",
    "method": "POST",
    "data": {
        "visit_id": 44,
        "is_inaccessible": 44,
        "visit_reason_type_id": 44,
        "visit_reason_type_name": "magni",
        "latitude": 44,
        "longitude": 44,
        "img": "magni",
        "img_hash": "magni",
        "start_date": "Wednesday, 31-Dec-69 03:00:00 +03",
        "finish_date": "Thursday, 02-Jan-70 03:00:00 +03",
        "notes": "magni"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/ack

Parameters

Parameter Type Status Description
visit_id integer required
is_inaccessible integer optional
visit_reason_type_id integer optional Required if is_inaccessible is 1
visit_reason_type_name string optional
latitude numeric required
longitude numeric required
img string optional
img_hash string optional
start_date date required Must be a date preceding: finish_date
finish_date date required Must be a date after: start_date
notes string optional

Search by id for house

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Bad house reference

03 : House not Found

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/search/byID" \
-H "Accept: application/json" \
    -d "id"="1631" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/search/byID",
    "method": "POST",
    "data": {
        "id": 1631
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/search/byID

Parameters

Parameter Type Status Description
id integer required

Search by Stickers for available house

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Sticker not Found

03 : Sticker not belong to any house

04 : Sticker belongs to a closed house

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/search/bySticker" \
-H "Accept: application/json" \
    -d "qrcode"="praesentium" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/search/bySticker",
    "method": "POST",
    "data": {
        "qrcode": "praesentium"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/search/bySticker

Parameters

Parameter Type Status Description
qrcode string required

Search by Text for available house

Output will be Paginated to 15 records per page per request.

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/search/byText" \
-H "Accept: application/json" \
    -d "word"="rerum" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/search/byText",
    "method": "POST",
    "data": {
        "word": "rerum"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/search/byText

Parameters

Parameter Type Status Description
word string required

Search by GPS location for available house

Output will be Paginated to 15 records per page per request.

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/search/byGPS" \
-H "Accept: application/json" \
    -d "latitude"="94" \
    -d "longitude"="94" \
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/search/byGPS",
    "method": "POST",
    "data": {
        "latitude": 94,
        "longitude": 94
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/search/byGPS

Parameters

Parameter Type Status Description
latitude numeric required
longitude numeric required

Create new Visit for specific house by its reference or by sticker code

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : house not Found

03 : house is closed

04 : Sticker not Found

05 : The sticker does not belong to any house

06 : not allowed to add multiple visits to one house on the same day

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/visit/make/{house}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/make/{house}",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/visit/make/{house}

Show Visit record

//////////////////////////// Error Codes ////////////////////////////

00 : Unable to resolve person data

01 : You're not belong to any team

02 : Visit not Found

03 : This Visit is not associated with any house

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/visit/{visit}/show" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/{visit}/show",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/visit/{visit}/show

Delete Visits created by Oberver

//////////////////////////// Error Codes ////////////////////////////

00 : Visit not Found

01 : Visit is created by another person

02 : Visit is scheduled and not manually created

03 : This visit has some connections with other data

04 : Visit is Genesis One, can not be deleted

05 : Visit is already done

//////////////////////////////////////////////////////////////////////////////////////////

Note: This call requires an authentication header token(X-Auth-Token & X-Auth-EndPoint).

Example request:

curl -X DELETE "https://kafeh-jazan.com/api/v1/visit/{visit}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/visit/{visit}",
    "method": "DELETE",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

DELETE api/v1/visit/{visit}

general

api/v1/report/check/{uuid}/{time}

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/report/check/{uuid}/{time}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/report/check/{uuid}/{time}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/report/check/{uuid}/{time}

api/v1/sticker/check/{uuid}/{time}

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/sticker/check/{uuid}/{time}" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/sticker/check/{uuid}/{time}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/sticker/check/{uuid}/{time}

api/v1/report

Example request:

curl -X POST "https://kafeh-jazan.com/api/v1/report" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/report",
    "method": "POST",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

HTTP Request

POST api/v1/report

api/v1/report

Example request:

curl -X GET "https://kafeh-jazan.com/api/v1/report" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://kafeh-jazan.com/api/v1/report",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

Example response:

null

HTTP Request

GET api/v1/report