Batch Add Devices
Batch register multiple UDIDs with flexible defaults and per-item overrides. Each item can use instant or reservation mode.
/api/adddevice/batchRequest Parameters
All parameters can be passed via Query or Body
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Optional | Global user API token. Used when item/defaults does not provide token Example: your_api_token_here |
mode | string | Optional | Global add mode: instant or review. Default is instant; can be overridden by defaults.mode or item.mode instantreview Example: instant |
defaults | object | Optional | Default params for all items. Supports single add API params such as warranty/shtype/type/deviceType/beizhu/code/token/mode Example: {"warranty":"1","type":"0","deviceType":"iphone","beizhu":"batch"} |
items | array | Optional | Device item array. Each item requires udid and can override any defaults field. Provide at least one of items/udids/udids_text Example: [{"udid":"00008030-001234567890ABCD"},{"udid":"00008020-00ABCDEF12345678","mode":"review","warranty":"2","beizhu":"VIP device"}] |
udids | array | Optional | Simplified UDID array. Uses defaults/global params for all devices Example: ["00008030-001234567890ABCD","00008020-00ABCDEF12345678"] |
udids_text | string | Optional | Text UDID list separated by comma, semicolon, whitespace, or new lines Example: 00008030-001234567890ABCD
00008020-00ABCDEF12345678 |
continue_on_error | boolean | Optional | Whether to continue after an item fails. Default true Example: true |
Response
| Parameter | Type | Required | Description |
|---|---|---|---|
code | number | Required | Status code: 1=batch request processed Example: 1 |
data.total | number | Required | Total requested devices Example: 2 |
data.processed | number | Required | Actually processed item count Example: 2 |
data.success | number | Required | Success count Example: 1 |
data.failed | number | Required | Failure count Example: 1 |
data.results | array | Required | Per-item results with index/udid/mode/success/code/msg/data/raw Example: |
Error Codes
000Response Language
Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.
X-Lang: enzh, en, zh-TW, vi, arAccept-Language is also supported; X-Lang takes priority. Unsupported languages fall back to English.
Code Examples
curl -X POST "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/adddevice/batch" \
-H "X-Lang: en" \
-H "Content-Type: application/json" \
-d '{
"token": "your_api_token_here",
"mode": "instant",
"defaults": "{\"warranty\":\"1\",\"type\":\"0\",\"deviceType\":\"iphone\",\"beizhu\":\"batch\"}",
"items": "[{\"udid\":\"00008030-001234567890ABCD\"},{\"udid\":\"00008020-00ABCDEF12345678\",\"mode\":\"review\",\"warranty\":\"2\",\"beizhu\":\"VIP device\"}]",
"udids": "[\"00008030-001234567890ABCD\",\"00008020-00ABCDEF12345678\"]",
"udids_text": "00008030-001234567890ABCD\n00008020-00ABCDEF12345678",
"continue_on_error": true
}'Notes
- This endpoint reuses /api/adddevice and /api/addyydevice business logic and processes items one by one
- Request body must be JSON. Per-item params are converted to form params internally
- defaults provide shared params; item fields have higher priority
- mode supports instant/review; reservation/reserve/yy/addyydevice are aliases for review
- Maximum 50 items per request, rate limited to 10 requests/minute
Try it in Console
Fill in the parameters below and send a request to test. Requests only go to this site's API; the URL is locked and cannot be changed, and your current login cookie is included.
https://testypro.iwai.cc/api/adddevice/batchLocked to this siteGlobal user API token. Used when item/defaults does not provide token
Global add mode: instant or review. Default is instant; can be overridden by defaults.mode or item.mode
Default params for all items. Supports single add API params such as warranty/shtype/type/deviceType/beizhu/code/token/mode
Device item array. Each item requires udid and can override any defaults field. Provide at least one of items/udids/udids_text
Simplified UDID array. Uses defaults/global params for all devices
Text UDID list separated by comma, semicolon, whitespace, or new lines
Whether to continue after an item fails. Default true