When you import a file in chunks, you need to tell the API what to expect in terms of the number of chunks in a file.

We recommend you set the chunk count to -1 rather than specifying the exact count. You will later send a call to mark the upload as complete.  This API call requires the file ID you obtained in the Get the list of files step.



AnaplanAuthToken:{token}Your Anaplan authentication token value.
content typeSet to Content-Type:application/json
fileIDThe file ID obtained previously.
file nameThe name of the file.
chunkCountThe number of chunks in the file.  Set to -1.
firstDataRowThe first data row in the file.  If the first data row in your file is the second row (other than the header), set to '2'.
headerRowThe header row in the file.  If the first line in your file is the header row, set this to '1'.

curl -X POST \
https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/files/{fileId} \
-H 'Authorization: AnaplanAuthToken auth_token' \
-H 'Content-Type: application/json' \
-d '{"chunkCount":1}'