Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST printers/registration_code¶a>
This endpoint is called the first time the printer connects to Forge and registers with the Forge platform. The first call requires that your printer’s make and model are Forge-registered printers. You can verify this using the GET printerTypes endpoint.
For important information about registering a printer related to this endpoint, see the Firmware Workflow section.
Resource Information¶
Method and URI | POST http://printer-forge-prod.spark.autodesk.com/v1/print/printers/registration_code |
Authentication Context | app only |
Required OAuth Scopes | none |
Data Format | JSON |
Request¶
HTTP Headers¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
Content-Type | yes | string | Must be application/json |
Body Structure¶
The POST body is a single, flat JSON object with the following attributes:
Name |
Required |
Value Type |
Description |
---|---|---|---|
firmware | yes | string | the firmware version of the printer; can be used by Forge to see if a firmware update is required |
type_id | no* | string: UUID | the printer type ID of the printer
* required if there is no
X-Printer-Auth-Token header |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
200 | OK | Successful |
400 | Bad Request | Invalid request. E.g., the request could not be parsed. |
401 | Unauthorized | Invalid authorization header. E.g., user is not logged in, or cannot access resource. |
404 | Not Found | Endpoint does not exist. |
422 | Unprocessable Entity | Semantic errors |
429 | Precondition Required | Request rate limit exceeded |
500 | Internal Server Error | An unknown error occurred on the server. |
Body Structure (200)¶
The response body is a single, flat JSON object with the following attributes:
Name |
Value Type |
Description |
---|---|---|
printer_id | int | The printer ID for which a registration code was generated |
registration_code | string | The registration code to be used with
POST printers/ |
auth_token | string | the authentication token to use with the X-Printer-Auth-Token header |
serial_number | string | The serial number of the printer |
registered | bool | Whether the printer is registered |
firmware | string | Printer firmware version |
printer_type | string: UUID | the identifier of the printer’s type
See the Field Guide for more information about the
printer type object.
|
issued_date_time | string | Date the registration code was issued in <month_name> D, YYYY HH:mm:ss format |
Examples¶
Printer Registration Code Successfully Generated (200)¶
curl -X 'POST' -H 'Content-Type: application/json' -v 'http://printer-forge-prod.spark.autodesk.com/v1/print/printers/registration_code' -d '{
"firmware":"1.1.1.1",
"type_id": "7FAF097F-DB2E-45DC-9395-A30210E789AA"
}'
{
"printer_id": 869,
"registration_code": "MNRTWE",
"auth_token": "hPclhvs7Z4FKot9y3NjHecai52RJUtFCBkuo1cs83VE",
"serial_number": null,
"registered": false,
"firmware": "1.1.1.1",
"printer_type": "7FAF097F-DB2E-45DC-9395-A30210E789AA",
"issued_date_time": "May 17, 2016 09:44:18"
}