Ponoko

Developer Resources

API reference

» Supported file formats
» Material catalog responses
» Design file warnings and errors
» US state codes
» Country list
» Order events
» API error responses


Supported file formats
2D file formats

• EPS - Encapsulated Postscript
• SVG - Scalable Vector Graphics

See 2D Design Rules for more information

3D file formats

• STL - Stereolithography
• DAE - Digital Asset Exchange
• VRML 97 - Virtual Reality Modeling Language

See 3D Design Rules for more information


top
Material catalog responses
2D materials - sheet
{
  "material_type": sheet,
  "kind": << material kind >>,
  "name": << material name >>,
  "color": << material color >>,
  "type": << material type >>,
  "thickness": << thickness >>,
  "weight": << weight >>,
  "length": << length >>,
  "width": << width >>,
  "dimensions": {
    "metric": {
      "thickness": << thickness >>,
      "weight": << weight >> : 0.0,
      "length": << length >>,
      "width": << width >>,                                    
    },
    "imperial": {
      "thickness": << thickness >>,
      "weight": << weight >> : 0.0,
      "length": << length >>,
      "width": << width >>,
    }
  },
  "key": << material key >>,
  "updated_at": << last modified date and time >>
}
3D materials - printed
{
  "material_type": printed,
  "name": << material name >>,
  "key": << material key >>,
  "updated_at": << last modified date and time >>
}

top
Design file warnings and errors

When design files are uploaded we automatically check that they adhere to our design rules, if they don't errors will be raised and the files rejected.

Warnings will be included in the request response if we detect potential problems.

Warnings format
{
  "warnings": [
    {
      "name": << file name >>,
      "warning_code": << warning code >>,
    }
  ]
  ...
}
Errors format
{
  "error": {
    "message": "Bad Request. Error processing design file(s).",
    "errors": [
      {
        "name": << file name >>,
        "error_code": << error code >>,
        "type": "design_processing"
      }
    ],
    ...
  }
}

2D warning codes
   
missing_cut_lines   Design contains no cutting lines
     
2D error codes
   
blue_fills   Contains elements with blue fills.
green_fills   Contains elements with green fills.
red_fills   Contains elements with red fills. 
pattern_fill   Contains elements with pattern fills.
fonts   Contains text that is still fonts, not paths.
colors   Contains unsupported colors.
incorrect_black   A black that is not 0, 0, 0 is used.
incorrect_blue   A blue that is not 0, 0, 255 is used.
incorrect_green   A green that is not 0, 255, 0 is used.
incorrect_magenta   A magenta that is not 255, 0, 255 is used.
incorrect_red   A red that is not 255, 0, 0 is used.
line_weights   The weights of the vector lines are incorrect.
magenta_fills   Contains elements with magenta fills.
non_raster_color_detected   Contains elements that are filled and are not grey scale.
size   Design file size exceeds the memory limit.
unreadable   Unsupported file type.
rastering_not_supported    File contains raster images.
image_elements   File contains raster images.
     
3D warning codes
   
part_too_large_for_material   Design is too large for some materials.
part_very_small   Design is too small for some materials.
     
3D error codes
   
generic   Design file formatted incorrectly.
malformed_vrml   VRML is formatted incorrectly.
part_ridiculously_large   Design is too large for all materials.
part_ridiculously_small   Design is too small for all materials.
size   Design file size exceeds the memory limit.
unfixable_mesh_errors   Design file contains unfixable problems with the mesh.
unreadable   Design file is unreadable.
unsupported_units   Design file submitted using unsupported units.
unsupported_version   Design file is saved in an unsupported version.

Design file rules and tips

For information about how to present this content to your users check the following links:


top
US state codes

Click here to download a JSON formatted hash of state names and abbreviations


top
Country list

Click here to download a JSON formatted array of recognised country names


top
Order events
Events format
{
  "events": [
    {
      "name": << event name >>,
      "completed_at": << date and time event was completed >>
    },
    {
      "name": << event name >>,
      "completed_at": << date and time event was completed >>
    }
  ]
}
All event names

• order_received
• design_files_reviewed
• design_files_ready_to_make
• materials_reviewed
• materials_ready_to_make
• making_in_progress
• ready_for_shipping
• order_completed


top
API error responses
Response format

{
  "error": {
    "type": << error type >>,
    "name": << product or file name >>, 
    "error_code": << error code >>, 
    "error_message": << error message >>,
    "product_key": << product key >>
  }
}

Error types

• add_design
• product_update
• design_update
• design_processing
• delete_design
• delete_product

Error codes

product_locked    Products and designs cannot be updated while they are locked - ie no incomplete orders.
bad_or_missing_design_file   Missing design file data or unknown file type.
incompatible_material   The material you have selected is not compatible with making methods available to the design file.
wrong_network   This material is not available to your network.
unknown_material   Could not find requested material. is it available to this Node's material catalog?
must_have_one_design   Product must have at least one design.
product_ordered   Cannot delete designs for a product that has orders.


top

Sign up for our newsletter
to get special offers: