Application User Account Detail
Operations on Application User Account for one user account.
URL
/cnbs/v1/apu/users/id/accounts/id
Method(s)
POST
Parameters
Required POST
- Parameters (body Payload)
- Action (action)
- Three actions are supported, Create (create), Modify/Update (modify) and Delete (delete)
- Modify and Delete actions require a valid user_id and account_id to be supplied in the body.
- NOTE: The Create action requires the account_id to be left blank as the system will generate a unique value for the field.
- NOTE: As of this time, it is the responsibility of the web service consumer to maintain referencial integrity in relation to the User database. On delete, make sure you delete the accounts of a user before deleting the user.
- Account ID (account_id)
- GUID identifying an account (Obtained by a User Account list)
- User ID (user_id)
- GUID identifying an application user (Obtained by a Users Search).
- Remaining fields are technically optional, so supply data necessary for intended usage.
- Account Type (account_type)
- Primary Account (primary_account)
- Sales Organization (sales_organization)
- Distribution Channel (distribution_channel)
- Division (division)
- Company Code (company_code)
- Allow Payments (allow_payments)
- Allow Deposits (allow_deposits)
Example POST
cURL:
curl -X POST https://<<your.server.here>>/CNBS/v1/apu/users/id/accounts/id?sap-client=800&sap-language=EN&apiid=CNBSMV01R -H accept: application/json -H content-type: application/json -H cnbssysid: nR4kLO/8HCiuv+1hev5fbMgcMpOwhKf3GvJZvxZ3ZPQ= -d "{ \"action\": \"modify\", \"data\": { \"account_id\": \"value\", "\user_id\": \"value\", \"account_type\": \"user\", \"primary_account\": \"3050\", \"sales_organization\": \"1000\", \"distribution_channel\": \"20\", \"division\": \"00\", \"company_code\": \"1100\", \"allow_payments\": \"\", \"allow_deposits\": \"X\" }}"
body:
{ "action": "create", "data": { "account_id": "", "user_id": "{{user_id}}", "account_type": "PostmanType", "primary_account": "3050", "sales_organization": "3000", "distribution_channel": "10", "division": "00", "company_code": "1000", "allow_payments": "X", "allow_deposits": "X" } }
Response
The response consists of an accounts list table with a single record (data) and a status (status).
- Accounts List (data)
- Account ID (account_id)
- User ID (user_id)
- Account Type (account_type)
- Primary Account (primary_account)
- Sales Organization (sales_organization)
- Distribution Channel (distribution_channel)
- Division (division)
- Company Code (company_code)
- Allow Payments (allow_payments)
- Allow Deposits (allow_deposits)
- Status (status)
- Message Type (message_type)
- SAP Message Type.
- Errors:
- E = Error
- A = Abort
- X = Exception
- Others:
- S = Success
- W = Warning
- I = Information
- Message Identifier (message_identification)
- SAP Message ID.
- Message Number (message_number)
- SAP Message Number.
- Message Line (message_line_string)
- SAP Message Text.
Example Response
JSON:
{ "data": [ { "account_id": "3vSR8UKsh09w91Pw791G5uUdvZ3Vou", "user_id": "A959E6704DF21EEAA1AEA05F353B4A56", "account_type": "PostmanType", "primary_account": "FrontUser", "sales_organization": "3000", "distribution_channel": "10", "division": "00", "company_code": "1000", "allow_payments": "X", "allow_deposits": "X" } ], "status": { "message_type": "S", "message_identification": "/CNBS/X_API", "message_number": 10, "message_line_string": "Request successfully processed ,document selected 1" } }