POST
v2.2.0stable

Batch Add Devices

Batch register multiple UDIDs with flexible defaults and per-item overrides. Each item can use instant or reservation mode.

POST/api/adddevice/batch
Auth:API Key
Limit:10/minute

Request Parameters

All parameters can be passed via Query or Body

ParameterTypeRequiredDescription
token
stringOptional
Global user API token. Used when item/defaults does not provide token
Example: your_api_token_here
mode
stringOptional
Global add mode: instant or review. Default is instant; can be overridden by defaults.mode or item.mode
instantreview
Example: instant
defaults
objectOptional
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
arrayOptional
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
arrayOptional
Simplified UDID array. Uses defaults/global params for all devices
Example: ["00008030-001234567890ABCD","00008020-00ABCDEF12345678"]
udids_text
stringOptional
Text UDID list separated by comma, semicolon, whitespace, or new lines
Example: 00008030-001234567890ABCD 00008020-00ABCDEF12345678
continue_on_error
booleanOptional
Whether to continue after an item fails. Default true
Example: true

Response

ParameterTypeRequiredDescription
code
numberRequired
Status code: 1=batch request processed
Example: 1
data.total
numberRequired
Total requested devices
Example: 2
data.processed
numberRequired
Actually processed item count
Example: 2
data.success
numberRequired
Success count
Example: 1
data.failed
numberRequired
Failure count
Example: 1
data.results
arrayRequired
Per-item results with index/udid/mode/success/code/msg/data/raw
Example:
Response Example
{
"code":1,
"msg":"Batch request processed",
"time":1769675945,
"data":
{
"total":2,
"processed":2,
"success":1,
"failed":1,
"continueOnError":true,
"results":
[
{
"index":0,
"udid":"00008030-001234567890ABCD",
"mode":"instant",
"success":true,
"code":1,
"msg":"添加成功",
"http_status":200,
"data":
{
"id":"AB12CD34",
"pool":0,
"addtime":1706500000,
"mobileprovision":"MIIPhgYJKoZIhvcNAQcCoII...(Base64)",
"p12":"MIINDgIBAzCCDMsGCSqGSIb3DQEHAa...(Base64)"
}
}
,
{
"index":1,
"udid":"invalid-udid",
"mode":"review",
"success":false,
"code":0,
"msg":"UDID格式错误",
"http_status":200
}
]
}
}

Error Codes

Error Codes3 defined
0
Invalid JSON body
Request body is not valid JSON
0
items or udids is required
No device provided
0
Too many items, maximum is 50
Maximum 50 devices per batch

Response Language

Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.

Recommended Header
X-Lang: en
Supported Languages
zh, en, zh-TW, vi, ar

Accept-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.

POSThttps://testypro.iwai.cc/api/adddevice/batchLocked to this site
string

Global user API token. Used when item/defaults does not provide token

string

Global add mode: instant or review. Default is instant; can be overridden by defaults.mode or item.mode

object

Default params for all items. Supports single add API params such as warranty/shtype/type/deviceType/beizhu/code/token/mode

array

Device item array. Each item requires udid and can override any defaults field. Provide at least one of items/udids/udids_text

array

Simplified UDID array. Uses defaults/global params for all devices

string

Text UDID list separated by comma, semicolon, whitespace, or new lines

boolean

Whether to continue after an item fails. Default true