API Pilot Training Portal

Learn CRUD APIs with Authentication, Payloads, Live Testing, Insurance APIs and Banking APIs

Authentication

Bearer Token

apipilot_secure_token_2026

Basic Login

Username: admin
Password: admin123
GET

Fetch API Data

Waiting for response...
POST

Create Request

{
  "project_id": 1,
  "collection_id": 1,
  "request_name": "Create User API",
  "endpoint_url": "https://example.com/api/users",
  "http_method": "POST",
  "request_headers": "{\"Content-Type\":\"application/json\"}",
  "request_body": "{\"name\":\"John\",\"email\":\"john@example.com\"}",
  "response_body": "{\"status\":\"success\"}",
  "file_type": "json",
  "tags": "users,create"
}
Waiting for response...
PUT

Update Request

{
  "project_id": 1,
  "collection_id": 1,
  "request_name": "Updated Login API",
  "endpoint_url": "https://example.com/api/v2/login",
  "http_method": "POST",
  "request_headers": "{\"Content-Type\":\"application/json\"}",
  "request_body": "{\"email\":\"admin@apipilot.com\",\"password\":\"newpassword\"}",
  "response_body": "{\"status\":\"updated\"}",
  "file_type": "json",
  "tags": "auth,login,updated"
}
Waiting for response...
PATCH

Patch Request

{
  "request_name": "Patched Login API",
  "tags": "patched,auth"
}
Waiting for response...
DELETE

Delete Request

Waiting for response...

Insurance API Authorization

Bearer Token

Bearer apipilot_secure_token_2026

Basic Credentials

Username: admin
Password: admin123

Insurance API Endpoints

GET    https://apipilot.co.in/InsuranceAPI.php
POST   https://apipilot.co.in/InsuranceAPI.php
PUT    https://apipilot.co.in/InsuranceAPI.php?id=1
PATCH  https://apipilot.co.in/InsuranceAPI.php?id=1
DELETE https://apipilot.co.in/InsuranceAPI.php?id=1

Common Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer apipilot_secure_token_2026"
}
GET

GET Insurance Policies

Headers

{
  "Authorization": "Bearer apipilot_secure_token_2026"
}

GET Single Policy

https://apipilot.co.in/InsuranceAPI.php?id=1

Test Validation

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Response is valid JSON", function () {
    pm.response.json();
});

pm.test("Response time is less than 3 seconds", function () {
    pm.expect(pm.response.responseTime).to.be.below(3000);
});
POST

POST Insurance Policy

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer apipilot_secure_token_2026"
}

Request Payload

{
  "policy_id": 1001,
  "customer_name": "John Doe",
  "customer_email": "john@example.com",
  "mobile_number": "9876543210",
  "insurance_type": "Health Insurance",
  "policy_number": "HLT-2026-1001",
  "premium_amount": 25000,
  "sum_insured": 500000,
  "policy_start_date": "2026-01-01",
  "policy_end_date": "2027-01-01",
  "policy_status": "Active"
}

Generate Unique Policy Number using Pre-requisit script

Pre-Requisit Script

{
const policyId = Math.floor(100000 + Math.random() * 900000);

pm.environment.set("policy_id", policyId);
pm.environment.set("policy_number", `HLT-2026-${policyId}`);

}

Request Body

{
  "policy_id": "{{policy_id}}",
  "customer_name": "John Hunt",
  "customer_email": "john@example.com",
  "mobile_number": "9876543210",
  "insurance_type": "Health Insurance",
  "policy_number": "{{policy_number}}",
  "premium_amount": "32000.00",
  "sum_insured": "500000.00",
  "policy_start_date": "2026-01-01",
  "policy_end_date": "2027-01-01",
  "policy_status": "Active",
  "created_at": "2026-05-30 13:16:39"

}

Response Body

{
  "id": "9",
  "policy_id": "229001",
  "customer_name": "John Hunt",
  "customer_email": "john@example.com",
  "mobile_number": "9876543210",
  "insurance_type": "Health Insurance",
  "policy_number": "HLT-2026-229001",
  "premium_amount": "32000.00",
  "sum_insured": "500000.00",
  "policy_start_date": "2026-01-01",
  "policy_end_date": "2027-01-01",
  "policy_status": "Active",
  "created_at": "2026-05-30 14:23:57"

}

Test Validation

pm.test("Status code is 200 or 201", function () {
    pm.expect(pm.response.code).to.be.oneOf([200, 201]);
});

pm.test("Policy created successfully", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.status).to.eql("success");
});

pm.test("Response contains policy id", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.policy_id).to.exist;
});
PUT

PUT Insurance Policy

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer apipilot_secure_token_2026"
}

Request Payload

{
  "customer_name": "John Updated",
  "premium_amount": 30000,
  "sum_insured": 750000,
  "policy_status": "Renewed"
}

Test Validation

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Policy updated successfully", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.status).to.eql("success");
});

pm.test("Update message exists", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.message).to.include("updated");
});
PATCH

PATCH Insurance Policy

Headers

{
  "Content-Type": "application/json",
  "Authorization": "Bearer apipilot_secure_token_2026"
}

Request Payload

{
  "policy_status": "Expired",
  "premium_amount": 32000
}

Test Validation

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Patch successful", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.status).to.eql("success");
});

pm.test("Patch response contains message", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.message).to.exist;
});
DELETE

DELETE Insurance Policy

Headers

{
  "Authorization": "Bearer apipilot_secure_token_2026"
}

Test Validation

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Policy deleted successfully", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.status).to.eql("success");
});

pm.test("Delete message exists", function () {
    const jsonData = pm.response.json();

    pm.expect(jsonData.message).to.include("deleted");
});

Banking API Authorization

Bearer apipilot_secure_token_2026

Banking API Endpoints

GET    https://apipilot.co.in/BankingAPI.php
POST   https://apipilot.co.in/BankingAPI.php
PUT    https://apipilot.co.in/BankingAPI.php?id=1
PATCH  https://apipilot.co.in/BankingAPI.php?id=1
DELETE https://apipilot.co.in/BankingAPI.php?id=1
GET

GET Bank Accounts

GET https://apipilot.co.in/BankingAPI.php

GET https://apipilot.co.in/BankingAPI.php?id=1

Test Validation

pm.test("Account Created", function () {
    pm.expect([200, 201]).to.include(pm.response.code);
});

POST

Create Bank Account

Request Body

{

  "account_id": "{{account_id}}",
  "customer_name": "John Smith",
  "email": "john@gmail.com",
  "mobile_number": "9876543210",
  "account_type": "Savings",
  "account_number": "{{account_number}}",
  "branch_name": "Mumbai Main Branch",
  "ifsc_code": "SBIN0001234",
  "balance": "50000",
  "status": "Active"
}

Pre-Requisite Script

const accountId = Date.now();
const accountNumber = `${Date.now()}${Math.floor(Math.random() * 10000)}`;

pm.environment.set("account_id", accountId);
pm.environment.set("account_number", accountNumber);

console.log("Saved account_id:", pm.environment.get("account_id"));
console.log("Saved account_number:", pm.environment.get("account_number"));

Environment Variable

{
  "account_id": "{{account_id}}",
  "account_number": "{{account_number}}"
}

Response Example


{
  "id": 6,
  "account_id": "859786",
  "customer_name": "John Smith",
  "email": "john@gmail.com",
  "mobile_number": "9876543210",
  "account_type": "Savings",
  "account_number": "4709271083",
  "branch_name": "Mumbai Main Branch",
  "ifsc_code": "SBIN0001234",
  "balance": "50000.00",
  "status": "Active",
  "created_at": "2026-05-31 00:09:12",
  "updated_at": "2026-05-31 00:09:12"
}

Test Validation

pm.test("Account Created", function () {
    pm.expect([200, 201]).to.include(pm.response.code);
});

pm.test("Account ID exists", () => {

    pm.expect(
      String(pm.response.account_id)
    ).to.eql(
      String(
        pm.environment.get("account_id")
      )
    );

});
pm.test("Customer Name is correct", () => {
    pm.expect(pm.response.customer_name)
      .to.eql("John Smith");
});

pm.test("Email is correct", () => {
    pm.expect(pm.response.email)
      .to.eql("john@gmail.com");
});

pm.test("Mobile Number is correct", () => {
    pm.expect(pm.response.mobile_number)
      .to.eql("9876543210");
});

pm.test("Account Type is Savings", () => {
    pm.expect(pm.response.account_type)
      .to.eql("Savings");
});

pm.test("Account Number is correct", () => {
    pm.expect(pm.response.account_number)
      .to.eql(pm.environment.get("account_number"));
});

pm.test("Branch Name is correct", () => {
    pm.expect(pm.response.branch_name)
      .to.eql("Mumbai Main Branch");
});

pm.test("IFSC Code is correct", () => {
    pm.expect(pm.response.ifsc_code)
      .to.eql("SBIN0001234");
});

pm.test("Balance is correct", () => {

    pm.expect(
      Number(pm.response.balance)
    ).to.eql(50000);

});

pm.test("Account Status is Active", () => {
    pm.expect(responseData.status)
      .to.eql("Active");
});
PUT

Update Account

Request Body

{
  "customer_name":"John Updated",
  "balance":"75000",
  "status":"Updated"
}

Test Validation

pm.test("Update Successful", function () {

    const jsonData =
    pm.response.json();

    pm.expect(
      jsonData.status
    ).to.eql("success");

});
PATCH

Patch Account

Request Body

{
  "balance":"100000"
}

Test Validation

pm.test("Patch Successful", function () {

    pm.response.to.have.status(200);

});
DELETE

Delete Account

DELETE https://apipilot.co.in/BankingAPI.php?id=1

Test Validation

pm.test("Delete Successful", function () {

    const jsonData =
    pm.response.json();

    pm.expect(
      jsonData.status
    ).to.eql("success");

});

E-Commerce API Authorization

Bearer apipilot_secure_token_2026

E-Commerce API Endpoints

GET    https://apipilot.co.in/EcommerceAPI.php
POST   https://apipilot.co.in/EcommerceAPI.php
PUT    https://apipilot.co.in/EcommerceAPI.php?id=1
PATCH  https://apipilot.co.in/EcommerceAPI.php?id=1
DELETE https://apipilot.co.in/EcommerceAPI.php?id=1
GET

GET Order Details

GET https://apipilot.co.in/EcommerceAPI.php

GET https://apipilot.co.in/EcommerceAPI.php?id=1

Test Validation

pm.test("Status Code 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Response is JSON", function () {
    pm.response.json();
});
POST

Place Order

Request Body


  {
  "order_id": "{{order_id}}",
  "customer_name": "John Smith",
  "customer_email": "john@gmail.com",
  "mobile_number": "9876543210",
  "product_name": "Apple iPhone 15",
  "product_sku": "{{sku}}",
  "quantity": 2,
  "price": 79999,
  "total_amount": 159998,
  "payment_status": "Paid",
  "order_status": "Processing"
}

Pre-Requisite Script

const orderId =
Math.floor(100000 + Math.random() * 900000);

pm.environment.set(
    "order_id",
    `ORD-${orderId}`
);

pm.environment.set(
    "sku",
    `SKU-${orderId}`
);

Response Example

{
  "id": "1",
  "order_id": "ORD-456782",
  "customer_name": "John Smith",
  "customer_email": "john@gmail.com",
  "mobile_number": "9876543210",
  "product_name": "Apple iPhone 15",
  "product_sku": "SKU-456782",
  "quantity": "2",
  "price": "79999.00",
  "total_amount": "159998.00",
  "payment_status": "Paid",
  "order_status": "Processing",
  "created_at": "2026-05-31 10:30:00",
  "updated_at": "2026-05-31 10:30:00"
}

Test Validation

pm.test("Account Created", function () {

    pm.expect(
        pm.response.code === 200 ||
        pm.response.code === 201
    ).to.be.true;

});

PUT

Update Order

Request Body

{
  "customer_name": "John Updated",
  "quantity": 3,
  "price": 85000,
  "total_amount": 255000,
  "payment_status": "Paid",
  "order_status": "Shipped"
}

Test Validation

pm.test("Order Updated", function () {

    pm.response.to.have.status(200);

});
PATCH

Patch Account

Request Body

{
  "order_status": "Delivered"
}

Test Validation

pm.test("Patch Successful", function () {

    pm.response.to.have.status(200);

});
DELETE

Delete Order

DELETE https://apipilot.co.in/EcommerceAPI.php?id=1

Test Validation

pm.test("Delete Successful", function () {

    const jsonData =
    pm.response.json();

    pm.expect(
        jsonData.status
    ).to.eql("success");

});

E-Commerce API Authorization

Bearer apipilot_secure_token_2026

Products Endpoints

GET    https://apipilot.co.in/ProductsAPI.php
GET    https://apipilot.co.in/ProductsAPI.php?id=1
POST   https://apipilot.co.in/ProductsAPI.php
PUT    https://apipilot.co.in/ProductsAPI.php?id=1
PATCH  https://apipilot.co.in/ProductsAPI.php?id=1
DELETE https://apipilot.co.in/ProductsAPI.php?id=1
GET

GET Products Details

GET  https://apipilot.co.in/ProductsAPI.php

GET https://apipilot.co.in/ProductsAPI.php?id=1

Test Validation

pm.test("Status Code 200", function () {
    pm.response.to.have.status(200);
});

pm.test("Response is JSON", function () {
    pm.response.json();
});
POST

Place Order

Request Body


  {
  "product_id": "{{product_id}}",
  "product_name": "Apple iPhone 16",
  "category": "Mobile",
  "brand": "Apple",
  "sku": "{{sku}}",
  "price": "79999.00",
  "stock_quantity": 50,
  "product_status": "Active"
}

Pre-Requisite Script

const orderId =
Math.floor(100000 + Math.random() * 900000);

pm.environment.set(
    "order_id",
    `ORD-${orderId}`
);

pm.environment.set(
    "sku",
    `SKU-${orderId}`
);

Product Response

{
  "id": "1",
  "product_id": "456782",
  "product_name": "Apple iPhone 16",
  "category": "Mobile",
  "brand": "Apple",
  "sku": "SKU-987654",
  "price": "79999.00",
  "stock_quantity": "50",
  "product_status": "Active",
  "created_at": "2026-05-31 10:15:00",
  "updated_at": "2026-05-31 10:15:00"
}

Test Validation

pm.test("Account Created", function () {

    pm.expect(
        pm.response.code === 200 ||
        pm.response.code === 201
    ).to.be.true;

});

PUT

Update Product

Request Body

{
  "product_name": "Apple iPhone 16 Pro",
  "price": "89999.00",
  "stock_quantity": 100,
  "product_status": "Updated"
}

Test Validation

pm.test("Update Successful", function () {

    var jsonData =
    pm.response.json();

    pm.expect(
        jsonData.status
    ).to.eql("success");

});
PATCH

Patch Product

Request Body

{
  "stock_quantity": 75
}

Test Validation

pm.test("Patch Successful", function () {

    pm.response.to.have.status(200);

});
DELETE

Delete Product

DELETE https://apipilot.co.in/ProductsAPI.php?id=1

Test Validation

pm.test("Delete Successful", function () {

    const jsonData =
    pm.response.json();

    pm.expect(
        jsonData.status
    ).to.eql("success");

});