Skip to content

Commit

Permalink
Merge pull request #57 from firefinancialservices/ErrorCodesReview
Browse files Browse the repository at this point in the history
Error codes review
  • Loading branch information
owenobyrne authored Jan 28, 2025
2 parents f6039f8 + cebede1 commit 5e8e755
Show file tree
Hide file tree
Showing 62 changed files with 507 additions and 71 deletions.
12 changes: 9 additions & 3 deletions src/fire-business-api-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ paths:
$ref: ./v2/paths/paymentrequests/update-paymentrequest.yaml

webhooks:
Webhooks:
$ref: ./webhooks/Webhooks.yaml
Webhook:
$ref: ./webhooks/webhooks.yaml

components:
securitySchemes:
Expand All @@ -188,7 +188,7 @@ components:
bearerFormat: API Access Token
responses:
UnauthorisedError:
description: Access Token is Invalid or missing
description: An error has occured
parameters:
orderParam:
name: order
Expand Down Expand Up @@ -373,6 +373,12 @@ components:
$ref: 'v1/schemas/bank-pay-refund-request.yaml'
BankPayRefundResponse:
$ref: 'v1/schemas/bank-pay-refund-response.yaml'
AppCreated:
$ref: 'v1/schemas/app-created.yaml'
ApiErrorV2:
$ref: 'v2/schemas/api-error.yaml'
ApiErrorV3:
$ref: 'v3/schemas/api-error.yaml'
Events:
$ref: 'v2/schemas/events.yaml'
WebhookEvents:
Expand Down
10 changes: 8 additions & 2 deletions src/v1/paths/accounts/accounts-by-ican.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,11 @@ get:
application/json:
schema:
$ref: '#/components/schemas/Account'
'401':
$ref: ../../responses/unauthorised-error.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


10 changes: 10 additions & 0 deletions src/v1/paths/accounts/accounts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ get:
application/json:
schema:
$ref: '../../schemas/accounts.yaml'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'

post:
summary: Create a new Fire Account
Expand All @@ -38,3 +42,9 @@ post:
application/json:
schema:
$ref: '#/components/schemas/Account'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
8 changes: 5 additions & 3 deletions src/v1/paths/apps/accesstokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ post:
schema:
$ref: '#/components/schemas/AuthenticationData'
responses:
'200':
description: Successfully authenticated
'201':
description: Access token created
content:
application/json:
schema:
$ref: '#/components/schemas/AccessToken'
$ref: '#/components/schemas/AccessToken'
'400':
$ref: '../../responses/unauthorised-error.yaml'
4 changes: 4 additions & 0 deletions src/v1/paths/apps/all-app-permissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ get:
application/json:
schema:
$ref: '../../schemas/permissions.yaml'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
4 changes: 4 additions & 0 deletions src/v1/paths/apps/app-permissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ get:
application/json:
schema:
$ref: '../../schemas/permissions.yaml'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'

23 changes: 16 additions & 7 deletions src/v1/paths/apps/apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ get:
type: array
items:
$ref: '../../schemas/applications.yaml'
'403':
$ref: ../../responses/unauthorised-error.yaml
'401':
$ref: ../../responses/unauthorised-error.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
post:
summary: Create an API Application
description: This endpoint will create a new API Application on your Fire account with your chosen specified permissions
description: This endpoint will create a new API Application on your Fire account with your chosen specified permissions. Please note that if there is no batch approval permissions included, the approval fields must be set to null.
tags:
- API and Webhooks
operationId: createApiApplication
Expand All @@ -31,10 +33,17 @@ post:
schema:
$ref: '#/components/schemas/NewApiApplication'
responses:
'200':
'201':
description: API Application created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Application'
$ref: '#/components/schemas/AppCreated'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


6 changes: 6 additions & 0 deletions src/v1/paths/aspsps/aspsps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ get:
application/json:
schema:
$ref: ../../schemas/aspsps.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
6 changes: 6 additions & 0 deletions src/v1/paths/batches/approvers-for-batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ get:
application/json:
schema:
$ref: '#/components/schemas/BatchApprover'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
8 changes: 7 additions & 1 deletion src/v1/paths/batches/banktransfer-by-itemuuid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ delete:
description: The uuid of the item to remove.
responses:
'200':
description: Batch payment deleted successfully.
description: Batch payment deleted successfully.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
15 changes: 14 additions & 1 deletion src/v1/paths/batches/banktransfers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ post:
application/json:
schema:
$ref: '#/components/schemas/NewBatchItemResponse'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'



get:
Expand Down Expand Up @@ -71,4 +78,10 @@ get:
content:
application/json:
schema:
$ref: ../../schemas/batch-items.yaml
$ref: ../../schemas/batch-items.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
26 changes: 23 additions & 3 deletions src/v1/paths/batches/batch-by-batchuuid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ delete:
example: "4ADFB67A-0F5B-4A9A-9D74-34437250045C"
responses:
'200':
description: Batch payment deleted successfully.
description: Batch payment deleted successfully.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'



get:
Expand All @@ -38,6 +45,13 @@ get:
application/json:
schema:
$ref: '#/components/schemas/Batch'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


put:
summary: Submit a batch
Expand All @@ -59,5 +73,11 @@ put:
example: "4ADFB67A-0F5B-4A9A-9D74-34437250045C"
responses:
'204':
description: No body is returned - a HTTP 204 No Content response signifies the call was successful.

description: No body is returned - a HTTP 204 No Content response signifies the call was successful.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'

14 changes: 13 additions & 1 deletion src/v1/paths/batches/batches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ post:
application/json:
schema:
$ref: '#/components/schemas/NewBatchResponse'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


get:
Expand Down Expand Up @@ -88,4 +94,10 @@ get:
content:
application/json:
schema:
$ref: '../../schemas/batch-items.yaml'
$ref: '../../schemas/batch-items.yaml'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
8 changes: 7 additions & 1 deletion src/v1/paths/batches/internaltransfer-by-itemuuid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ delete:
example: "4ADFB67A-0F5B-4A9A-9D74-34437250045C"
responses:
'200':
description: Batch payment deleted successfully.
description: Batch payment deleted successfully.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
14 changes: 13 additions & 1 deletion src/v1/paths/batches/internaltransfers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ post:
application/json:
schema:
$ref: '#/components/schemas/NewBatchItemResponse'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


get:
Expand Down Expand Up @@ -62,4 +68,10 @@ get:
content:
application/json:
schema:
$ref: ../../schemas/batch-items.yaml
$ref: ../../schemas/batch-items.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
8 changes: 7 additions & 1 deletion src/v1/paths/batches/internationaltransfer-by-itemuuid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,10 @@ delete:
description: The uuid of the item to remove.
responses:
'200':
description: Batch payment deleted successfully.
description: Batch payment deleted successfully.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
14 changes: 13 additions & 1 deletion src/v1/paths/batches/internationaltransfers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ post:
application/json:
schema:
$ref: '#/components/schemas/NewBatchItemResponse'
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'


get:
Expand Down Expand Up @@ -67,4 +73,10 @@ get:
content:
application/json:
schema:
$ref: ../../schemas/batch-items.yaml
$ref: ../../schemas/batch-items.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
6 changes: 6 additions & 0 deletions src/v1/paths/cards/card-block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ post:
responses:
'204':
description: No body is returned - “Status 204 No Content” signifies the call was successful.
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
8 changes: 5 additions & 3 deletions src/v1/paths/cards/card-transactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ get:
type: array
items:
$ref: '../../schemas/transactions.yaml'
'403':
$ref: ../../responses/unauthorised-error.yaml
'400':
$ref: '../../responses/unauthorised-error.yaml'
'401':
$ref: ../../responses/unauthorised-error.yaml
$ref: '../../responses/unauthorised-error.yaml'
'403':
$ref: '../../responses/unauthorised-error.yaml'
Loading

0 comments on commit 5e8e755

Please sign in to comment.