Closed rob-buskens-sp closed 2 months ago
Thanks for submitting this issue! It was confirmed that the expected behavior is upsert, and the documentation has been updated:
"By providing the account ID of an existing account in the request body, this API will function as a PATCH operation and update the account."
Describe the bug A clear and concise description of what the bug is
The Account Create API is an 'upsert' operation. If the ID doesn't exist, the account is created. If the ID does exist it is updated. This is usually discovered in unit testing. There is a separate update operation so it isn't clear if this is intended behaviour.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen. Based on documentation and overall API design (separate update operation), expect this to fail. More specifically... this call will work (async), but the task should fail (duplicate account).
Actual behavior A clear and concise description of what actually happens. The task succeeds and the account is updated.
Screenshots If applicable, add screenshots to help explain your problem. Source before 1st create:
first create call:
new account (correlated):
second create call:
Note: same id
Account updated, not created.
Operating System (please complete the following information):
N/A
Browser (please complete the following information): N/A
Additional context
If the expected behaviour is upsert rather than create only. all good. then please update the documentation to reflect actual behaviour.
if the expected behaviour is create only... then the task should fail if the id already exists.