Problem With Pricing After Model Upload

Discussion in 'Shapeways API' started by mingles, Sep 9, 2016.

  1. mingles
    mingles New Member

    I'm having problems with my application. This problem only started occurring a couple of days ago. It was fine prior to that. I believe something has changed with how Shapeways handles POST request on /models.

    Once a user has created their model on my site, it is uploaded to the Shapeways API. My application sets the markup and available materials for each sword, for example:

    'materials': {66: {'markup': 1.5, 'isActive': 1}, 6: {'markup': 1.5, 'isActive': 1}, 75: {'markup': 1.5, 'isActive': 1}, 76: {'markup': 1.5, 'isActive': 1},....

    the response I get back however doesn't take into account the markup, or even the price of that respective material despite the material being active (note materialId: 66):

    'materials': {u'122': {u'price': 0, u'markup': 0, u'isActive': 0, u'materialId': 122}, u'66': {u'price': 0, u'markup': 0, u'isActive': 1, u'materialId': 66}, u'104': {u'price': 0, u'markup': 0, u'isActive': 0, u'materialId': 104}, ....

    It also seems to disregard the defaultMaterialId despite having been set as a parameter in the original request:

    'defaultMaterialId': ""

    On the page where the model would be for sale, a price is listed, but "Not For Sale" is below. None of the materials are available.

    Curious if the parameters of the API have changed in the last couple of days as everything was working fine these past few months. If so, how do I fix this?
    Last edited: Sep 9, 2016
    Andrewsimonthomas likes this.
  2. Andrewsimonthomas
    Andrewsimonthomas Shapeways Employee Community Team
    Liking this because I saw it, not because i like it :)

    Flagging for the team to check into this.
    minglesFactory likes this.
  3. crnm
    crnm Shapeways Employee Dev Team
    Hi @mingles,

    Would you mind posting here or sending me a Private Message with the exact API call you made? This will make the issue a lot easier to find. You can omit the model file, I can use a dummy model instead.

  4. dmagn25
    dmagn25 New Member
    I'm having the exact issue, using PHP. Seems like something was changed recently; now all my uploads are showing as 'not for sale'. It worked before.
    To upload I use POST /models/v1 . Afterwards to change the markup I use PUT /models/{modelId}/info/v1 . I'm setting the isForSale parameter to 1.
    Please advise.

  5. imdaveho
    imdaveho Shapeways Employee Product Team
    Hey guys,

    We're investigating this issue. We fixed the "Not For Sale" issue, but the most recent mentions of markup not being set is something we're looking into.

    If you could provide additional information using this form: bitl.y/api-issues-form, that would be great.


    (Product Manager at Shapeways)
  6. nicolew
    nicolew New Member
    Hi @mingles and @dmagn25 - We believe that we have found the issue that you are referring to and have deployed a fix. Can you please try again and let us know if you continue to see any issues?


  7. mingles
    mingles New Member
    Yes, the issue has been fixed! Thanks for looking into it. I appreciate it.
    Andrewsimonthomas likes this.