RizrvDoc

Did You Know?

CATEGORY

Welcome to Rizrv ! To get characters you need to make a call to the following url :

GET ALL CATEGORY

GEThttps://apis.rizrv.in/api/services/category/

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/services/category/");
                                             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",
  "categories": [
      {
          "id": 1,
          "name": "electronic",
          "description": "Loren Ipsumn",
          "status": "1",
          "parent": "1",
          "image": "services/categories/1692858097category.png",
          "created_at": "2023-08-08T11:22:01.000000Z",
          "updated_at": "2023-08-08T12:09:20.000000Z",
      }
  ]
}
                           

Welcome to Rizrv ! To add new Category call to the following url :

CATEGORY DATE STORE

POSThttps://apis.rizrv.in/api/services/category/store

Parameter

Field Type

name

String

image

String

description

String

parent_id

else null

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/services/category/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",
    "category": {
        "name": "demo",
        "description": "sfsdfsdfsdfsdfsdfd",
        "status": 1,
        "parent": null,
        "image": "services/categories/1692858097category.png",
        "updated_at": "2023-08-24T06:21:37.000000Z",
        "created_at": "2023-08-24T06:21:37.000000Z",
        "id": 1
    }
}
                              

Welcome to Rizrv ! To update Category call to the following url using POST Method:

CATEGORY UPDATE

POSThttps://apis.rizrv.in/api/services/category/update/{id}

Parameter

Field Type

name

String

image

String

description

String

parent_id

else null

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/services/category/update/{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": "updated",
    "category": {
        "id": 23,
        "name": "Welcome To Rizrv",
        "description": "welcome to Rizrv panel",
        "image": "services/categories/1692870147category.png",
        "status": 1,
        "parent": null,
        "created_at": "2023-08-24T08:38:33.000000Z",
        "updated_at": "2023-08-24T09:42:27.000000Z"
    }
}
                                     

Welcome to Rizrv !To delete CATEGORY call to the following url using DELETE Method:

CATEGORY DELETE

DELETEhttps://apis.rizrv.in/api/services/category/destroy/{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/services/category/destroy/{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"
}