Changes for page API

Last modified by David Persson on 2022/08/11 10:43
From version 4.1
edited by Mikael Widström
on 2020/01/09 10:01
To version 4.2
edited by Mikael Widström
on 2020/01/09 11:03
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -15,10 +15,22 @@
15 15  
16 16  == Introduction ==
17 17  
18 -The resources follows rest-full patterns including hyper-media links, we use hyper-media and backend-for-frontend principles to impose business rules and reduce duplication of business logic in front-and back-end.
18 +The credit-account functions i divided in three different apis.
19 19  
20 -=== Basic resources ===
20 +* Acquiring - Functions to create reservations and transactions on an account.
21 +* Onboarding - Functions to list possible account types, onboard/create new accounts including the signing process
22 +* Account - Functions to view details and interact with a specific account
21 21  
24 +
25 +=== REST-full pattern guidance ===
26 +
27 +The resources follows REST-full patterns including hyper-media links, we use hyper-media and backend-for-frontend principles to impose business rules and reduce duplication of business logic in front-and back-end.
28 +
29 +Errors uses HTTP friendly status codes as well as detailed "problem+json" responses. All errors that can be avoided by the client is in the **"HTTP status 4XX"** ragne, all errors that must be fixed by payex is in the **"HTTP status 5XX"** range. All errors contains an instance-id, the instance-id should be provided in support questions to simplify the support process.
30 +
31 +
32 +==== Basic resources ====
33 +
22 22  //Basic resources uses the common HTTP patterns for GET, POST, PUT, PATCH, DELETE.//
23 23  
24 24  * Requests __**without**__ specific resource identifier - f.ex. /ledger/credit-account/v1/XXX/accounts
... ... @@ -30,7 +30,7 @@
30 30  ** HTTP PATCH - Partially updates a specific resource
31 31  ** HTTP DELETE - Deletes a specific resource
32 32  
33 -=== Operation resources ===
45 +==== Operation resources ====
34 34  
35 35  //Functions that cannot be mapped directly to resources are called "Operation Resources" they only support HTTP POST//.
36 36  
... ... @@ -39,9 +39,8 @@
39 39  * Requests __**with**__ specific resource identifier operates on a resource
40 40  ** HTTP POST - f.ex. /ledger/credit-account/v1/XXX/accounts/1234568/initiates-termination - Starts termination of an account
41 41  
54 +==== Hyper-media response ====
42 42  
43 -=== Hyper-media response ===
44 -
45 45  The response will include a list of operations that is possible to perform. Below is an example when a HTTP-GET Request is issued to retrieve information on an account. The response includes an "operations" property with a list of possible possible operations. The list of operations returned only contains business-rule and access-control validated operations. In the sample below the only allowed way to interact with the resource is to issue "patch" requests to modify fields. Different states as well as access permissions on the resource affect which operations are returned.
46 46  
47 47  
... ... @@ -65,7 +65,6 @@
65 65  **Tip:** As an implementing consumer of the api **operations** should be taken into consideration rather than trying to determine possible operation based on other basic resource properties. By following this tip we: minimize duplication of business logic, simplify maintenance when business rules change, have a clear separation of concerns.
66 66  )))
67 67  
68 -(% class="wikigeneratedid" %)
69 69  == ==
70 70  
71 71  == Problems ==