Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
328 changes: 328 additions & 0 deletions postman/API Factory.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
{
"info": {
"_postman_id": "f29da718-adc9-4c4b-b45a-8065d2602e07",
"name": "API Factory",
"description": "Insurance Management API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "31283114",
"_collection_link": "https://letsprintswiss.postman.co/workspace/LetsPrintSwiss-Workspace~a8d98193-e8c7-4b0e-bd49-ac89d7873836/collection/31283114-f29da718-adc9-4c4b-b45a-8065d2602e07?action=share&source=collection_link&creator=31283114"
},
"item": [
{
"name": "Clients",
"item": [
{
"name": "Create Person",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Jean Dupont\",\n \"phone\": \"+41781234567\",\n \"email\": \"jean.dupont@example.com\",\n \"birthDate\": \"1985-03-15\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/clients/person",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"person"
]
}
},
"response": []
},
{
"name": "Create Company",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Tech Solutions SA\",\n \"phone\": \"+41787654321\",\n \"email\": \"contact@techsolutions.ch\",\n \"identifier\": \"TEC-123\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/clients/company",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"company"
]
}
},
"response": []
},
{
"name": "Get All Clients",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/clients",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients"
]
}
},
"response": []
},
{
"name": "Get Client by ID",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/clients/1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"1"
]
}
},
"response": []
},
{
"name": "Update Person",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Jean Dupont Updated\",\n \"phone\": \"+41781234568\",\n \"email\": \"jean.dupont.updated@example.com\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/clients/person/1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"person",
"1"
]
}
},
"response": []
},
{
"name": "Update Company",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Tech Solutions SA Updated\",\n \"phone\": \"+41787654322\",\n \"email\": \"contact.updated@techsolutions.ch\"\n}"
},
"url": {
"raw": "{{baseUrl}}/api/clients/company/2",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"company",
"2"
]
}
},
"response": []
},
{
"name": "Delete Client",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/clients/1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"1"
]
}
},
"response": []
},
{
"name": "Get Client Contracts",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/clients/1/contracts",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"1",
"contracts"
]
}
},
"response": []
},
{
"name": "Get Client Contracts (Filtered by Date)",
"request": {
"method": "GET",
"header": [
{
"key": "",
"value": "",
"type": "text",
"disabled": true
}
],
"url": {
"raw": "{{baseUrl}}/api/clients/2/contracts?updatedAfter=2025-10-21T00:00:00",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"2",
"contracts"
],
"query": [
{
"key": "updatedAfter",
"value": "2025-10-21T00:00:00"
}
]
}
},
"response": []
},
{
"name": "Get Client Contracts Sum",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/clients/1/contracts/sum",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"clients",
"1",
"contracts",
"sum"
]
}
},
"response": []
}
]
},
{
"name": "Contracts",
"item": [
{
"name": "Create Contract",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"clientId\": 1,\n \"startDate\": \"2024-01-01T00:00:00\",\n \"endDate\": \"2024-12-31T23:59:59\",\n \"costAmount\": 1200.00\n}"
},
"url": {
"raw": "{{baseUrl}}/api/contracts",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"contracts"
]
}
},
"response": []
},
{
"name": "Update Contract Cost",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"costAmount\": 1500.00\n}"
},
"url": {
"raw": "{{baseUrl}}/api/contracts/1/cost",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"contracts",
"1",
"cost"
]
}
},
"response": []
}
]
}
],
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:8080"
}
]
}
Loading