Print
Hits: 6922

It exposes core business logic and data allowing the integration with other systems, mainly mobile and frontend applications, using REST web services. 

Why OCC is different from Web Service API?

Key Concepts

Key Features

ycommercewebservices extension

Requests

Usual Sequence of requests to place an order

These requests are stateful if you are using version 1 of the web services. A cookie is generated for the cart which must be sent in the subsequent requests.

Version 2 doesn't use sessions. The ID of the cart is used instead.

  1. Log in using the client credentials (POST /rest/oauth/token) if anonymous access to the web services is deactivated. The result must be the same as browsing the website as an anonymous user.
  2. Create customer (POST /customer)
  3. Log in as the new customer (POST /rest/oauth/token)
  4. Create a new address (POST /customers/current/addresses)
  5. Get the current cart (GET /cart). Save the cookie.
  6. Add entries with (POST /cart/entry)
  7. Set the delivery address (POST /cart/address/delivery or DELETE and PUT)
  8. Get the available delivery modes (GET /cart/deliverymodes)
  9. Set a delivery mode (PUT /cart/deliverymodes/)
  10. Create a payment information (POST /cart/paymentinfo)
  11. Authorize the payment using a credit card (POST /cart/authorize)
  12. Place order (POST /cart/placeorder)
  13. See the orders (GET /orders)
  14. Log out (POST /customers/current/logout)

Available Requests

Other Scenarios

The Hybris Documentation has a good description of the required requests: OCC Sample Flows

OAuth 2.0

Futher Reading

The Right Flow for the Job: Which OAuth 2.0 Flow Should I Use?

Creating an AddOn for OCC Web Services

Pitfalls

Based on Hybris version 5.3