Home » Developers » Shapeways API » Help with Automatic Ordering from my Site?
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
Help with Automatic Ordering from my Site? [message #64287] Sun, 17 March 2013 08:25 UTC Go to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
So I'm looking at the API docs with my 1990's web brain...

This setup automates uploading a model, so you can link a customer to its page, OK. And it can put a model in the cart. But it's your cart, right? I.e. you can't put a model in a cart and then refer the customer to that cart so they are prompted to check out with it?

But here's my real question. At Shapewright and MixeeMe, when you buy a model you check out through their sites, you don't visit Shapeways at all. I understand how the API is sending those models to SW. But it seems like it doesn't automate passing a shipping address, or any other customer information. Does that mean these setups have a human being who every day looks at their incoming orders and turns around and types them into SW's cart? They'd have to check out with each one individually, since they're all going to different addresses. Crying or Very Sad

Or are they having every day's huge (I imagine) cartful of models shipped to themselves and then forwarding them to customers? That seems even more unscalable. Dead

I want to join the club and have a geometry generator and make it automatically sell models fulfilled by SW. But I'd like my customers to check out through my own site, and I don't want to have to touch the orders. It looks like these sites must be doing that, but I'm not getting how.

Can someone point me in the right direction?

Thanks,

[Updated on: Sun, 17 March 2013 08:30 UTC]


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #64339 is a reply to message #64287 ] Mon, 18 March 2013 16:26 UTC Go to previous messageGo to next message
avatar admin_nathan  is currently offline admin_nathan
Messages: 17
Registered: December 2011
Go to my shop
Junior Member
I code here
Hey Bathsheba,

With the API, you ask for permission to work with a user's account and then you can upload, add to cart, etc to that user's account. The user's access token is what gives you this permission. See this page for a description on how this works: http://developers.shapeways.com/getting-started#authenticate

If you want to upload the model to your account, but add that model to the customer's account, you would need both your own access token (different than your consumer key) and the customer's access token. When uploading, use your access token. When adding to cart, use the customer's. At that point, you can redirect the customer to http://www.shapeways.com/cart so they can checkout.

One caveat in this system - you can only add a public / for sale model to cart via the API (unless you're adding it to the model owner's cart), so when you upload the model make sure to choose your visibility settings appropriately.

- Nathan
Re: Help with Automatic Ordering from my Site? [message #64380 is a reply to message #64339 ] Mon, 18 March 2013 21:06 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
Hi, thanks for getting back!

Quote:

With the API, you ask for permission to work with a user's account and then you can upload, add to cart, etc to that user's account. The user's access token is what gives you this permission. See this page for a description on how this works: http://developers.shapeways.com/getting-started#authenticate

I can't say I understand this from the docs -- is "consumer" me or the customer? -- but probably it will make more sense when I start coding. OK, this would solve my first question of how to put something in the cart and let the customer check out with it.

What about what MixeeMe is doing -- checkout on their own site and then fulfillment though Shapeways -- is that supported? I get that I can put a model in my own cart, but l'm not seeing anything about how to set a different shipping address.

Quote:

One caveat in this system - you can only add a public / for sale model to cart via the API (unless you're adding it to the model owner's cart), so when you upload the model make sure to choose your visibility settings appropriately.


This is very sad, because one purpose here is to enable sales of individually customized items. If the items have to be left as public/for-sale, then I can't tell the customer he's getting a unique build that no one else will have.

Any hope to improve on that?

Thanks much,

[Updated on: Mon, 18 March 2013 21:15 UTC]


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #64464 is a reply to message #64380 ] Wed, 20 March 2013 03:01 UTC Go to previous messageGo to next message
avatar admin_nathan  is currently offline admin_nathan
Messages: 17
Registered: December 2011
Go to my shop
Junior Member
I code here
Quote:

I can't say I understand this from the docs -- is "consumer" me or the customer? -- but probably it will make more sense when I start coding. OK, this would solve my first question of how to put something in the cart and let the customer check out with it.

The "consumer" is your "app" that gets access to a user account (yours or the customer's).

Quote:

What about what MixeeMe is doing -- checkout on their own site and then fulfillment though Shapeways -- is that supported? I get that I can put a model in my own cart, but l'm not seeing anything about how to set a different shipping address.

We don't support order placement via the API (except for add to cart). A customer must check out on shapeways.com if you want no part in the fulfillment.

Quote:

Quote:

One caveat in this system - you can only add a public / for sale model to cart via the API (unless you're adding it to the model owner's cart), so when you upload the model make sure to choose your visibility settings appropriately.

This is very sad, because one purpose here is to enable sales of individually customized items. If the items have to be left as public/for-sale, then I can't tell the customer he's getting a unique build that no one else will have.

Any hope to improve on that?

I believe we will eventually support private models via the API.
Re: Help with Automatic Ordering from my Site? [message #64555 is a reply to message #64464 ] Thu, 21 March 2013 05:39 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
Thanks for clarifying! Much appreciated.

Quote:

I believe we will eventually support private models via the API.

I live in hope.

Thanks again,


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #65015 is a reply to message #64555 ] Wed, 27 March 2013 18:59 UTC Go to previous messageGo to next message
avatar MrNibbles  is currently offline MrNibbles
Messages: 97
Registered: August 2012
Go to my shop
Member
After a cursory look at the API information I'm thinking my 1980's computer science courses consisting of FORTRAN and assembly language programming are not going to cut it in this endeavor. Where's the Shapeways API for Dummies book when you really need it?
Re: Help with Automatic Ordering from my Site? [message #65136 is a reply to message #65015 ] Fri, 29 March 2013 20:12 UTC Go to previous messageGo to next message
avatar admin_nathan  is currently offline admin_nathan
Messages: 17
Registered: December 2011
Go to my shop
Junior Member
I code here
Hey MrNibbles,

MrNibbles wrote on Wed, 27 March 2013 18:59

After a cursory look at the API information I'm thinking my 1980's computer science courses consisting of FORTRAN and assembly language programming are not going to cut it in this endeavor. Where's the Shapeways API for Dummies book when you really need it?

It may be useful to look at some of our reference clients on github - https://github.com/Shapeways/shapeways-api - if you have a background in computer science it shouldn't be too difficult to decipher the example code and write some of your own Smile

- Nathan
Re: Help with Automatic Ordering from my Site? [message #65192 is a reply to message #65136 ] Sat, 30 March 2013 18:39 UTC Go to previous messageGo to next message
avatar MrNibbles  is currently offline MrNibbles
Messages: 97
Registered: August 2012
Go to my shop
Member
Thanks for the information link. As an RF electrical engineer I could easily design you a microwave amplifier or a radio receiver but I may have finally met my match trying to do this. Not that I won't take it as a challenge to try of course! A framework or check list of basic instructions along with good examples of a simple test case are always a good starting point. When all else fails, outsource! Very Happy
Re: Help with Automatic Ordering from my Site? [message #65368 is a reply to message #64287 ] Tue, 02 April 2013 17:27 UTC Go to previous messageGo to next message
avatar whughes98144  is currently offline whughes98144
Messages: 2
Registered: February 2013
Go to my shop
Junior Member
Wow, I agree that this is mostly what I'd hope for as well with this API: automatic fulfillment. If we can't specify a different shipping address when placing orders, then this doesn't do me much good.

Just 'adding to cart' is a good first start but you need all the additional steps to place the order, the first step of which is 'Shipping address".

I'm perfectly happy with all orders going through my account, but I need to be able to ship them elsewhere. I understand Shapeways concern of 1000 orders getting placed via computer with 1000 different addresses, all for the same part. Or worse, all with *slight* differences. I have no idea how you actually figure out which piece is which order currently, as they're all just this jumble in a big vat of powder, right?

Regardless, what I think the API community (all 3 of us?? ;->) is to be able to take this to its logical conclusion.

And understand, what I'm trying to write is an *AMAZON* connector. (Queue scary music)

Thank,

Will
Re: Help with Automatic Ordering from my Site? [message #65408 is a reply to message #65368 ] Wed, 03 April 2013 11:49 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
Guys, I love you and know that you want the best for us, but OAuth isn't working for me.

I'm not a stranger to APIs. My site interfaces every day with UPS, USPS, Paypal, Quickbooks, my credit card processor, my fulfillment house, and my laser glass supplier. I wrote all the code to talk to their different APIs, with my own fingers. But this API...I'm a shopkeeper, it's many years since I programmed professionally. I can't spend this much time getting up to speed on authentication protocols that the modules for aren't even finished yet. I understand that it's the latest and most awesome thing, and that you thought about it carefully, and that it does a very clever thing which I'm sure will be useful to brighter people than me, but -- I have to tell you -- it's an unbelievable hairball and I don't need this functionality.

I don't need a sophisticated three-legged authorization process. I just want to upload and buy parts -- with me as your customer -- and get them shipped to people. I'm hoping to do this so often that I need to automate it.

Can we have a simple API where my site can log in and do that?

I promise you won't need to deal with the people I'm shipping to. I'm your customer here, and responsibility for downstream interactions stays with me.

You won't miss out on reaching these people. Shapeways will be linked from the site that does this, as it is from almost every page of my site. People will get their packages with your branding. Every transaction through this setup is a safe transaction because it's with me, your known customer, and also it puts your name and work in the hands of someone new, in the best possible way.

I swear to God that if you do this I will try really hard to sell a lot of parts. But I've put in a great deal of time and effort trying to work with your current setup, and I can't make it make sense, either intrinsically or in terms of what I'm trying to do.

Help me out here?

Thanks as always,


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #65498 is a reply to message #65408 ] Thu, 04 April 2013 20:06 UTC Go to previous messageGo to next message
avatar admin_nathan  is currently offline admin_nathan
Messages: 17
Registered: December 2011
Go to my shop
Junior Member
I code here
Bathsheba wrote on Wed, 03 April 2013 11:49

Guys, I love you and know that you want the best for us, but OAuth isn't working for me.

Bathsheba - OAuth is an important and necessary step in integration with the API. What language are you using? Maybe we can help you get it working.

- Nathan
Re: Help with Automatic Ordering from my Site? [message #65672 is a reply to message #65498 ] Sun, 07 April 2013 13:21 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
admin_nathan wrote on Thu, 04 April 2013 20:06

What language are you using? Maybe we can help you get it working.


Perl, sadly. I have Net::OAuth[::Simple|::Client], but the methods they offer don't seem to correspond with the PHP that you have up.

If you can show me an example I would be interested and grateful.


Update:
Using Net::OAuth I got as far as authenticating a user and obtaining access token/secret, but so far I am not able to understand how to upload a file. I would appreciate an example on this. As far as I can tell there is no example on the Internet of someone successfully using Perl with this protocol to send user data. (One guy said he did it but apparently forgot to attach the final (working) draft of his code to his BBS post.)

*sigh* This is a lot of work for something that doesn't close the sale. Is there no possibility of adding checkout capability? I don't want to check customers out, I just want to finish transactions as myself. Is there a reason that can't happen? I thought we were friends.

Thanks,

[Updated on: Wed, 10 April 2013 07:20 UTC]


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #65808 is a reply to message #65672 ] Tue, 09 April 2013 13:31 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
I have with great difficulty succeeded in uploading a model using Perl with Net::OAuth.

Quote:

*sigh* This is a lot of work for something that doesn't close the sale. Is there no possibility of adding checkout capability? I don't want to check customers out, I just want to finish transactions as myself. Is there a reason that can't happen? I thought we were friends.

Still my question. I'm implementing this to brush up my skills and in the hope that it will become useful later, but checkout is what's needed here.

Again, I live in hope...

[Updated on: Wed, 10 April 2013 07:21 UTC]


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #65819 is a reply to message #65808 ] Tue, 09 April 2013 15:02 UTC Go to previous messageGo to next message
avatar hgbrian  is currently offline hgbrian
Messages: 3
Registered: April 2012
Go to my shop
Junior Member
I agree with Bathsheba's points here.

I was very surprised that the model has to be made public -- this doesn't work for many (most?) purposes. If MixeeMe and Shapewright are taking and fulfilling orders themselves and creating models on shapeways manually, that seems to defeat the purpose of the API.

Is the API still under active development?

[EDIT: Sorry, I didn't realize that this site was in fact brand new! I am still curious about plans for developing the API to accommodate printing non-public models and shipping them to different customers.]

[Updated on: Tue, 09 April 2013 16:06 UTC]

Re: Help with Automatic Ordering from my Site? [message #65882 is a reply to message #65819 ] Wed, 10 April 2013 12:09 UTC Go to previous messageGo to next message
avatar Bathsheba  is currently offline Bathsheba
Messages: 323
Registered: August 2008
Go to my shop
Senior Member
Is there a way to set the default material of a model?

[Updated on: Wed, 10 April 2013 12:13 UTC]


-Bathsheba
http://bathsheba.com
Re: Help with Automatic Ordering from my Site? [message #66006 is a reply to message #65882 ] Thu, 11 April 2013 17:24 UTC Go to previous messageGo to next message
avatar admin_nathan  is currently offline admin_nathan
Messages: 17
Registered: December 2011
Go to my shop
Junior Member
I code here
Bathsheba wrote on Wed, 10 April 2013 12:09

Is there a way to set the default material of a model?

I don't believe that option is currently supported, but I'll raise it internally since it should definitely be available.
Re: Help with Automatic Ordering from my Site? [message #67562 is a reply to message #66006 ] Mon, 06 May 2013 19:40 UTC Go to previous messageGo to next message
avatar FabMeJewelry  is currently offline FabMeJewelry
Messages: 247
Registered: December 2012
Go to my shop
Senior Member
The API is for the superior shop owner i think ? When I'm not designing I program 4 different kind of welding robot's but that's kindergarten compared to this Very Happy

Is it possible to make some API code generators for different uses, make it easy just like http://www.shapeways.com/labs !


Karen & Wesley - FabMeJewelry.com - Set a course, for the future !
Re: Help with Automatic Ordering from my Site? [message #90319 is a reply to message #67562 ] Fri, 23 May 2014 08:38 UTC Go to previous messageGo to next message
avatar saida  is currently offline saida
Messages: 2
Registered: July 2010
Go to all my models
Junior Member
After trying the API myself, I would like to second Batsheba and some of the others here, despite the thread not exactly being new.

My customers are not necessarily Shapeways users. They are not experts. That's why they use my site for getting things designed rather than uploading their own STLs.
Requiring them to sign in to Shapeways when buying makes it a truly customer nightmare process for those that don't already have an account, whereas - as Batsheba said - no marketing effort is lost with all the remaining branding possibilities for Shapeways.

The main concern is that customers want one accountable vendor. If they have to log in to other stores along the process, they'll be asking themselves: 2 logins for one order? Are they trying to turn me away, or who will be responsible if my order goes wrong?
That's a showstopper.

I wonder how many people suffer the same issue of not being able to take orders without having to route customers back and forth, and just order on behalf of their customers through Shapeways, using the address details provided by the customer.

It looks from this thread like there are quite many, and to me it looks like even featured shops such as mixeelabs et al have to "deal with homebrew code" (see "mixeelabs question" in forum) to close the deal.

The use-case above would be simply solved with a private key that's capable of connecting to your own account, plus setting a shipping address and that's it!

As I see it, OAuth addresses a different need, the "Jane wants to print her flickr photos on printer.example.com without giving away her flickr password". For those of us who want to create customized products, the customer does not already have them stored on their private 3dflickr. Even printing from thingiverse to shapeways would be different because those files are public anyway, so no need for tokens.
What is the main use-case behind the OAuth then?

Would be glad to hear Shapeways thoughts, have you spent any thought about making the shipping part easier in the meantime? Or is there already some feature I have missed?
Thanks!
Re: Help with Automatic Ordering from my Site? [message #90339 is a reply to message #90319 ] Fri, 23 May 2014 17:35 UTC Go to previous messageGo to next message
avatar stonysmith  is currently offline stonysmith
Messages: 1861
Registered: August 2008
Go to my shop
Senior Member
moderator
Those API calls were written before Shapeways updated the site to allow "guest" purchases.

Just thinking about what would be required... Some kind of 'session' identifier would have to be created on the behalf of the buyer and passed back and forth between your site, Shapeways, and the buyer's browser. Keeping all of that secure might be tricky.


Patience, Persistance, Politeness - the 3Ps will help us get us to Perfect Printed Products
Re: Help with Automatic Ordering from my Site? [message #90346 is a reply to message #90339 ] Fri, 23 May 2014 20:21 UTC Go to previous message
avatar saida  is currently offline saida
Messages: 2
Registered: July 2010
Go to all my models
Junior Member
OK lets see if we can build a case. The need is for shops who help users create custom products (and produce them via Shapeways) to automatize their customers orders via Shapeways, while not asking customers to leave the shop (plus allowing private products, just to be complete).

I've checked the first few api discussion link, writing down the names of users that seemed to request this explicitely:
- batsheba, whughes98144, hgbrian (this thread)
- Kandam90, pupworkshop, MixeeMe, alexivanovic ( https://www.shapeways.com/forum/index.php?t=msg&th=16740 &start=0&)
- FearlessForms ( https://www.shapeways.com/forum/index.php?t=msg&th=16713 &start=0&)

I've stopped there... I haven't counted a number of others that weren't able to figure out how to integrate with the existing api (which I suspect might be for the same reason, that the api is not targeted enough at their need)

Then, looking at some apps that are featured in shapeways app page: Batsheba, nervous systems, Mymo, Kinematics, MixeeMe, Pupworkshop, Freakin sweet apps.. they all seem to have in common that they would benefit from an automated ordering system.

In summary I think there's a need.

Regarding what would be required: I may be oversimplifying this but I don't think it's a whole lot.
Stores want to ask customers for shipping addresses and then (automatically) ask Shapeways to make and send products to them, via the API.

I don't think sessions would have to be passed. Take a similar process:
When I order on Shapeways, I'll get a UPS package with my thing. But I'll never have any interaction with UPS. UPS will just assume Shapeways is handling the interaction with me as a customer, and also if my thing never arrives I'm most likely going to Shapeways first. Lets say UPS claimed they never got the order. I would then have the expectation that Shapeways deals with UPS, not myself.

To come back to our situation, I would see a similar process:
- I'm using the shapeways API to calculate my custom models prices, material etc.
- my customer selects the object, orders, pays me and provides a shipping address.
- I'll then deal with Shapeways to make the order happen and get it delivered to the customer

And that's what already happens now. It's just so manual that - unless I'm missing something - is rather a pain and doesn't scale at all => less shops and less income for Shapeways.

But Shapeways already has all the infrastructure to make it happen. I'm thinking about a solution along these lines:
- customer designs with the help of my shop (I use existing APIs to check price etc) - Done
- customer orders, providing me with an address and paying for the order (paypal, stripe etc) - Done
- I have a static API key to programmatically connect to *just* my own shapeways shop. After checking into OAuth1 I see that an authorized auth_token should never expire, so I can use that as my API key - Done
- Now, I simply need to make an order to a custom address and send you the money, all *from within* my shop. That's similar to UPS getting the order from Shapeways, not from the customer.
1. For the money transfer, I could make a manual bank transfer covering any number of orders - Done.
2. I need to have an API call sequence somewhere along these lines:
.setShippingAddress(), .getShippingPrice(), .getTotalAmount(), maybe .getOrderSummary(), and .checkout().

That would be it. No additional tokens etc.
Am I missing something?

 
   
Previous Topic:Looking for a developer to help us build an app
Next Topic:Shop Text Formating

Logo

Hello.

We're sorry to inform you that we no longer support this browser and can't confirm that everything will work as expected. For the best Shapeways experience, please use one of the following browsers:

Click anywhere outside this window to continue.