Operator Lists

Update an operator list

Changed on

Updates the name and/or description of an operator list. Required scope: operator-lists:write </br>Organization authorization: supported

patch/api/v1/operator-lists/{listId}

Request

  • Base URL
    https://partner-api.monta.com
  • URL
    https://partner-api.monta.com/api/v1/operator-lists/{listId}
  • Auth
    HTTP bearer

Path parameters

listIdinteger required

Request body

namestring required

New name for the operator list.

descriptionstring nullable

New description for the operator list.

syncMode'MANUAL' | 'AUTO'

Reconciliation mode of a filter list. The Partner API only accepts `AUTO` (changes are applied automatically); `MANUAL` can appear on a list created through the Hub and is therefore representable on reads.

filterDefinitionobject nullable

New filter definition for a FILTER list (charge-point lists only). A list's source is immutable, so this may only be set on a list that is already FILTER-source.

Example request

{
  "name": "VIP customers",
  "description": "Customers eligible for discounted charging"
}

Response

Operator list successfully updated

idinteger required

Id of the operator list.

operatorIdinteger required

Id of the operator that owns this list.

namestring required

Name of the operator list.

descriptionstring nullable

Free-text description of the operator list.

sourcestring required

Origin of the list. partner for lists created via the Monta API.

listType'user' | 'team' | 'charge_point' | 'charge_points_public' | 'site' | 'charge_key' | 'vehicle' nullable

The single entity type a homogeneous list is restricted to. null for mixed lists that can hold multiple entity types.

itemCountinteger required

Total number of items in the list.

itemCountsobject required

Per-entity-type breakdown of the item count, keyed by entity type.

createdByUserIdinteger nullable

Id of the user who created the list, when known.

createdAtstring nullable

When the list was created (ISO-8601).

updatedAtstring nullable

When the list was last updated (ISO-8601).

syncMode'MANUAL' | 'AUTO' nullable

Reconciliation mode of a FILTER list; null for a manually-curated list.

filterDefinitionobject nullable

The saved filter a FILTER-source list resolves its membership from; null for a manual list.

lastSyncedAtstring nullable

When the list was last reconciled (ISO-8601); null if it never has been.

lastSyncStatus'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED' nullable

Status of the last reconciliation.

Example response

{
  "id": 1,
  "operatorId": 42,
  "name": "VIP customers",
  "description": "Customers eligible for discounted charging",
  "source": "partner",
  "listType": "user",
  "itemCount": 12,
  "itemCounts": {
    "user": 8,
    "team": 4
  },
  "createdByUserId": 20,
  "createdAt": "2024-03-16T15:37:23Z",
  "updatedAt": "2024-03-16T15:37:23Z",
  "syncMode": "AUTO",
  "lastSyncedAt": "2024-03-16T15:37:23Z",
  "lastSyncStatus": "COMPLETED",
  "pendingSyncRun": {
    "id": 1,
    "listId": 42,
    "status": "COMPLETED",
    "trigger": "MANUAL",
    "matchedCount": 120,
    "addedCount": 5,
    "removedCount": 2,
    "errorMessage": "Search is unavailable; please retry.",
    "entityIdsByOutcome": {
      "matched": [
        1,
        2,
        3
      ],
      "added": [
        3
      ]
    }
  }
}

Changes