Customer Interaction with CSG-EMS Store

  1. Customer lands at CSG-EMS Store homepage and follows link to the store.

    GET http://csg-ems.com/store/products/
    Accept
    application/xml, text/html;q=.7, */*;q=.1
    Accept-Charset
    unicode-1-1, iso-8859-1;q=0.8
    200 OK
    Last-Modified
    Mon, 04 Aug 2008 23:11:55 GMT
    Etag
    "3f80f-1b6-3e1cb03b"
    Content-Length
    438
    Content-Type
    text/html; charset=UTF-8
    Set-Cookie
    user=123456
    
    <products>
        <product id="1" href="http://csg-ems.com/store/products/1/"/>
        <product id="2" href="http://csg-ems.com/store/products/2/"/>
        <product id="3" href="http://csg-ems.com/store/products/3/"/>
    </products>
    
  2. Customer follows link to specific product.

    GET http://csg-ems.com/store/products/1/
    Cookie
    user=123456
    200 OK
    
    <products cart="http://csg-ems.com/users/123456/cart/">
        <product id="1" href="http://csg-ems.com/store/products/1/">
            <name>Product 1</name>
            <description>I am a description for Product 1</description>
            <price>$5.00</price>
        </product>
    </products>
    
  3. Customer adds product to cart.

    PUT http://csg-ems.com/users/123456/cart/1/
    
    <products>
        <product id="1" href="http://csg-ems.com/store/products/1/"/>
    </products>
    
    201 Created
    Location
    http://csg-ems.com/users/123456/cart/1/
  4. Customer checks out.

    POST http://csg-ems.com/store/orders/
    Cookie
    user=123456
    412 Precondition Failed
    Location
    http://csg-ems.com/forms/newuser/
  5. Redirected to newuser form

    200 OK
    
    <users>
        <user>
            <name/>
            <email/>
            <username/>
            <password/>
        </user>
    </users>
    
  6. Submits form

    PUT http://csg-ems.com/users/123456
    
    <users>
        <user>
            <name>John Doe</name>
            <email>doe@email.com</email>
            <username>johndoe</username>
            <password>password</password>
        </user>
    </users>
    
    201 Created
    Location
    http://csg-ems.com/users/123456/
  7. Customer checks out.

    POST http://csg-ems.com/store/orders/
    Cookie
    user=123456
    201 Created
    Location
    http://csg-ems.com/store/orders/