Webservices

From Complete Cyclos documentation wiki
Jump to: navigation, search

Web Services

All web service are published in the URL <applicationURL>/services

Controller web services used by Cyclos

Payment request

Cyclos will invoke this operation to ask the Controller to confirm a payment request. It is published on <applicationURL>/services/paymentRequest with the next methods:

  • requestPayment: Send the payment request message to the member. The Controller will generate a session in order to match the member confirmation response, otherwise the session will expire (there is a parameter to specify the expiration time).
    • Input parameters:
      • cyclosId (string): Cyclos instance identifier.
      • ticket (PaymentRequestTicketVO): This ticket contains the payment information and the Controller will associate it to the generated session.

Notifications

Allow Cyclos to deliver notification messages to members. It is published on <applicationURL>/services/smsSender with the next methods:

  • send: Used by Cyclos to send a notification to a member.
    • Input parameters:
      • cyclosId (string): The Cyclos instance identification (used by the Controller to route the message).
      • memberVO (MemberVO): The target member that will be notified.
      • text (string): The notification's text.
    • Return: a boolean (true if the send was successful)

Controller web services used by Driver

Messaging

Allow the Driver to send a received message to the Controller. It is published on <applicationURL>/services/controller with the next methods:

  • send: Invoked by the Driver to transfer a received message.
    • Input parameters:
      • message (DriverMessage):
        • driverId: The driver identification. This parameter is used together with the message.to parameter.
        • message (Message):
          • from (String): The source cellphone number. This data is used by the controller to find the associated member.
          • to (String): The driver endpoint where messages arrive (the short number). This data plus the driverId are used by the Controller to find the Cyclos instance to work with.
          • text (String): The message's text.

Driver web services used by Controller

Messaging

Allow the Controller to send a message to the Driver. It is published on <applicationURL>/services/driver with the next methods:

  • send: Invoked by the Controller to send a message.
    • Input parameters:
      • message (ControllerMessage):
        • message (Message):
          • from (String): The source short number.
          • to (String): The target cellphone number.
          • text (String): The message's text.
          • provider (String): The provider must be used to deliver message.

Cyclos web services used by Controller

Puede encontrar detalles de los web services de cyclos utilizados por el controller en la documentación Cyclos 3.6 web service interfaces