# Create enrollment Creates a new enrollment code that a device can use to register. Endpoint: POST /ipp/v1/enrollments Version: 1.0.0 ## Request fields (application/json): - `metadata` (object) Custom metadata key-value pairs for the enrollment. Example: {"store_id":"123","terminal_type":"checkout"} - `ttl` (string, required) Duration the enrollment code is valid for. TWO_HOURS produces a short 8-character code; longer durations produce a UUID-format code. Enum: "TWO_HOURS", "TWENTY_FOUR_HOURS", "FORTY_EIGHT_HOURS", "SEVENTY_TWO_HOURS", "THIRTY_DAYS" - `location_id` (string) Location ID to associate the enrolled device with. Example: "550e8400-e29b-41d4-a716-446655440000" ## Response 201 fields (application/json): - `enrollment_id` (string) Unique enrollment identifier. Example: "550e8400-e29b-41d4-a716-446655440000" - `enrollment_code` (string) The enrollment code to enter on the device. Example: "ABC123XYZ" - `expires_at` (string) Timestamp when the enrollment code expires. Example: "2024-01-15T11:30:00Z" - `status` (string) Current status of the enrollment. Enum: "PENDING", "CONSUMED", "EXPIRED", "CANCELLED" - `metadata` (object) Custom metadata key-value pairs for the enrollment. Example: {"store_id":"123","terminal_type":"checkout"} ## Response 400 fields ## Response 401 fields