3DI API

3D REST API documentation

Auth

Every API call must provide two params - key and token, which can be obtained by registered users at
http://3dshap.es/account/api
If key or token are incorrect, API will return 401 Not Authorized HTTP code with empty body.

Model Resource

GET /api/v1/model

Returns a list of all active models. 10 items per page.

Supported optional params:

page - for pagination purposes.
perPage - for pagination purposes (max 100).
text - text to search by.
file and fileName - link to model file and file name to search models by. If search by file is used, both of these params are required.
file_type - model file type (e.g. "obj").
price_type - possible values: "free", "premium".
license_id - license id from list below.
size_min - minimum model size in bytes.
size_max - maximum model size in bytes.


POST /api/v1/model/search

Returns a list of all active models by example model. 10 items per page.

Required params:

file - File (Content-Disposition: form-data; name=“file”; filename=“filament_guide.stl” Content-Type: application/octet-stream)

Supported optional params:

page - for pagination purposes.
perPage - for pagination purposes (max 100).
text - text to search by.
file_type - model file type (e.g. "obj").
price_type - possible values: "free", "premium".
license_id - license id from list below.
size_min - minimum model size in bytes.
size_max - maximum model size in bytes.


POST /api/v1/model/buy

Required params:

model_id - model id for buy.
card_type - type of the card (currently supporting visa, mastercard, amex, discover and maestro).
card_number - card number.
card_expire_month - 2 digit card expiry month.
card_expire_year - 4 digit card expiry year.
card_cvv - card validation code.
card_first_name - card holder's first name.
card_last_name - card holder's last name.

Supported optional params:

address_line - line 1 of the address (eg. number, street, etc).
address_city - city name.
address_country_code - 2 letter country code.
address_postal_code - zip code or equivalent is usually required for countries that have them.
address_state - 2 letter code for US states, and the equivalent for other countries.

Licenses list:

ID 1 - All Rights Reserved
ID 2 - Creative Commons - Attribution (http://creativecommons.org/licenses/by/4.0/)
ID 3 - Creative Commons - Attribution - No Derivatives (http://creativecommons.org/licenses/by-nd/4.0/)
ID 4 - Creative Commons - Attribution-Non Commerical-ShareAlike (http://creativecommons.org/licenses/by-nc-sa/4.0/)
ID 5 - Creative Commons - Attribution-Non Commercial-NoDerivatives (http://creativecommons.org/licenses/by-nc-nd/4.0/)
ID 6 - Creative Commons - Attribution-Non Commerical (http://creativecommons.org/licenses/by-nc/4.0/)
ID 7 - Creative Commons - ShareAlike (http://creativecommons.org/licenses/by-sa/4.0/)

Examples

http://3dshap.es/api/v1/model?key=<key>&token=<token> - get first 10 active models http://3dshap.es/api/v1/model?key=<key>&token=<token>&page=2 - get second 10 active models

http://3dshap.es/api/v1/model?key=<key>&token=<token>&text=phone%20case - search models by text 'phone case', returns list of first 10 found models http://3dshap.es/api/v1/model?key=<key>&token=<token>&text=phone%20case&page=2 - search models by text 'phone case', returns list of second 10 found models

http://3dshap.es/api/v1/model?key=<key>&token=<token>&fileName=filament_guide.stl&file=http://www.thingiverse.com/download:606330 - search models by external model file

http://3dshap.es/api/v1/model?key=<key>&token=<token>&fileName=filament_guide.stl&file=http://www.thingiverse.com/download:606330&text=phone%20case - search models by external model file AND by text.

Feedback