NAV
bash javascript

Info

Welcome to the Ensuria API reference. Get Postman Collection

Appointment

Store a newly created resource in storage.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/compensation" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"eos"}'
const url = new URL(
    "https://app.ensuria.com/api/compensation"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "eos"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/compensation

Body Parameters

Parameter Type Status Description
rating numeric optional nullable Rating left by user for clinic appointment.

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/compensation" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/compensation"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": null,
        "created_at": null,
        "updated_at": null,
        "status": null,
        "user_id": null,
        "policy_id": null,
        "comment": null,
        "price": null,
        "price_pay": null,
        "inn": null,
        "iban": null,
        "compensation_categories_id": null,
        "description": null,
        "comment_admin": null,
        "date_compensation": null,
        "date_status": null
    }
}

HTTP Request

GET api/compensation

Send confirm sms via given phone number.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/compensation/send" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/compensation/send"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/compensation/send

Get a JWT via given credentials.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/compensation/confirm" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"confirm_code":"1111"}'
const url = new URL(
    "https://app.ensuria.com/api/compensation/confirm"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "confirm_code": "1111"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/compensation/confirm

Body Parameters

Parameter Type Status Description
confirm_code numeric required The confirm code of phone received via message.

Get all Specialist.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/specialists" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/specialists"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/specialists

Get user's Appointment with status NULL


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/appointments" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/appointments"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/appointments

Store a newly created resource in storage.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/appointment" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"vel"}'
const url = new URL(
    "https://app.ensuria.com/api/appointment"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "vel"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/appointment

Body Parameters

Parameter Type Status Description
rating numeric optional nullable Rating left by user for clinic appointment.

Auth

Send confirm sms via given phone number.

Example request:

curl -X POST \
    "https://app.ensuria.com/api/auth/send" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"phone":"380440000000"}'
const url = new URL(
    "https://app.ensuria.com/api/auth/send"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "380440000000"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/auth/send

Body Parameters

Parameter Type Status Description
phone numeric required The phone of the user.

Get a JWT via given credentials.

Example request:

curl -X POST \
    "https://app.ensuria.com/api/auth/login" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"phone":"380440000000","confirm_code":"1111"}'
const url = new URL(
    "https://app.ensuria.com/api/auth/login"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "380440000000",
    "confirm_code": "1111"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYXBwLmVuc3VyaWEuY29tIiwiaWF0IjoxNjM3MTY4MjQyLCJleHAiOjE2Njg3MDQyNDIsIm5iZiI6MTYzNzE2ODI0MiwianRpIjoiVlFYRk54NzIybWxGR2hWUyIsInN1YiI6bnVsbCwicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.y-uAyyFrUJbL6I5fivD4fPI5TuQ1nDz7BLHLbsAhVRI",
        "token_type": "bearer",
        "expires_in": 31536000
    }
}

HTTP Request

POST api/auth/login

Body Parameters

Parameter Type Status Description
phone numeric required The phone of the user.
confirm_code numeric required The confirm code of phone received via message.

Accept Terms and Conditions policy.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/auth/accept" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/auth/accept"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/auth/accept

Log the user out (Invalidate the token).


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/auth/logout" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/auth/logout"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/auth/logout

Clinic

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/clinics?policyId=consequatur&latitude=voluptatibus&longitude=reprehenderit&radius=laborum&search=quod" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/clinics"
);

let params = {
    "policyId": "consequatur",
    "latitude": "voluptatibus",
    "longitude": "reprehenderit",
    "radius": "laborum",
    "search": "quod",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/clinics

Query Parameters

Parameter Status Description
policyId optional string required Policy to get clinic coverages for.
latitude optional string required Latitude location of user.
longitude optional string required Longitude location of user.
radius optional string Radius to get clinics within.
search optional string Search string for clinics search.

Display a clinic of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/clinic?policyId=placeat&clinicId=quibusdam" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/clinic"
);

let params = {
    "policyId": "placeat",
    "clinicId": "quibusdam",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/clinic

Query Parameters

Parameter Status Description
policyId optional string required Policy to get clinic coverages for.
clinicId optional string required Clinic id.

ClinicCategory

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/categories" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/categories"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": null,
        "title": ""
    }
}

HTTP Request

GET api/categories

CompensationCategory

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/compensation-categories" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/compensation-categories"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": null,
        "title": ""
    }
}

HTTP Request

GET api/compensation-categories

Faq

Get user faqs.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/faqs" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/faqs"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/faqs

Feature

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/features" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/features"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": null,
        "title": null,
        "code": null,
        "active": null
    }
}

HTTP Request

GET api/features

General

Display the specified resource.

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/information/1" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://app.ensuria.com/api/information/1"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/information/{type}

Registration for CourierServices.

Example request:

curl -X POST \
    "https://app.ensuria.com/api/auth/courier" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"phone":"380440000000","name":"1111"}'
const url = new URL(
    "https://app.ensuria.com/api/auth/courier"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "phone": "380440000000",
    "name": "1111"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/auth/courier

Body Parameters

Parameter Type Status Description
phone numeric required The phone of the user.
name string required The confirm code of phone received via message.

Store a newly created resource in storage.

Example request:

curl -X POST \
    "https://app.ensuria.com/api/contact-log" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"policy_id":"a","contact_type":"et"}'
const url = new URL(
    "https://app.ensuria.com/api/contact-log"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "policy_id": "a",
    "contact_type": "et"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/contact-log

Body Parameters

Parameter Type Status Description
policy_id numeric optional nullable Policy that user initiated contact from.
contact_type string required Type of contact that user initiated.

Get user's ContactLog with type plan

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/contact-logs" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
const url = new URL(
    "https://app.ensuria.com/api/contact-logs"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/contact-logs

Update ContactLog with type plan.

Example request:

curl -X PUT \
    "https://app.ensuria.com/api/contact-log/update" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"log_id":"quia","response":"molestiae","rating":"et"}'
const url = new URL(
    "https://app.ensuria.com/api/contact-log/update"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "log_id": "quia",
    "response": "molestiae",
    "rating": "et"
}

fetch(url, {
    method: "PUT",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

PUT api/contact-log/update

Body Parameters

Parameter Type Status Description
log_id numeric optional ContactLog that user initiated contact from.
response string optional comments form client.
rating numeric optional rating from client.

NewsPost

Get user's news


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/news" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/news"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "data": {
        "id": null,
        "title": "",
        "subtitle": "",
        "text": "",
        "status": null,
        "publish_at": null,
        "important": null
    }
}

HTTP Request

GET api/news

Policy

Get user policies.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/policies" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/policies"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/policies

Get user policies.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/policies/all" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/policies/all"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/policies/all

Display a listing of the resource.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/policy?policyId=provident&latitude=accusantium&longitude=voluptatem&radius=aut&search=quaerat" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/policy"
);

let params = {
    "policyId": "provident",
    "latitude": "accusantium",
    "longitude": "voluptatem",
    "radius": "aut",
    "search": "quaerat",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/policy

Query Parameters

Parameter Status Description
policyId optional string required Policy to get clinic coverages for.
latitude optional string required Latitude location of user.
longitude optional string required Longitude location of user.
radius optional string Radius to get clinics within.
search optional string Search string for clinics search.

RiderOrder

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/rider/programs" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/rider/programs"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/rider/programs

Display a listing of the resource.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/rider/transports" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/rider/transports"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/rider/transports

Registration for CourierServices.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/order" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"phone":"380440000000","name":"1111"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/order"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "phone": "380440000000",
    "name": "1111"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/order

Body Parameters

Parameter Type Status Description
phone numeric required The phone of the user.
name string required The confirm code of phone received via message.

Send confirm sms via given phone number.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/send" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/rider/send"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/send

–°onfirm sms via given phone number.


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/confirm" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"confirm_code":"1111"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/confirm"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "confirm_code": "1111"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/confirm

Body Parameters

Parameter Type Status Description
confirm_code numeric required The confirm code of phone received via message.

Get subscribe params from application


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/unsubscribe" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"maiores"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/unsubscribe"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "maiores"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/unsubscribe

Body Parameters

Parameter Type Status Description
rating numeric optional Policy and params for policy subscribe.

Get check subscribed


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/check" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"qui"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/check"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "qui"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/check

Body Parameters

Parameter Type Status Description
rating numeric optional Policy and params for policy subscribe.

deactivate policy


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/rider/deactivate" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"totam"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/deactivate"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "totam"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/rider/deactivate

Body Parameters

Parameter Type Status Description
rating numeric optional Policy and params for policy subscribe.

Get subscribe params from application


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/rider/subscribe" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"rating":"placeat"}'
const url = new URL(
    "https://app.ensuria.com/api/rider/subscribe"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "rating": "placeat"
}

fetch(url, {
    method: "GET",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/rider/subscribe

Body Parameters

Parameter Type Status Description
rating numeric optional Policy and params for policy subscribe.

api/payment/callback


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/payment/callback" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/payment/callback"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "POST",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/payment/callback

Get cbSuccess


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/payment/cb/success" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/payment/cb/success"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{}

HTTP Request

GET api/payment/cb/success

User

Get the authenticated User.


Requires authentication

Example request:

curl -X GET \
    -G "https://app.ensuria.com/api/user" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}"
const url = new URL(
    "https://app.ensuria.com/api/user"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

GET api/user

api/user/update


Requires authentication

Example request:

curl -X POST \
    "https://app.ensuria.com/api/user/update" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer {token}" \
    -d '{"name":"Test User"}'
const url = new URL(
    "https://app.ensuria.com/api/user/update"
);

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Bearer {token}",
};

let body = {
    "name": "Test User"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

HTTP Request

POST api/user/update

Body Parameters

Parameter Type Status Description
name string required The name of the user.