|
| 1 | +# Service Cases |
| 2 | + |
| 3 | +## Get all service cases |
| 4 | + |
| 5 | +<%= shell_example('/service_cases') %> |
| 6 | + |
| 7 | +> Response: |
| 8 | +
|
| 9 | +```json |
| 10 | +[ |
| 11 | + { |
| 12 | + "id": 1, |
| 13 | + "office_id": 3, |
| 14 | + "client_id": 35, |
| 15 | + "contact_id": 46, |
| 16 | + "project_id": 98, |
| 17 | + "asset_id": null, |
| 18 | + "closed_at": "2025-04-15T18:26:29.461-07:00", |
| 19 | + "created_by_id": 1, |
| 20 | + "created_at": "2024-08-20T21:06:32.078-07:00", |
| 21 | + "updated_at": "2025-04-15T18:26:30.152-07:00", |
| 22 | + "ticket_name": "AV Troubleshoot & Update – Exec Conf Room", |
| 23 | + "description": "Client reported intermittent video dropouts and distorted audio during hybrid meetings in their executive conference room.", |
| 24 | + "resolution": "Signal Path Repair & Firmware Updates" |
| 25 | + }, |
| 26 | + { |
| 27 | + ... |
| 28 | + } |
| 29 | +] |
| 30 | +``` |
| 31 | + |
| 32 | +> Status: 200 OK |
| 33 | +
|
| 34 | +This endpoint retrieves all of your service cases. |
| 35 | + |
| 36 | +### HTTP Request |
| 37 | + |
| 38 | +`GET <%= api_url('/service_cases') %>` |
| 39 | + |
| 40 | +`GET <%= api_url('/service_cases?page=2') %>` |
| 41 | + |
| 42 | +### URL Parameters |
| 43 | + |
| 44 | +Parameter | Description |
| 45 | +--------- | ----------- |
| 46 | +page | A specific page of results. |
| 47 | +min_created_at | Query service cases created after the specified date time. |
| 48 | +max_created_at | Query service cases created before the specified date time. |
| 49 | +min_updated_at | Query service cases updated after the specified date time. |
| 50 | +max_updated_at | Query service cases updated before the specified date time. |
| 51 | + |
| 52 | +**Note**: You can pass a date or a date time to the timestamp queries. For example: |
| 53 | +`2023-7-28` or `2023-7-28 15:33:33 -700` or `2023-7-28T15:33:33-700`. The time defaults to |
| 54 | +`00:00:00` when not included, and the timezone defaults to UTC. |
| 55 | + |
| 56 | +## Get a service case |
| 57 | + |
| 58 | +<%= shell_example('/service_cases/<ID>') %> |
| 59 | + |
| 60 | +> Response: |
| 61 | +
|
| 62 | +```json |
| 63 | +{ |
| 64 | + "id": 72, |
| 65 | + "office_id": 3, |
| 66 | + "client_id": 309, |
| 67 | + "contact_id": 745, |
| 68 | + "project_id": null, |
| 69 | + "asset_id": null, |
| 70 | + "closed_at": "2025-08-07T22:31:54.152-07:00", |
| 71 | + "created_by_id": 1, |
| 72 | + "created_at": "2025-05-30T00:47:14.252-07:00", |
| 73 | + "updated_at": "2025-08-07T22:31:54.252-07:00", |
| 74 | + "ticket_name": "AV Troubleshoot & Update – Exec Conf Room", |
| 75 | + "description": "Client reported intermittent video dropouts and distorted audio during hybrid meetings in their executive conference room.", |
| 76 | + "resolution": "Signal Path Repair & Firmware Updates", |
| 77 | + "expenses": [ |
| 78 | + { |
| 79 | + "id": 80, |
| 80 | + "category": "equipment", |
| 81 | + "description": "Fiber HDMI Extender Set (20m)", |
| 82 | + "equipment_name": "OptiLink Pro Systems FHE-20K Ultra", |
| 83 | + "quantity": "1.0", |
| 84 | + "shipping_taxed": false, |
| 85 | + "shipping_cost": { |
| 86 | + "cents": 0, |
| 87 | + "currency_iso": "USD" |
| 88 | + }, |
| 89 | + "shipping_price": { |
| 90 | + "cents": 0, |
| 91 | + "currency_iso": "USD" |
| 92 | + }, |
| 93 | + "taxed": true, |
| 94 | + "cost": { |
| 95 | + "cents": 38000, |
| 96 | + "currency_iso": "USD" |
| 97 | + }, |
| 98 | + "amount": { |
| 99 | + "cents": 48000, |
| 100 | + "currency_iso": "USD" |
| 101 | + } |
| 102 | + }, |
| 103 | + { |
| 104 | + "id": 89, |
| 105 | + "category": "parking", |
| 106 | + "description": "Travel Fee", |
| 107 | + "amount": { |
| 108 | + "cents": 5000, |
| 109 | + "currency_iso": "USD" |
| 110 | + } |
| 111 | + }, |
| 112 | + { |
| 113 | + "id": 90, |
| 114 | + "category": "other", |
| 115 | + "description": "Firmware Update & System Recompile", |
| 116 | + "amount": { |
| 117 | + "cents": 15000, |
| 118 | + "currency_iso": "USD" |
| 119 | + } |
| 120 | + } |
| 121 | + ], |
| 122 | + "total_labor_hours": 4.0, |
| 123 | + "total_labor_price": { |
| 124 | + "cents": 80000, |
| 125 | + "currency_iso": "USD" |
| 126 | + }, |
| 127 | + "total_equipment": { |
| 128 | + "cents": 48000, |
| 129 | + "currency_iso": "USD" |
| 130 | + }, |
| 131 | + "total_other_expenses": { |
| 132 | + "cents": 100000, |
| 133 | + "currency_iso": "USD" |
| 134 | + }, |
| 135 | + "subtotal": { |
| 136 | + "cents": 148000, |
| 137 | + "currency_iso": "USD" |
| 138 | + }, |
| 139 | + "total_tax": { |
| 140 | + "cents": 1440, |
| 141 | + "currency_iso": "USD" |
| 142 | + }, |
| 143 | + "total_price": { |
| 144 | + "cents": 149440, |
| 145 | + "currency_iso": "USD" |
| 146 | + } |
| 147 | +} |
| 148 | +``` |
| 149 | + |
| 150 | +> Status: 200 OK |
| 151 | +
|
| 152 | +This endpoint retrieves a service case by ID. |
| 153 | + |
| 154 | +### HTTP Request |
| 155 | + |
| 156 | +`GET <%= api_url('/service_cases/<ID>') %>` |
| 157 | + |
| 158 | +### URL Parameters |
| 159 | + |
| 160 | +Parameter | Description |
| 161 | +--------- | ----------- |
| 162 | +ID | The ID of the service case to retrieve |
0 commit comments