General Responses

This page shows the general responses sent when the requests made to Oliver have errors

General Response 1 : 'Invalid Attribute'

{
    //The mistake is the first attribute. It should be 'command' instead of 'request'
    request: ‘addCustomerToSale/v1’,
    method: ‘post’,
    email: ‘[email protected]’
}
{
  .
  .
  .
  error : 'Invalid Attribute'
}

General Response 2 : 'Invalid Command'

{
    //Wrong command.
    command: ‘addCustomerToCart/v1’,
    method: ‘post’,
    email: ‘[email protected]’
}
{
  .
  .
  .
  error : 'Invalid Command'
}

General Response 3 : 'Missing Attribute(s)'

{
  command: ‘postPayment/v1’,
  method: ‘post’,
  data:
  {
    amount: 15.00,
    payment_mode: ‘card’, 
    print: ‘yes’, 
  }
}
{
  .
  .
  .
  error : 'Missing Attribute(s)'
}

General Response 4 : 'Invalid Data Type'

{
   command: ‘printReceipt/v1’,
   method: ‘post’,
   url: ‘https://www.thaimeup.com’, 
   quantity: “five”
 }
{
  .
  .
  .
  error : 'Invalid Data Type'
}

General Response 5 : 'Invalid Value'

{
  command: ‘createCustomer/v1’,
  method: ‘post’,
  data: 
  {
    email: ‘rosa99gmailom’
  }
}
{
  .
  .
  .
  error : 'Invalid Value'
}

General Response 6 : 'Missing Value'

{
  command: ‘createCustomer/v1’,
  method: ‘post’,
  data: 
  {
    email: null 
  }             
}
{
  .
  .
  .
  error : 'Missing Value'
}