Models that used to work are now "Not for sale"

Discussion in 'Shapeways API' started by hgbrian, Jan 20, 2014.

  1. hgbrian
    hgbrian Member
    I have some code that uploads a model to shapeways, but I just tried the code today after a couple of months of inactivity and the model is now "Not for sale"...

    Has there been a change in the API in the last month or two that would cause this?

    I POST my model to models/v1 with the following params:
    { "file": base64.b64encode(model_filedata),
    "fileName": model_filename,
    "uploadScale":0.001,
    "hasRightsToModel":1,
    "isPublic":1,
    "isForSale":1,
    "isDownloadable":1,
    "defaultMaterialId":6,
    "title":"Test",
    "description":"Test",
    "acceptTermsAndConditions": 1,
    }

    But when I try to access the model, there are no materials listed and the model is "Not for sale".

    Does anyone have any idea what changed?


     
  2. AlanHudson
    AlanHudson Shapeways Employee Dev Team
    if you haven't enabled any materials it wont be for sale. As of last month instead of all materials being enabled by default, no materials are enabled by default. Sorry we didn't communicate this non backwards compatible change well.

    You need to set at least one material to active:

    modelMaterials = { materialId : {isActive: 1}}
     
  3. hgbrian
    hgbrian Member
    Hi Alan,
    thanks for the response. I spent a bit of time on this over the weekend, and I thought it was working for me, but I haven't quite figured it out yet.

    Specifically, I have seen it happen that I upload a model, which is "Not for sale" but after refreshing several times (or perhaps waiting several minutes), all the materials become available! I'll spend a bit more time on it and get back to this thread.

    Best,
    Brian