Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

REST API is facilitated by Spring MVC where controllers are mapped to XML and JSON view resolvers. The choice of whether to use XML or JSON in request and/or response body is controlled via request headers: Content-Type for request body type and Accept for the response body type. Currently only XML and JSON modes are supported with "application/xml" and "application/json" values respectively. Request and response type in all YC REST all REST API calls are independent of each other, so it is possible to send JSON request and receive XML or JSON response and send an XML request and receive XML or JSON response - it all depends on the values in "Content-Type" and "Accept" headers sent with the request.

...

Step 4 finishes with PUT /order/preview call that shows all details for newly created temporary order and additional hints for payment processing. At this point third party system (e.g. mobile application) must identify whether this payment method requires transfer of control to third party payment system (e.g. redirect to PayPal web site, or some payment mobile app) or whether YC can the platform can process this payment.

If YC can the platform can process the payment it is made by POST /order/place call.

...