Api Guest Checkout

Discussion in 'Shapeways API' started by rithmikansur, Jan 17, 2018.

  1. rithmikansur
    rithmikansur Member
    I feel like this is a silly question.
    But, I read a lot of forum posts and i'm confused as to what the API can and cannot do at this point.
    As well as where the separation from my account and the end users is.

    All I really want to do, is host a website where a user can customize a model.
    When they hit "buy now"
    My server will do the customization programatically.
    Upload the file to my shapeways account, marking it as for sale publicly.
    Then place it in a shopping cart for them.
    Whether they are a guest or an existing shapeways user doesn't matter to me.
    I just want to get it into their cart and let them check out on shapeways and have shapeways process the payment, produce it and ship it to them.
    Is this what the process was designed to do?
    I don't want to get all the way to the end of this program and find out that i'm shipping everything to myself, and that i then have to then re-ship to my customers.
    Again, It feels like a silly question.
    But, I was hoping someone could verify because i'm not 100% confident in my understanding of the API design.
    Thanks!
    Rith
     
  2. hans_lambermont
    hans_lambermont Shapeways Employee Dev Team
    Hi Rith,

    If I understand your desired use-case right you want to access two accounts at Shapeways via the API; yours and your users'. This can be done but I wonder if it really is what you want.
    This question should help get it clear : do you want the model upload to be for sale publicly to anyone or just for your user ? (both can be done, just trying to get things clear).

    Next, from a Shapeways account you cannot just add a product to someone elses cart. A user can only add products to their own cart. Of course these products need not be their own, they can select for-sale products from others via the shops.

    If you want the model (that you upload via the API) to be for sale publicly to anyone then you can for instance share a URL to your product in your shop so that your users can order it. The model file is yours and stays in your shop.

    If on the other hand you want the model to be exclusive for your customer then you can use the API with what OAuth was originally designed for: to access their account at Shapeways where they can upload the model to their own account and even put it in their own cart. They can then subsequently order it via the website. The model file in this case is then theirs, not yours.

    I hope this helps make the options more clear.

    -- Hans

    ps. you can also reach the api team at api@shapeways.com
     
  3. rithmikansur
    rithmikansur Member
    I don't really need to access two accounts.
    I only need the App to access my account to upload the model and make it publicly available to purchase.
    The person who is using the App can be a guest or an existing shapeways member.

    I just want the "Buy Now" button to be on my website.
    Once they press "Buy Now" the model will be uploaded to my shapeways account and made a public product.
    Then I would use the model id from the response to GET or POST something like..
    https://www.shapeways.com/cart/addMultiple?model_id[]=999999
    If that succeeds, then i'll redirect to...
    https://www.shapeways.com/checkout/confirm

    Does that make sense?