Question: What is the difference between a 200 response and a 201 response?
- 200 generally applies to POST calls, while 201 generally applies to GET calls.
- 200 generally applies to GET calls, while 201 generally applies to POST calls.
- 200 generally applies to improperly scoped calls, while 201 generally applies to rejected calls.
- 200 generally applies to rejected calls, while 201 generally applies to improperly gated calls.
Explanation
A 200 status indicates that the request succeeded and usually returns existing resource data. A 201 status indicates that a new resource was successfully created. In Amazon Ads API workflows, read operations and create operations use different success codes to show what happened after the request. This helps integrations handle responses correctly instead of treating every success response the same. The status code confirms the result of the operation, not only that the endpoint was reached.
Why the other options are incorrect
POST and GET reversed This incorrectly switches the usual success-code pattern for read and create operations.
Improperly scoped calls This is incorrect because scope issues are permission errors, not successful 200 or 201 responses.
Rejected calls This is incorrect because rejected requests do not use successful 200 or 201 status codes.
Source for verification
The answer(s) to the question is highlighted in the BOLD text above. You can also find more questions and answers related to the exams on the "Integrating With HubSpot I: Foundations" page.
