AOTG API: Create Debtor: Difference between revisions

No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1:
==Create Debtor==
Add a new Debtor to account book.
{{AOTGApiMethodsSpec|POST|/api/public/v1/Debtor|Params=None}}
==API Request Flow==
[[File:AOTGApiCompleteOrFailFlow.png|link=]]
#Submit Create Debtor request
#Check the successful request status, if the action is completed'''Completed''' or failed'''Failed'''.
#To get the failed reason, use RESULT method to retrieve the message of completed or failed.
 
<br/>
 
==Code Snippets==
*Add header of "SOTC_AUTH", and assign value of '''AccessToken'''.
Line 241 ⟶ 242:
</syntaxhighlight>
}}
====Response Status====
"RequestId": {{AOTGResponseStatus|"abf79c80-13e9-41ae-993d-2cd6b99b5570",}}
200 OK
=====Completed status=====
*'''Completed''' status Indicates that the Create debtor request has been performed and succeeded.
<syntaxhighlight lang="json-object">
{
"RequestId": "abf79c80-13e9-41ae-993d-2cd6b99b5570",
"Status": "Completed"
}
</syntaxhighlight>
=====Failed status=====
*'''Failed''' status Indicates that the Create debtor request has been performed but has error.
<syntaxhighlight lang="json-object">
{
"RequestId": "abf79c80-13e9-41ae-993d-2cd6b99b5570",
"Status": "Failed"
}
</syntaxhighlight>
 
<br/>
 
==Use RESULT method to get the failed reason of Create Debtor request==
===Code Snippets===