General Response 1 : 'Invalid Attribute'
Request
{
//The mistake is the first attribute. It should be 'command' instead of 'request'
request: ‘addCustomerToSale/v1’,
method: ‘post’,
email: ‘scully99@gmail.com’ }
Response
{
.
.
. error : 'Invalid Attribute'
}
General Response 2 : 'Invalid Command'
Request
{
//Wrong command.
command: ‘addCustomerToCart/v1’,
method: ‘post’,
email: ‘scully99@gmail.com’
}
Response
{
.
.
.
error : 'Invalid Command'
}
General Response 3 : 'Missing Attribute(s)'
Request
{
command: ‘postPayment/v1’,
method: ‘post’,
data:
{
amount: 15.00,
payment_mode: ‘card’,
print: ‘yes’,
}
}
Response
{
.
.
.
error : 'Missing Attribute(s)'
}
General Response 4 : 'Invalid Data Type'
Request
{
command: ‘printReceipt/v1’,
method: ‘post’,
url: ‘https://www.thaimeup.com’,
quantity: “five”
}
Response
{
.
.
.
error : 'Invalid Data Type'
}
General Response 5 : 'Invalid Value'
Request
{
command: ‘createCustomer/v1’,
method: ‘post’,
data:
{
email: ‘rosa99gmailom’
}
}
Response
{
.
.
.
error : 'Invalid Value'
}
General Response 6 : 'Missing Value'
Request
{
command: ‘createCustomer/v1’,
method: ‘post’,
data:
{
email: null
}
}
Response
{
.
.
.
error : 'Missing Value'
}