Skip to main content

Introduction

Welcome to the Light API! This guide is designed to help you understand and integrate with the Light API, enabling seamless management of electricity services for residential and commercial consumers. Whether you are a product owner or a developer, our documentation aims to make the integration process straightforward and efficient.

Documentation overview

API overview

The API overview section provides a detailed look at the core aspects of the API, including:

  • Key concepts: Familiarize yourself with fundamental entities like Apps, Accounts, Locations, Plans, and Invoices.
  • Authentication: Understand the different types of tokens (App Tokens and Account Tokens) and how to use them securely.
  • Versioning: Learn about our approach to versioning and how we handle backward-compatible and incompatible changes.
  • Webhooks: See how to set up and manage webhooks for real-time notifications of events within the Light platform.
  • Prebuilt UI: Integrating the Light prebuilt UI into your app for a seamless user experience and lower integration costs.

Quick start

The quick start section provides a step-by-step visual guide on how to integrate with the Light API to perform common tasks. It includes:

  1. Enrollment: Learn how to search for service addresses, request available plans, and enroll customers in an electricity plan.
  2. Billing: Understand how to manage payment methods, retrieve and update billing addresses, and access invoice information.
  3. Location management: Explore how to handle service locations, including retrieving important documents, accessing usage data, and managing service cancellations.

Each section includes example API requests and responses, along with explanations of key concepts and visual representations of potential user interfaces.

API reference

The API reference section provides detailed documentation for each endpoint, including:

  • Request and response schemas
  • Authentication requirements
  • Sample requests and responses
  • Potential error codes and their meanings

This section is intended for developers looking to implement specific functionalities within their applications.

Key concepts

The Light API revolves around several core entities:

  • Apps: Each App corresponds to a single application or integration built on the Light platform.
  • Accounts: An Account represents a prospective or active electricity consumer.
  • Locations: A Location corresponds to a physical service address where electricity is consumed.
  • Plans: A Plan represents the electricity rate plans available to consumers.
  • Invoices: An Invoice represents the billing statement for electricity consumption over a specific period.

For more information, see the Key concepts section of the API overview.

API structure

Light API organizes endpoints into groups to make it easier to interact with the API. These groups include the following:

  • /app endpoints: Used for managing and interacting with Apps, including creating and managing accounts, generating tokens, and retrieving app-specific data.
  • /account endpoints: Used for managing individual consumer Accounts, including enrollment, billing, and service-related functionalities. These can be called from a client-side application or a server-side application.
    • /account/enroll endpoints: Used for the enrollment process, including address search, retrieving available plans, and accepting a plan.
    • /account/billing endpoints: Used for billing-related tasks, such as retrieving invoices, updating payment methods, and managing billing addresses.
    • /account/locations endpoints: Used for managing Locations, including retrieving location details, accessing service documents, and managing service cancellation.

Support and resources

If you have any questions, we're here to help. Please reach out to us anytime at support@light.dev. Additionally, we offer various resources, including:

  • Developer portal: (Coming soon!) Access the latest updates, notifications, and additional resources.
  • Email updates: Stay informed about new features, changes, and best practices.
  • Detailed documentation: Comprehensive guides and references to assist you throughout the integration process.

Conclusion

We're excited to see what you'll build. Please reach out to us with any questions or feedback. Happy building!