MEMBERSHIP
Welcome to Rizrv ! To get characters you need to make a call to the following url :
GET ALL MEMBERSHIP
GEThttps://apis.rizrv.in/api/membership
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/membership");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
Welcome to Rizrv ! To get Single MEMBERSHIP data you need to make a GET call to the following url ::
GET SINGLES MEMBERSHIP
GEThttps://apis.rizrv.in/api/membership/show/MEMBERSHIP_ID
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://rizrv.in/api/membership/show/MEMBERSHIP_ID");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'GET' );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
{
"status": 200,
"message": "success",
"membership": {
"id": 2,
"name": "Basic",
"description": "asdfadsfasdfasdfasdfasdfasdfasd",
"price": 2400,
"image": "http://127.0.0.1:8000/images/membership/1691581981img.png",
"created_at": "2023-08-09T11:53:01.000000Z",
"updated_at": "2023-08-09T11:53:01.000000Z"
}
}
Welcome to Rizrv ! To add new MEMBERSHIP call to the following url :
MEMBERSHIP DATE STORE
POSThttps://apis.rizrv.in/api/membership/store
Parameter
Field
|
Type
|
name
|
String
|
description
|
String
|
images
|
File
|
price
|
Double
|
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/membership/store");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS,$_POST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
{
"status": 200,
"message": "success",
"membership": {
"name": "Basic",
"description": "asdfadsfasdfasdfasdfasdfasdfasd",
"price": "2400",
"image": "http://127.0.0.1:8000/images/membership/1691581981img.png",
"updated_at": "2023-08-09T11:53:01.000000Z",
"created_at": "2023-08-09T11:53:01.000000Z",
"id": 2
}
}
Welcome to Rizrv ! To update membership call to the following url using POST Method:
MEMBERSHIP UPDATE
POSThttps://apis.rizrv.in/api/membership/update/MEMBERSHIP_ID
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/membership/update/MEMBERSHIP_ID");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
{
"status": 200,
"message": "Success",
"role": {
"name": "user123",
"slug": "user123",
"description": "welcomesf",
"updated_at": "2023-08-17T10:23:28.000000Z",
"created_at": "2023-08-17T10:23:28.000000Z",
"id": 8
}
}
Welcome to Rizrv !To delete MEMBERSHIP call to the following url using DELETE Method:
MEMBERSHIP DELETE
DELETEhttps://apis.rizrv.in/api/membership/delete/MEMBERSHIP_ID
Use LARAVEL cURL
$token = "USER_AUTH_TOKEN";
$ch = curl_init();
$header = array();
$header[] = 'Content-length: 0';
$header[] = 'Content-type: application/json';
$header[] = 'Authorization: Bearer '. $token;
curl_setopt($ch, CURLOPT_URL,"https://apis.rizrv.in/api/membership/delete/MEMBERSHIP_ID");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
$response = json_decode($server_output, true);
if ($response) { ... } else { ... }
{
"status": 200,
"message": "Deleted"
}