|
147 | 147 | <li>
|
148 | 148 | <a href="../../documentation/api/index.html#servers"><span>Servers</span></a>
|
149 | 149 | </li>
|
| 150 | + <li> |
| 151 | + <a href="../../documentation/api/index.html#v1-prison-prisonid-prisoners-hmppsid-balances"><span>/v1/prison/{prisonId}/prisoners/{hmppsId}/balances</span></a> |
| 152 | + </li> |
150 | 153 | <li>
|
151 | 154 | <a href="../../documentation/api/index.html#v1-prison-prisoners"><span>/v1/prison/prisoners</span></a>
|
152 | 155 | </li>
|
@@ -306,6 +309,145 @@ <h2 id="servers">Servers</h2>
|
306 | 309 |
|
307 | 310 |
|
308 | 311 |
|
| 312 | +<h2 id="v1-prison-prisonid-prisoners-hmppsid-balances">/v1/prison/{prisonId}/prisoners/{hmppsId}/balances</h2> |
| 313 | + |
| 314 | +<h3 id="v1-prison-prisonid-prisoners-hmppsid-balances-get">get</h3> |
| 315 | + |
| 316 | + <p><em>Returns all accounts for a prisoner that they have at a prison.</em></p> |
| 317 | + |
| 318 | + |
| 319 | + <p><b>Applicable filters</b>: <ul><li>prisons</li></ul></p> |
| 320 | + |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | +<h4 id="v1-prison-prisonid-prisoners-hmppsid-balances-get-parameters">Parameters</h4> |
| 325 | +<table> |
| 326 | +<thead> |
| 327 | +<tr><th>Parameter</th><th>In</th><th>Type</th><th>Required</th><th>Description</th></tr> |
| 328 | +</thead> |
| 329 | +<tbody> |
| 330 | + |
| 331 | +<tr> |
| 332 | +<td>hmppsId</td> |
| 333 | +<td>path</td> |
| 334 | +<td>string</td> |
| 335 | +<td>true</td> |
| 336 | +<td> |
| 337 | + |
| 338 | +</td> |
| 339 | +</tr> |
| 340 | + |
| 341 | +<tr> |
| 342 | +<td>prisonId</td> |
| 343 | +<td>path</td> |
| 344 | +<td>string</td> |
| 345 | +<td>true</td> |
| 346 | +<td> |
| 347 | + |
| 348 | +</td> |
| 349 | +</tr> |
| 350 | + |
| 351 | +</tbody> |
| 352 | +</table> |
| 353 | + |
| 354 | + |
| 355 | + |
| 356 | + |
| 357 | +<h4 id="v1-prison-prisonid-prisoners-hmppsid-balances-get-responses">Responses</h4> |
| 358 | +<table> |
| 359 | +<thead> |
| 360 | +<tr><th>Status</th><th>Description</th><th>Schema</th></tr> |
| 361 | +</thead> |
| 362 | +<tbody> |
| 363 | + |
| 364 | +<tr> |
| 365 | +<td>200</td> |
| 366 | +<td> |
| 367 | +<p>Successfully found a prisoner’s accounts.</p> |
| 368 | + |
| 369 | + |
| 370 | + |
| 371 | +<pre><code>{ |
| 372 | + "data": { |
| 373 | + "balances": [ |
| 374 | + { |
| 375 | + "accountCode": "string", |
| 376 | + "amount": "integer" |
| 377 | + } |
| 378 | + ] |
| 379 | + } |
| 380 | +}</code></pre> |
| 381 | + |
| 382 | +</td> |
| 383 | +<td> |
| 384 | +<a href='#schema-dataresponsebalances'>DataResponseBalances</a> |
| 385 | +</td> |
| 386 | +</tr> |
| 387 | + |
| 388 | +<tr> |
| 389 | +<td>400</td> |
| 390 | +<td> |
| 391 | +<p>The HMPPS ID provided has an invalid format or the prisoner does hot have accounts at the specified prison.</p> |
| 392 | + |
| 393 | + |
| 394 | + |
| 395 | +<pre><code>{ |
| 396 | + "status": 400, |
| 397 | + "userMessage": "Validation failure: No query parameters specified.", |
| 398 | + "developerMessage": "No query parameters specified." |
| 399 | +}</code></pre> |
| 400 | + |
| 401 | +</td> |
| 402 | +<td> |
| 403 | +<a href='#schema-badrequest'>BadRequest</a> |
| 404 | +</td> |
| 405 | +</tr> |
| 406 | + |
| 407 | +<tr> |
| 408 | +<td>404</td> |
| 409 | +<td> |
| 410 | +<p>Not Found</p> |
| 411 | + |
| 412 | + |
| 413 | + |
| 414 | +<pre><code>{ |
| 415 | + "status": 404, |
| 416 | + "userMessage": "404 Not found error: Could not find person with HMPPS id: 2003/0011991D.", |
| 417 | + "developerMessage": "Could not find person with HMPPS id: 2003/0011991D." |
| 418 | +}</code></pre> |
| 419 | + |
| 420 | +</td> |
| 421 | +<td> |
| 422 | +<a href='#schema-personnotfound'>PersonNotFound</a> |
| 423 | +</td> |
| 424 | +</tr> |
| 425 | + |
| 426 | +<tr> |
| 427 | +<td>500</td> |
| 428 | +<td> |
| 429 | +<p>Internal Server Error</p> |
| 430 | + |
| 431 | + |
| 432 | + |
| 433 | +<pre><code>{ |
| 434 | + "status": 500, |
| 435 | + "userMessage": "Internal Server Error", |
| 436 | + "developerMessage": "Unable to complete request as an upstream service is not responding." |
| 437 | +}</code></pre> |
| 438 | + |
| 439 | +</td> |
| 440 | +<td> |
| 441 | +<a href='#schema-internalservererror'>InternalServerError</a> |
| 442 | +</td> |
| 443 | +</tr> |
| 444 | + |
| 445 | +</tbody> |
| 446 | +</table> |
| 447 | + |
| 448 | + |
| 449 | + |
| 450 | + |
309 | 451 | <h2 id="v1-prison-prisoners">/v1/prison/prisoners</h2>
|
310 | 452 |
|
311 | 453 | <h3 id="v1-prison-prisoners-get">get</h3>
|
@@ -5391,6 +5533,82 @@ <h4 id="v1-epf-person-details-hmppsid-eventnumber-get-responses">Responses</h4>
|
5391 | 5533 |
|
5392 | 5534 |
|
5393 | 5535 | <h2 id="schemas">Schemas</h2>
|
| 5536 | +<h3 id="schema-accountbalance">AccountBalance</h3> |
| 5537 | + |
| 5538 | + |
| 5539 | +<table class='schema-accountbalance'> |
| 5540 | +<thead> |
| 5541 | +<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Schema</th></tr> |
| 5542 | +</thead> |
| 5543 | +<tbody> |
| 5544 | + |
| 5545 | +<tr> |
| 5546 | +<td>accountCode</td> |
| 5547 | +<td>string</td> |
| 5548 | +<td>true</td> |
| 5549 | +<td></td> |
| 5550 | +<td> |
| 5551 | + |
| 5552 | +</td> |
| 5553 | +</tr> |
| 5554 | + |
| 5555 | +<tr> |
| 5556 | +<td>amount</td> |
| 5557 | +<td>integer</td> |
| 5558 | +<td>true</td> |
| 5559 | +<td></td> |
| 5560 | +<td> |
| 5561 | + |
| 5562 | +</td> |
| 5563 | +</tr> |
| 5564 | + |
| 5565 | +</tbody> |
| 5566 | +</table> |
| 5567 | + |
| 5568 | +<h3 id="schema-balances">Balances</h3> |
| 5569 | + |
| 5570 | + |
| 5571 | +<table class='schema-balances'> |
| 5572 | +<thead> |
| 5573 | +<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Schema</th></tr> |
| 5574 | +</thead> |
| 5575 | +<tbody> |
| 5576 | + |
| 5577 | +<tr> |
| 5578 | +<td>balances</td> |
| 5579 | +<td>array</td> |
| 5580 | +<td>true</td> |
| 5581 | +<td></td> |
| 5582 | +<td> |
| 5583 | + <a href='#schema-accountbalance'>AccountBalance</a> |
| 5584 | +</td> |
| 5585 | +</tr> |
| 5586 | + |
| 5587 | +</tbody> |
| 5588 | +</table> |
| 5589 | + |
| 5590 | +<h3 id="schema-dataresponsebalances">DataResponseBalances</h3> |
| 5591 | + |
| 5592 | + |
| 5593 | +<table class='schema-dataresponsebalances'> |
| 5594 | +<thead> |
| 5595 | +<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Schema</th></tr> |
| 5596 | +</thead> |
| 5597 | +<tbody> |
| 5598 | + |
| 5599 | +<tr> |
| 5600 | +<td>data</td> |
| 5601 | +<td>object</td> |
| 5602 | +<td>true</td> |
| 5603 | +<td></td> |
| 5604 | +<td> |
| 5605 | + <a href='#schema-balances'>Balances</a> |
| 5606 | +</td> |
| 5607 | +</tr> |
| 5608 | + |
| 5609 | +</tbody> |
| 5610 | +</table> |
| 5611 | + |
5394 | 5612 | <h3 id="schema-alias">Alias</h3>
|
5395 | 5613 |
|
5396 | 5614 |
|
|
0 commit comments