Use this call to add items to a list. You must provide the list ID and data for each item. You can add one or more items in each request.
This enables an integration to keep Anaplan master data aligned with an external source system.
Notes:
- To use this call, you must be a Workspace Administrator.
- A maximum of 100,000 list items can be added with a single call.
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/lists/{listId}/items?action=add
Parameters
| Parameter | Details |
{workspaceId} |
|
{modelId} |
|
{listId} |
|
Query parameters
| Parameter | Details |
action |
|
Request body
| List Data | Description |
{name} | The name value for the item in the list. |
{code} | The code value for the item in the list. |
{parent} | The name of the parent item in the list |
{properties} | The value of each custom list property. |
{subsets} | The value of each custom list subset. |
{
"items": [
{
"name": "mike",
"code": "id1",
"parent": "west",
"properties": {
"p-text":"hello world",
"p-number":"123456",
"p-boolean": "true",
"p-list": "east",
"p-period": "Sep 20"
},
"subsets": {
"s11": true
}
},
{
"name": "cindy",
"code": "id2",
"properties": {
"p-text":"hello world",
"p-number":"wrong format for number",
"p-boolean": "true",
"p-list": "east",
"p-period": "Sep 20"
},
"subsets": {
"s11": true
}
}
]
}
Curl example
curl -X POST 'https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/lists/{listId}/items?action=add' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
Response
Response 200 body
The response body contains a JSON object that contains total (total number of items in request), ignored (number of items ignored), added (number of items added), and failures (a description of the reason of each failure) fields. In the failures response, each field contains failures information about any errors encountered while performing the add action. requestIndex is the index in input items array.
{
"meta": {
"schema": "https://anaplan.api.com/2/0/objects/item"
},
"status": {
"code": 200,
"message": "Success"
},
"added": 1,
"ignored": 1,
"total": 2,
"failures": [
{
"requestIndex": 1,
"failureType": "INCORRECT_FORMAT",
"failureMessageDetails": "incorrect format -- column name:p-number, value:wrong value for number"
}
]
}