---
updatedAt: 2026-05-27T08:43:29.000Z
agentTools:
  projectIndex: https://developer.jedlix.com/llms.txt
---

# Delete an utility contract

Delete an utility contract at a charging location associated with a user.

# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Smart Charging",
    "contact": {
      "name": "Jedlix Product Development",
      "url": "https://api.jedlix.com/specs/internal/smartcharging",
      "email": "operations@jedlix.com"
    },
    "version": "2.0",
    "x-logo": {
      "url": "https://api.jedlix.com/logo.png",
      "backgroundColor": "#FFFFFF",
      "altText": "Jedlix Logo"
    },
    "description": "# Introduction\nWelcome to the Smart Charging API!\nThis API allows you to integrate Smart Charging services into your existing applications easily.  \nLet us take care of the smart charging algorithms and vehicle/charger connections while you deliver a great user experience.\n\nThe Jedlix API is organised around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). \n\n- Need some guidance on how to use the API? Check out our Developer Quick Start guides.\n- Not a developer? Please find more information on our Whitelabel Smart Charging solutions [here](https://www.jedlix.com/en/business-solutions/).\n\n# Authorization\nTo access resources over the Smart Charging API you will need an API Key and, depending on who is accessing the resource, one of the following access tokens:\n- **Management Token:** Authenticate Used to create users and retrieve data of multiple users.  \n- **User Token:** This token is of the users that are already using application on your platform.  \n\n## API Key\nDuring the set up process, you will be provided with an API key and you should include this in every interaction with the Smart Charging API call.  \nIf you do not have this API Key, please contact our [sales team](mailto:partners@jedlix.com) for more information.  \n\n## Management Access Token\nThe Managent Access Token is used to perform actions on behalf of the service provider.  \nFor example creating a new user or retrieving all charge sessions.  \n\n**Finding your Client Credentials**  \nAccess to the Smart Charging API begins with your `client_id` and `client_secret` (also known as client credentials).  \nThe account holder(s) can access through their account in the API portal.  \nPlease get in touch with our [sales team](mailto:partners@jedlix.com) for more information if you do not have those.  \n\nNote that your client credentials give access to all functionality and user data in your account, so be sure to keep them secure!  \nDo not share your credentials in publicly accessible areas such as GitHub, client-side code, and so forth.  \n\n**Obtaining a Management Access Token**  \nYour client credentials are never used to access resources directly but are instead used to obtain tokens that are then used to access resources.  \nThis token carries authorisation to access all functionality and data within your account.  \nAs with the client credentials, this token must be kept secret and should not be used by a public client such as a mobile app or web app.\n\nYou can obtain these tokens from our *Identity Provider* [Auth0](https://auth0.com/).  \nYou can request the token with the [OAuth2 client credentials flow](https://auth0.com/docs/flows/client-credentials-flow), using your `client_id` and `client_secret`.\n\nRequesting a token is as simple as:\n\n```\ncurl -X POST 'https://jedlix-b2e.eu.auth0.com/oauth/token' \\\n    --header 'Content-Type: application/x-www-form-urlencoded' \\\n    --data-urlencode 'grant_type=client_credentials' \\\n    --data-urlencode 'client_id={your client_id}' \\\n    --data-urlencode 'client_secret={your client_secret}' \\\n    --data-urlencode 'audience=https://smartcharging.jedlix.com'\n```\n\nYou will receive the token in the response in the field `access_token`.  \nThis is the token you need to pass on the request to the API in the `Authorization` header.\n\n**Refreshing a Management Access Token**  \nYour management access token is valid for *14 days* and should be cached until it expires.  \nRequest a new access token using the method above before the expiration moment.\n\n**Scopes**  \nThe Smart Charging API uses [scopes](https://auth0.com/docs/configure/apis/scopes/api-scopes) to authorise whether your Management Access Token has permissions to access a certain resource.  \nWhen relevant, the `scope` required by each endpoint is listed in the documentation for that endpoint.  \nYou can check the scopes assigned to your access token by decoding your JWT token (for example [here](https://jwt.io/)).  \nIf you lack certain scopes you would expect to have access to, please contact our [sales team](mailto:partners@jedlix.com) for more information.\n\n**Authentication**  \nNow that you have an Managent Access Token and API key, you are good to go and ready to interact with the API.  \nWhen accessing resources, the Management Access Token should be provided in a Bearer Authorization header as specified in *[RFC6750](https://tools.ietf.org/html/rfc6750#section-2.1)*\n\nExample: Retrieve a list of users\n\n```\ncurl -X GET 'https://smartcharging.jedlix.com/api/v1/users' \\\n    --header 'ApiKey: ExampleApiKey' \\\n    --header 'Authorization: Bearer c3VwZXJzZWNyZXR0b2tlbmhlcmU='\n\n```\nAll API requests must use  *[HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure)*.  \nCalls made over plain HTTP will fail.  \nAPI requests without authentication will also fail.\n\n## User Access Token\nThe User Access Token is required if a user of your service want to access their data.  \nThis token is **generated by your Identity Provider** of choice but must be a [JSON Web Token (JWT)](https://auth0.com/docs/secure/tokens/json-web-tokens).\n\n**Set up your Identity Provider configuration**\n\nThe Smart Charging platform validates if the user is indeed allowed access the resources users.  \nTo do this several [claims](https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-token-claims) in the User Access Token are validated against the information that is provided by you during the set up process. \nThe following claims should be known to the Smart Charging platform before a user can access their data:\n- **Audience** (or [resource identifier](https://tools.ietf.org/id/draft-tschofenig-oauth-audience-00.html)) of your Identity Provider, presented as the `aud` claim in the User Access Token, for example: `https://smartcharging.example.com`\n- **Issuer** of the User Access Token presented as the `iss` claim in the User Access Token, for example: `https://example.eu.auth0.com`\n- **UserIdClaim**, which may be a claim type of your choice in the User Access Token that stores the `user id`, for example:  `https://smartcharging.example.com/claims/user_id`. This user id is generated by the Smart Charging platform when you create a user with the management token\n\n**Create a user**  \nYou can find more information how to create a user [here](https://api.jedlix.com/specs/smartcharging#operation/CreateUser).  \nWhen the user account is successfully created, an `id` is generated for the user. This user `id` needs to be included in your User Access Token. \n\n**Assign Scopes**  \nThe Smart Charging API uses [scopes](https://auth0.com/docs/configure/apis/scopes/api-scopes) to authorise whether your User has permissions to access a certain resource.  \nThe scope required by each endpoint is listed in the documentation for that endpoint, for example `read:vehicle`.  \nYou have to add the scopes you want your user to have access to in the User Access Token, using the `scope` claim. \n\n**Accessing the user resources**  \nNow that you have your API key and have set up your Identity Provider configuration, you are good to go and ready to interact with the API.  \nWhen accessing user resources, the User Access Token should be provided in a Bearer Authorization header as specified in **[RFC6750](https://tools.ietf.org/html/rfc6750#section-2.1)**\n\nExample: Retrieve a list of vehicles for a user:\n\n```\ncurl -X GET 'https://smartcharging.jedlix.com/api/v1/users/{userId}/vehicles' \\\n    --header 'ApiKey: ExampleApiKey' \\\n    --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9'\n```\n\nAll API requests must use  **[HTTPS](http://en.wikipedia.org/wiki/HTTP_Secure)**.  \nCalls made over plain HTTP will fail. API requests without authentication will also fail.\n\nWith every incoming call, the Smart Charging platform performs the following checks on the User Access Token provided:  \n\n- Does the token have permission to access this scope?\n- Is the token not expired?\n- Does the *Audience* and *Issuer* match with the information provided?\n\nWhen the checks above are successfully passed, the information associated to the `user id` provided is returned.   \n\n## Test environment\nTo help you develop your integration, you can use the QA (test) environment.\nNote that you can’t use the access token for the production environment to access the test environment so a different access token has to be retrieved through:\n\n```\ncurl -X POST 'https://jedlix-b2e.eu.auth0.com/oauth/token' \\\n    --header 'Content-Type: application/x-www-form-urlencoded' \\\n    --data-urlencode 'grant_type=client_credentials' \\\n    --data-urlencode 'client_id=CLIENT_ID' \\\n    --data-urlencode 'client_secret=CLIENT_SECRET' \\\n    --data-urlencode 'audience=https://qa-smartcharging.jedlix.com/'\n```\n\nTo access the QA resources, the BaseUrl for the QA environment is the same as the production BaseUrl, with a `qa-` prefix.\n\nFor example, `https://smartcharging.jedlix.com`\nbecomes `https://qa-smartcharging.jedlix.com`.\n\nThis environment is fully functional but contains no production data.\nIf you need any help, don’t hesitate to contact us at support@jedlix.com\n\n## Security definitions\n<!-- ReDoc-Inject: <security-definitions> -->"
  },
  "servers": [
    {
      "url": "https://demo-smartcharging.jedlix.com/",
      "description": "Server to use with for demo use"
    }
  ],
  "paths": {
    "/api/v2/users/{userId}/charging-locations/{chargingLocationId}/utility-contracts": {
      "delete": {
        "tags": [
          "Utility Contracts"
        ],
        "summary": "Delete an utility contract",
        "description": "Delete an utility contract at a charging location associated with a user.",
        "operationId": "DeleteEnergySupplier",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "description": "Identifier of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "chargingLocationId",
            "in": "path",
            "description": "Identifier of the charging location",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Jedlix-ClientName",
            "in": "header",
            "description": "Name of the client (or system) calling the api, this is helpful for tracing requests. This is optional.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Jedlix-ClientVersion",
            "in": "header",
            "description": "Version of the client (or system) calling the api, this is helpful for tracing requests. This is optional.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "The utility contract have already been removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "504": {
            "description": "Internal api timeout"
          }
        },
        "security": [
          {
            "OAuth2": [
              "app",
              "delete:utilitycontract",
              "user-resources"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "required": [
          "extensions"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "extensions": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth Bearer token authentication",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://jedlix-b2e.eu.auth0.com/oauth/authorize",
            "refreshUrl": "https://jedlix-b2e.eu.auth0.com/oauth/token",
            "scopes": {
              "app": "",
              "read:charger": "",
              "user-resources": "",
              "user-resources:read": "",
              "create:charger": "",
              "delete:charger": "",
              "read:chargesettings": "",
              "modify:chargesettings": "",
              "read:charginglocations": "",
              "create:charginglocation": "",
              "read:all-charginglocations": "",
              "create:charginglocation-from-vehicle-location": "",
              "delete:charginglocation": "",
              "read:charginglocation": "",
              "modify:charginglocation": "",
              "create:connectsession": "",
              "read:connectsession": "",
              "modify:connectsession": "",
              "read:session": "",
              "read:energysupplier": "",
              "read:utilitycontract": "",
              "create:utilitycontract": "",
              "modify:utilitycontract": "",
              "delete:utilitycontract": "",
              "read:financials": "",
              "read:message": "",
              "modify:message": "",
              "read:messages": "",
              "read:rewards": "",
              "create:payouts": "",
              "read:all-payouts": "",
              "read:all-sessions": "",
              "read:sessionsettings": "",
              "modify:sessionsettings": "",
              "read:solarenergy": "",
              "read:solarsettings": "",
              "modify:solarsettings": "",
              "delete:solarsettings": "",
              "create:tariffs": "",
              "modify:tariffs": "",
              "read:tariffs": "",
              "delete:tariffs": "",
              "read:dynamictariffs": "",
              "read:all-users": "",
              "create:user": "",
              "delete:user": "",
              "read:user": "",
              "modify:user": "",
              "read:all-vehicles": "",
              "read:vehicle": "",
              "create:vehicle": "",
              "delete:vehicle": "",
              "connect:vehicle": "",
              "read:vin": "",
              "manage:webhooks": ""
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "OAuth2": []
    }
  ]
}
````