Author: Anas Alhamdan Category: API v1

Introduction: MakePrintable API

MakePrintable API follows common REST conventions. Meaning you should use GET requests to retrieve data and POST, PUT, or PATCH requests to modify data. HTTP response codes are used to indicate API errors.

JSON will be returned in all responses from the API. Every response will by a default JSON object, which is a key-value hash.
If you prefer XML response just let us know by sending this header with your request.
Accept: application/xml

All API resources base url is https://api.makeprintable.com/v1

 

Before you start, read about authentication.

Add a 3D model

[POST]/items

Description

Upload or fetch a 3D model from the  supported files extensions.

 

POST parameters

file: the 3D model that you want to upload to MakePrintable in order to fix it later.

Content-Type: multipart/form-data;

or you can add an item using a URL for a 3D model

fileurl: a direct download url of the 3D file.

MakePrintable supports many 3D file formats, check the supported formats for more details. Also, you can add a zip file that contains a supported file format.

Code Examples:

PHP
[snippet id=”17″]


Python

[snippet id=”18″]

Example Response

{
    "user_id": 8,
    "file_name": "box_longline",
    "file_ext": "obj",
    "status": 1,
    "created_at": 1422295700,
    "updated_at": 1422295700,
    "id": 149
}

[GET] /items/{id}

Description

Returns a specific 3D item information.

 

[DELETE]/items/{id}

Description

Deletes a specific 3D item from MakePrintable’s servers.

[GET]/items

Description

Returns a a list of your previously uploaded items.

URL Parameters

Page, pageSize

 

 

Repair a 3D model

[POST] /fixes

Description

Start the repair process on Makeprintable servers, using your specified settings in the post parameters.

 

POST parameters

item_id: The previously uploaded item that you would like to repair.
callback_url: a url that will be called after the repair process is done, a post request will be made from our servers, the post params for this request will be same as the response for "[GET]fixes/{id}".
[Optional]
name: requried string
wall_thickness: defaults = 1
print_quality: default = standard, allowed values = [standard, prototype, high]
pre_optimize: default = 0, allowed values = range[0, 99]
post_optimize: default = 0, allowed values = range[0, 99]

secure: default = 0, allowed values = range[0, 1]

Example Code

PHP
[snippet id=”19″]


Python
import requests

[snippet id=”20″]

Example Response

{
    "item_id": "146",
     "callback_url": "http://www.example.com/MyAwesome3DModel",
     "user_id": 8,
     "created_at": 1422296879,
     "updated_at": 1422296879,
     "id": 123
}


 

[GET] /fixes/{fix_id}

Description

Returns repair information for a specific repair request, including status, progress and download links.

 

[GET] /fixes

Description

Returns a a list of your previous repair requests.

URL Parameters

Page, pageSize

Previous Article
Next Article