This article contains the following information related to APIs.
- API Version
- Pagination Info
- Handling Errors
API Version
The supported version is 2.3.
Pagination Info
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
Handling Errors
In case Adobe Commerce Connector BPs API call is successful (i.e. returns status code between 200 & 300) the BPs task will pass and return response payload (in Studio’s Admin Console perspective, in Auditor View the task is marked as completed)
Or
In case the Adobe Commerce Connector BPs API call has failed (any response status code not between 200 and 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)
Or
In case the connector BPs API call execution fails (which can be an internal error such as a payload parse issue) the BPs 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:
HTTP Code | Meaning | Description |
---|---|---|
200 | Success | The framework returns HTTP 200 to the caller upon success. |
400 | Bad Request | 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 not being validated. |
401> | Unauthorized | 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. |
403 | Forbidden | Access is not allowed for reasons not covered by error code 401. |
404 | Not found | The specified REST endpoint does not exist. The caller can try again. |
405 | Not allowed | A request was made using a method 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. |
406 | Not acceptable | The requested resource is only capable of generating content that is not acceptable according to the Accept headers sent in the request. |
500 | System Errors | If service implementation throws any other exception like network errors, database communication, framework returns HTTP 500. |
Comments
0 comments
Please sign in to leave a comment.