These APIs are only intended to be used for development purposes. DO NOT use any of these APIs in production. DO NOT add any personal email or any other personal data in the requests. All the requests are supposed to be dummy
Ecommerce-Backend is set of APIs which can be used to create an Shopping Portal which minimalistic effort. Developers just need to create a frontend & integrate with the APIs
In Ecommerce-Backend, we have a concept of Partner. A partner is the first thing which the developer has to create using /partner
api. Once the partner is created you can start adding users & products to your portal using “partner” as a header.
Below sections discuss the conventions used in all the APIs like request, response & other details
After partner is created, all the APIs need to include a partner
header in request which is a uuidv4. If the partner is incorrect or empty, an exception will be thrown in the response
The success response format will be something like this for add user /user
api
{
"data": {
"id": 6
},
"message": "User Created successfully",
"errors": null,
"requestId": "8d4a5a2a-2afe-4693-94f4-4b905cb66a48"
}
Field | Description |
---|---|
data | Contains the business ids, can be list of items or single Id |
message | optional Message from backend |
errors | optional Errors if any in the response |
requestId | CorrelationId which is for future use |
Below is the sample error response
{
"data": null,
"message": "An exception occurred in the API",
"errors": [
{
"code": "invalid_partner",
"message": "Partner is invalid"
}
],
"requestId": "15cb59e7-c26f-490e-be3d-f64472f7dfed"
}
Field | Description |
---|---|
data | will be null in case of errors |
message | optional Message from backend |
errors | List of errors - contains code & message |
requestId | CorrelationId which is for future use |