Use this recipe for small, targeted updates where a file import is unnecessary.

You need:

  • An authentication token.
  • The target modelId.
  • The target moduleId.
  • The line item and dimension coordinates for the cells you want to update.
  • Write access to the target cells.

Use a file upload and import instead when you need to update a large volume of cells.

  1. Authenticate.
    Request: POST https://auth.anaplan.com/token/authenticate
    Save the returned authentication token.
  2. Find the workspace
    Request: GET /workspaces
    Save the id of the workspace as workspaceId.
  3. Find the model
    Request: GET /workspaces/{workspaceId}/models
    Save the id of the model as modelId.
  4. Find the module
    Request: GET /workspaces/{workspaceId}/models/{modelId}/modules
    Save the id of the target module as moduleId.
  5. Find line items, if needed
    Request: GET /workspaces/{workspaceId}/models/{modelId}/modules/{moduleId}/lineItems
    Use this when you need to confirm the line item IDs, names, formats, or other metadata before writing data.
  6. Build the cell update body. Create a request body that identifies the target cells and the values to write. The exact body depends on the target module structure. Include the required line item and dimension coordinates.
  7. Write cell data
    Request: POST /models/{modelId}/modules/{moduleId}/data
    Send the cell update body.
  8. Inspect the response
    Check the response for accepted and rejected updates. Do not assume that a successful HTTP response means every submitted cell was updated.

The specified cells are updated directly in the target module.

If the update fails, check:

  • Whether the cell coordinates are valid.
  • Whether the line item is writable.
  • Whether the cell is read-only because of formula, Dynamic Cell Access, model role, or selective access.
  • Whether the submitted value matches the line item format.
  • Whether the request is too large for a direct cell-write workflow.