Skip to content

Instantly share code, notes, and snippets.

@Sameerkash
Created June 30, 2020 13:57
Show Gist options
  • Save Sameerkash/ddb8a1f56396b53eefc29a480c4d89a1 to your computer and use it in GitHub Desktop.
Save Sameerkash/ddb8a1f56396b53eefc29a480c4d89a1 to your computer and use it in GitHub Desktop.
Vendor App
http://www.api.tradechat.in/trade-chat/unauth/signup
request
{
"phone":"9945849355",
"isd": "+91"
}
response
{
"id": "8d50a1e0-c406-5d3c-9992-7b8daf827516",
"password": "18bca1060aee11405633e8fa17286c26",
"newUser": true
}
- what does Passwod field mean or required for ?
- Reuquire consistent feilds in request and response objects, like "id" and "userId"
- no signin api available, or is it the same as above?
http://www.api.tradechat.in/trade-chat/unauth/verify-otp
request
{
"userId":"5fefbfaa-4aa5-5a27-a2c0-f6960b3fc7f0",
"otp":5139
}
response
Error0
- Did not receive OTP on phone number
- Error messages are non-descriptive. Would be better if it was sent in a particular field and format as it will be displayed in the Front end too.
- expected responses for the objects are entire data models, for example if request is for list of vendors
it woduld be [ Vendorobj{ } , Vendorobj{ }, Vendorobj{ } ] and not just the id of the vendor
respose:
{"message":"SUCCESS"}
- after updating or adding a data,the entire object will be required back in the response with the updated object to display the update in the UI
- response status code in response body would be better for error handling in the front end
> http://www.api.tradechat.in/trade-chat/vendor/store/add-product
> http://www.api.tradechat.in/trade-chat/vendor/store/get-my-store
> http://www.api.tradechat.in/trade-chat/vendor/store/get-vendor-store
> http://www.api.tradechat.in/trade-chat/vendor/orders/get-my-orders
> http://www.api.tradechat.in/trade-chat/orders/get-vendor-order-history
> http://www.api.tradechat.in/trade-chat/orders/update-order-status
- routes not working, shows cannont POST to this route
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment