Home »  » Shapeways API » A few questions regarding the API
Search Search  
Show: Today's Messages    Show Polls    Message Navigator
icon5.gif  A few questions regarding the API [message #26092] Fri, 15 April 2011 11:58 UTC Go to next message
avatar sjorro  is currently offline sjorro
Messages: 7
Registered: April 2009
Go to my shop
Junior Member
Hi all,

I have a few questions regarding the shapeways API.
I already asked Shapeways Eindhoven (it's in coop-mode with them), they told me to also post it on the forum.

For those of you who don't know what I am creating:
I'm creating an application wich will be available on shapeways in the near future. It leveradges a certain formula to let users create their own models; models that are allways printable.


So here it goes:

Login:
Currently I am logging in as the applications' (*my own) account. I also send an application id (*'supershapes')
When I upload the model I have to use the session_id returned from this login.

Should I login as the application or should I make the user login?


Materials:
As I mentioned before in a previous post, but for complete overview:
When I get the materials from the api, the color comes in like: <base_color xsi:nil="true"/>

Can this be fixed so that I can show the right colors on the model?


Price:
When calling the getprice method, I should send to shapeways the volume of the model. Shapeways has already a method implemented in the site to do this.
Is it possible to get a code-snippet so that the price shown in my application on shapeways is almost exactly the same as shown on shapeways later on?

I want to show the price beforehand, because when the user is going to the order page, the flash is closed and the user can't go back to his/her model.


Upload with MaterialID:
When uploading a model I can't send in a material_ID.
Can this be added?

After uploading a model I want a user to order his model with a certain material, from which he/she already agreed on the size and pricing, which requires me to send in a material chosen for the model


Upload Model Check:
After model upload shapeways performs certain checks on the model to ensure model integrity.
This check takes a few minutes for my high-res models, which I would like to omit for the end-users' sake.
Can this check be avoided in some way? (for example using my application id?)

I already build these models programmaticly, so they are allways printable, and before going live the program will be tested accordingly.


Order:
When a user has completed the flashprogram and uploaded it's model with a certain size and material, he/she would like to order it.

In the current situation the model is uploaded into his/her store.

Can the model be uploaded to the supershapes store, and the user be redirected directly to the order-page of the model, by using for example the session-id (or the model-upload_id, gotten from the upload)?


I hope to get some clarity through this... Smile

Kind Regards,

Sjoerd van den Berg.
Re: A few questions regarding the API [message #26342 is a reply to message #26092 ] Fri, 22 April 2011 03:24 UTC Go to previous messageGo to next message
avatar robert  is currently offline robert
Messages: 413
Registered: December 2007
Go to all my models
Senior Member
I work here
sjorro wrote on Fri, 15 April 2011 11:58


Should I login as the application or should I make the user login?


That depends on what you want. Both are possible. If you want to set a markup on the model you should upload and login using your shop account.
Quote:


Materials:
Can this be fixed so that I can show the right colors on the model?


Yes we will fix this.
Quote:


Price:
When calling the getprice method, I should send to shapeways the volume of the model. Shapeways has already a method implemented in the site to do this.
Is it possible to get a code-snippet so that the price shown in my application on shapeways is almost exactly the same as shown on shapeways later on?

I want to show the price beforehand, because when the user is going to the order page, the flash is closed and the user can't go back to his/her model.


I am not sure what you mean. How is the price different via the API versus what you see on the website?
Quote:


Upload with MaterialID:
When uploading a model I can't send in a material_ID.
Can this be added?


That is correct. The user can select the material on shapeways.com. It does sound useful to me to be able to set the material restrictions through the API.
Quote:


Upload Model Check:
After model upload shapeways performs certain checks on the model to ensure model integrity.
This check takes a few minutes for my high-res models, which I would like to omit for the end-users' sake.
Can this check be avoided in some way? (for example using my application id?)


We can consider this. I can even imagine that we allow the model to go through directly from trusted / certified applications and do the validation in the background (just to be sure).
Quote:


Order:
Can the model be uploaded to the supershapes store, and the user be redirected directly to the order-page of the model, by using for example the session-id (or the model-upload_id, gotten from the upload)?


If you use your shop username / password you can directly upload the model to your own store.

There is a hidden feature. If you use application-id = "generated-creator" the submitModel method will return the model_id upon success instead of TRUE.

Best,

Robert
Re: A few questions regarding the API [message #26353 is a reply to message #26342 ] Fri, 22 April 2011 07:29 UTC Go to previous messageGo to next message
avatar sjorro  is currently offline sjorro
Messages: 7
Registered: April 2009
Go to my shop
Junior Member
Hi Robert,

Thank you for your reply!

The thing I mean with the price is the following:

Quote (me):
Price:
When calling the getprice method, I should send to shapeways the volume of the model. Shapeways has already a method implemented in the site to do this.
Is it possible to get a code-snippet so that the price shown in my application on shapeways is almost exactly the same as shown on shapeways later on?

I want to show the price beforehand, because when the user is going to the order page, the flash is closed and the user can't go back to his/her model.

Quote (Robert):
I am not sure what you mean. How is the price different via the API versus what you see on the website?


What I mean is:
After uploading a model in any kind of way, shapeways shows a price calculation based on the volume of this model.

Shapeways already has some kind of code to calculate this volume.

Could I get this piece of code, to make sure my calculation of the volume is exactly the same as the calculation of volume shapeways does.

This means I would get the exact same volume of the model shapeways does, result: same price display.


Kind regards,


Sjoerd van den Berg.
Re: A few questions regarding the API [message #26513 is a reply to message #26353 ] Mon, 25 April 2011 16:53 UTC Go to previous messageGo to next message
avatar robert  is currently offline robert
Messages: 413
Registered: December 2007
Go to all my models
Senior Member
I work here
Ah but you can use the upload API to get the price.

The method getModelPrice() allows you to get the price of a model.

The reason is that we would like to be able to change price model at a moment's notice and if you would build it into your application the price calculations can go out of sync.

Best,

Robert
Re: A few questions regarding the API [message #26536 is a reply to message #26513 ] Mon, 25 April 2011 23:09 UTC Go to previous messageGo to next message
avatar mctrivia  is currently offline mctrivia
Messages: 808
Registered: September 2010
Go to my shop
Senior Member
What we need is the formula to compute the volume. That way we can have the same price on our side as on your side.

For example I sell most of my products for $9.99. I compute the volume calculate the cost then subtract this from what I want to sell it for to give you the markup. If my volume is off though I may show for $10 or $9.98. or worse. I do not set say $2 markup per model.


Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/
Re: A few questions regarding the API [message #26555 is a reply to message #26536 ] Tue, 26 April 2011 07:12 UTC Go to previous messageGo to next message
avatar sjorro  is currently offline sjorro
Messages: 7
Registered: April 2009
Go to my shop
Junior Member
That's right, what I meant is exactly what Matthew says.
We need the formula to calculate the volume, to ensure price display is correct.

Regards,

Sjoerd van den Berg.
Re: A few questions regarding the API [message #26558 is a reply to message #26555 ] Tue, 26 April 2011 07:32 UTC Go to previous messageGo to next message
avatar mctrivia  is currently offline mctrivia
Messages: 808
Registered: September 2010
Go to my shop
Senior Member
I have added this as feature request 9. Hopefully we will start seeing some of the requests done soon.


Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/
Re: A few questions regarding the API [message #26772 is a reply to message #26558 ] Sat, 30 April 2011 03:22 UTC Go to previous messageGo to next message
avatar robert  is currently offline robert
Messages: 413
Registered: December 2007
Go to all my models
Senior Member
I work here
We are in the process of making available a reference application for the volume calculation. It will be available as open source.

It probably takes another week to get it out there together with some other goodies.

Just hold tight!

Robert
Re: A few questions regarding the API [message #26827 is a reply to message #26772 ] Mon, 02 May 2011 06:53 UTC Go to previous messageGo to next message
avatar sjorro  is currently offline sjorro
Messages: 7
Registered: April 2009
Go to my shop
Junior Member
Thanks Robert, you're the best! Very Happy

Smile
Re: A few questions regarding the API [message #44844 is a reply to message #26092 ] Sat, 03 March 2012 19:48 UTC Go to previous messageGo to next message
avatar abite  is currently offline abite
Messages: 47
Registered: February 2012
Go to my shop
Member
Hi. Any updates on the reference application of the volume calculation? I'm still trying to solve the issue.

I solved it using cURL. cheers~

[Updated on: Wed, 28 March 2012 06:52 UTC]

Re: A few questions regarding the API [message #71645 is a reply to message #44844 ] Tue, 16 July 2013 06:40 UTC Go to previous messageGo to next message
avatar wangzhaoguang  is currently offline wangzhaoguang
Messages: 14
Registered: September 2012
Go to my shop
Junior Member
abite wrote on Sat, 03 March 2012 19:48

Hi. Any updates on the reference application of the volume calculation? I'm still trying to solve the issue.

I solved it using cURL. cheers~



Hello abrit

Would you please share with me your solution, because now i am working on my own website:
(1) i want to use shapeways API to get the model olume;
(2) i, also, want to define my own price factor to display a price for the customer.

Best regards

zhaoguang WANG
Re: A few questions regarding the API [message #71655 is a reply to message #71645 ] Tue, 16 July 2013 10:19 UTC Go to previous message
avatar bartv  is currently offline bartv
Messages: 1668
Registered: December 2007
Go to my shop
Senior Member
Hey Wangzhaoguang,

this discussion is quite old and is referencing our previous API. Please take a look here for the full documentation of the latest version:

https://developers.shapeways.com/

Cheers,

Bart


Community Manager Europe | Shapeways

 
   
Previous Topic:redirect loop when trying to manage apps
Next Topic:post request with php curl?

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.