This article contains the following information related to APIs.
- API Version
- Pagination Info
- Handling Errors
The supported version is 2.3.
To set a limit on the number of elements returned in the response, the user needs to set the desired value in the searchCriteriaPageSize parameter.
Example: If searchCriteriaPageSize is set to 5 then only 5 elements are returned in the response.
In addition to the elements, the field total_count returns the total elements available.
For more information please refer to https://devdocs.magento.com/guides/v2.4/rest/performing-searches.html
In case Adobe Commerce Connector BPs i.e. API call is successful (i.e. returns status code between 200 & 300) BPs task will pass and return response payload (in Studio’s Admin Console perspective, in Auditor View the task is marked as completed)
In case the Adobe Commerce Connector BPs i.e. API call has failed (any response status code not between 200 & 300) bps task will fail without returning any response payload (in Studio’s Admin Console perspective, in Auditor View the task is marked as failed & error payload returned from Magento and stack trace are logged)
In case the connector BPs i.e API call execution fails (which can be an internal error such as payload parse issue) task will fail without returning any response payload (in Studio’s Admin Console perspective, in Auditor View the task is marked as failed & stack trace is logged)
Below are some error codes for Adobe Commerce:
|The framework returns HTTP 200 to the caller upon success.
|If service implementation throws either Magento_Service_Exception or its derivative, the framework returns an HTTP 400 with an error response including the service-specific error code and message. This error code could indicate a problem such as a missing required parameter or the supplied data didn’t pass validation.
|The caller was not authorized to perform the request. For example, the request included an invalid token or a user with customer permissions attempting to access an object that requires administrator permissions.
|Access is not allowed for reasons that are not covered by error code 401.
|The specified REST endpoint does not exist. The caller can try again.
|A request was made using a method that is not supported by that resource. For example, using GET on a form that requires data to be presented via POST, or using PUT on a read-only resource.
|The requested resource is only capable of generating content that is not acceptable according to the Accept headers sent in the request.
|If service implementation throws any other exception like network errors, database communication, framework returns HTTP 500.