/customer/information

This call can be used to fetch miscellaneous information about customer.

The action at the moment there is support for two actions: bonus and po_credit. These can be used in payment in addition to normal payment methods, either by paying whole amount or only portion of it and rest be paid with cash or with a prepaid payment method.

In case customer pays whole order with bonus or PO-credit, order needs to also be marked as a cash order in addition to bonus payment method; otherwise customer will be instructed to netbank to do the payment of 0 euros, which will fail as banks does not allow that small payments.

/customer/information/bonus

Request

Action to get total amount of bonus of customer.

POST nameValueRequired?
session_idhash returned by loginYes
restaurant_id774No

restaurant_id

If restaurant id is not given, all unused bonuses of customer is returned. If client needs that there is need for bonuses of specific restaurants, requesting those restaurants explicitly by doing multiple calls to this action would be more efficient.

Response

{
  "comment":"First is restaurant id, second is amount of bonus customer has to this restaurant",
  774:5.2,
  "more rows ..",
  825:0.2
}

Expectable errors

See error conventions section for explanation how error system works.

Label Additional data Description
NO_BONUS_ROWSNoneIf customer does not have any orders created where bonus could be come from. Just show the error message to customer and it should be ok.

/customer/information/po_credit

Action to get total amount of PO-credit of customer.

This action is not useful for clients for now, as customers can’t gain PO-credit at the moment.

Request

POST nameValueRequired?
session_idhash returned by loginYes

Response

{
  "available_po_credit": 0.5
}

Expectable errors

See error conventions section for explanation how error system works.

Expectable errors for all information actions

Label Additional data Description
INFORMATION_ACTION_MISSINGNoneProblem in client. Last action part missing.
INVALID_INFORMATION_ACTIONNoneProblem in client. Invalid action.