Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST printers/:printer_id/secondary_registration¶a>
Generates a registration code that can be used to register a printer user.
Only the printer owner has authority to call this endpoint. The code can be sent to other members for use in registering the printer.
See the POST printers/register endpoint for the printer user registration process.
Resource Information¶
Method and URI | POST https:/ |
Authentication Context | user context required |
Required OAuth Scopes | data:write |
Data Format | JSON |
Request¶
HTTP Headers¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
Authorization | yes | string | Must be Bearer <token> , where <token> is obtained via a three- |
Content-Type | yes | string | Must be application/json |
URI Parameters¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
printer_id | yes | int | The printer ID to generate a registration code for |
Body Structure¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
secondary_member_email | yes | string: email | secondary member email address |
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:
Attribute |
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/ |
serial_number | string | the serial number of the printer |
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¶
Successful Generation of Registration Code (200)¶
curl -X 'POST' -H 'Authorization: Bearer tjTVHUJYG2F66EkYZaql2mpjhOzV' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/print/printers/874/secondary_registration' -d '{
"secondary_member_email": "secondary_member@email.com"
}'
{
"printer_id": 874,
"registration_code": "MCYPRP",
"serial_number": null,
"firmware": "1.1.1.1",
"printer_type": "7FAF097F-DB2E-45DC-9395-A30210E789AA",
"issued_date_time": "May 17, 2016 11:42:16"
}