Add contractors by residence endpoint and Bruno API collection
- Add GET /contractors/by-residence/:residence_id/ endpoint - Create comprehensive Bruno API collection (89 endpoints) - Collection covers all API endpoints with Local and Dev environments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
19
bruno-collections/casera-api/Contractors/By Residence.bru
Normal file
19
bruno-collections/casera-api/Contractors/By Residence.bru
Normal file
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: By Residence
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{api_url}}/contractors/by-residence/:residence_id/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
residence_id: 1
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
meta {
|
||||
name: Create Contractor
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{api_url}}/contractors/
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "John's Plumbing",
|
||||
"company": "John's Plumbing Co",
|
||||
"phone": "555-123-4567",
|
||||
"email": "john@plumbing.com",
|
||||
"address": "123 Main St",
|
||||
"notes": "Available weekends",
|
||||
"specialty_ids": [1, 2],
|
||||
"residence_ids": [1]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Delete Contractor
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{api_url}}/contractors/:id/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
id: 1
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Get Contractor Tasks
|
||||
type: http
|
||||
seq: 8
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{api_url}}/contractors/:id/tasks/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
id: 1
|
||||
}
|
||||
19
bruno-collections/casera-api/Contractors/Get Contractor.bru
Normal file
19
bruno-collections/casera-api/Contractors/Get Contractor.bru
Normal file
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Get Contractor
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{api_url}}/contractors/:id/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
id: 1
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: List Contractors
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{api_url}}/contractors/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
19
bruno-collections/casera-api/Contractors/Toggle Favorite.bru
Normal file
19
bruno-collections/casera-api/Contractors/Toggle Favorite.bru
Normal file
@@ -0,0 +1,19 @@
|
||||
meta {
|
||||
name: Toggle Favorite
|
||||
type: http
|
||||
seq: 7
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{api_url}}/contractors/:id/toggle-favorite/
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
id: 1
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
meta {
|
||||
name: Update Contractor
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{api_url}}/contractors/:id/
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Token {{auth_token}}
|
||||
}
|
||||
|
||||
params:path {
|
||||
id: 1
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "John's Plumbing Updated",
|
||||
"company": "John's Plumbing Co LLC",
|
||||
"phone": "555-123-4567",
|
||||
"email": "john@plumbing.com",
|
||||
"address": "456 Oak Ave",
|
||||
"notes": "Available weekends and evenings",
|
||||
"specialty_ids": [1, 2, 3],
|
||||
"residence_ids": [1, 2]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user