Skip to content

b2b Contracting API v1 (Alpha)

Contracts

Manage contracts.

Create

Provide a customer's declaration of intent, and initiate the process
of placing an order to create the specified Contract.

Input: Contract

Field Type Rules Description
*tenant string The tenant the contract belongs to.
id string output only The contract's ID in the tenant's scope.
state Contract.State output only The current state of the contract.
*commodity Commodity The contract's commodity.
*customer Contract.Customer The customer this contract belongs to.
billing_contact Contact The contracts alternative billing contact.
billing BillingDetails The billing details.
technical_details TechnicalDetails The metering-specific details.
*start_date google.type.Date The contract's start date.
*end_date google.type.Date The contract's end date.
cancellation_period Duration The cancellation period of the contract (n days or months). (DE:
Kündigungsfrist)
automatic_renewal Duration The contract is automatically renewed after the period. (DE:
Vertragsverlängerung)
billing_label Contract.BillingLabel The contract's billing label.
payment_deadline_days int32 The contract's payment deadline period in days (DE:
Zahlungskonditionen/Zahlungsfrist).
dunning_procedure string The contract's dunning procedure (DE: Mahnverfahren), eg. "basic".
*billing_cycle BillingCycle The contract's billing cycle (DE: Abrechnungsturnus).
*billing_recurring_due_date DayOfMonth The day of month the billing due dates are based on (DE: Abrechnungstag).
*installment_cycle InstallmentCycle The contract's installment cycle (DE: Abschlagsturnus).
This field is required if billing_cycle is set to BILLING_CYCLE_ANNUALLY.
In case of NONE, there will be no installment plan.
installment_recurring_due_date DayOfMonth The day of month the installment due dates are based on (DE: Abschlagstag).
labels Contract.LabelsEntry repeated The contract's labels.
Labels are only informative values and are predominantly used for
filtering. Known label keys are for example: bundle
business bool Whether it's a commercial or private contract (DE: Gewerbe oder Privat).
info ContractInfo output only Details about a contract populated during its retrieval, but not applicable to its creation.
resource_version int32 The contract version in billing storage.
Omitted for contract creation, required for contract modification.
product_history ProductHistoryEntry repeated The full product history of the contract.

Output: CreateContractResponse

Field Type Rules Description
tenant string output only The tenant the workflow process was instantiated for.
reference string output only A reference to the workflow process instance.

Update

Update a contract.

Input: Contract

Field Type Rules Description
*tenant string The tenant the contract belongs to.
id string output only The contract's ID in the tenant's scope.
state Contract.State output only The current state of the contract.
*commodity Commodity The contract's commodity.
*customer Contract.Customer The customer this contract belongs to.
billing_contact Contact The contracts alternative billing contact.
billing BillingDetails The billing details.
technical_details TechnicalDetails The metering-specific details.
*start_date google.type.Date The contract's start date.
*end_date google.type.Date The contract's end date.
cancellation_period Duration The cancellation period of the contract (n days or months). (DE:
Kündigungsfrist)
automatic_renewal Duration The contract is automatically renewed after the period. (DE:
Vertragsverlängerung)
billing_label Contract.BillingLabel The contract's billing label.
payment_deadline_days int32 The contract's payment deadline period in days (DE:
Zahlungskonditionen/Zahlungsfrist).
dunning_procedure string The contract's dunning procedure (DE: Mahnverfahren), eg. "basic".
*billing_cycle BillingCycle The contract's billing cycle (DE: Abrechnungsturnus).
*billing_recurring_due_date DayOfMonth The day of month the billing due dates are based on (DE: Abrechnungstag).
*installment_cycle InstallmentCycle The contract's installment cycle (DE: Abschlagsturnus).
This field is required if billing_cycle is set to BILLING_CYCLE_ANNUALLY.
In case of NONE, there will be no installment plan.
installment_recurring_due_date DayOfMonth The day of month the installment due dates are based on (DE: Abschlagstag).
labels Contract.LabelsEntry repeated The contract's labels.
Labels are only informative values and are predominantly used for
filtering. Known label keys are for example: bundle
business bool Whether it's a commercial or private contract (DE: Gewerbe oder Privat).
info ContractInfo output only Details about a contract populated during its retrieval, but not applicable to its creation.
resource_version int32 The contract version in billing storage.
Omitted for contract creation, required for contract modification.
product_history ProductHistoryEntry repeated The full product history of the contract.

Validate

Validate a contract for creation (resource_version omitted) or modification (resource_version kept).

Input: Contract

Field Type Rules Description
*tenant string The tenant the contract belongs to.
id string output only The contract's ID in the tenant's scope.
state Contract.State output only The current state of the contract.
*commodity Commodity The contract's commodity.
*customer Contract.Customer The customer this contract belongs to.
billing_contact Contact The contracts alternative billing contact.
billing BillingDetails The billing details.
technical_details TechnicalDetails The metering-specific details.
*start_date google.type.Date The contract's start date.
*end_date google.type.Date The contract's end date.
cancellation_period Duration The cancellation period of the contract (n days or months). (DE:
Kündigungsfrist)
automatic_renewal Duration The contract is automatically renewed after the period. (DE:
Vertragsverlängerung)
billing_label Contract.BillingLabel The contract's billing label.
payment_deadline_days int32 The contract's payment deadline period in days (DE:
Zahlungskonditionen/Zahlungsfrist).
dunning_procedure string The contract's dunning procedure (DE: Mahnverfahren), eg. "basic".
*billing_cycle BillingCycle The contract's billing cycle (DE: Abrechnungsturnus).
*billing_recurring_due_date DayOfMonth The day of month the billing due dates are based on (DE: Abrechnungstag).
*installment_cycle InstallmentCycle The contract's installment cycle (DE: Abschlagsturnus).
This field is required if billing_cycle is set to BILLING_CYCLE_ANNUALLY.
In case of NONE, there will be no installment plan.
installment_recurring_due_date DayOfMonth The day of month the installment due dates are based on (DE: Abschlagstag).
labels Contract.LabelsEntry repeated The contract's labels.
Labels are only informative values and are predominantly used for
filtering. Known label keys are for example: bundle
business bool Whether it's a commercial or private contract (DE: Gewerbe oder Privat).
info ContractInfo output only Details about a contract populated during its retrieval, but not applicable to its creation.
resource_version int32 The contract version in billing storage.
Omitted for contract creation, required for contract modification.
product_history ProductHistoryEntry repeated The full product history of the contract.

Get

Fetch a contract by ID aka. contract nr.

Output: Contract

Field Type Rules Description
*tenant string The tenant the contract belongs to.
id string output only The contract's ID in the tenant's scope.
state Contract.State output only The current state of the contract.
*commodity Commodity The contract's commodity.
*customer Contract.Customer The customer this contract belongs to.
billing_contact Contact The contracts alternative billing contact.
billing BillingDetails The billing details.
technical_details TechnicalDetails The metering-specific details.
*start_date google.type.Date The contract's start date.
*end_date google.type.Date The contract's end date.
cancellation_period Duration The cancellation period of the contract (n days or months). (DE:
Kündigungsfrist)
automatic_renewal Duration The contract is automatically renewed after the period. (DE:
Vertragsverlängerung)
billing_label Contract.BillingLabel The contract's billing label.
payment_deadline_days int32 The contract's payment deadline period in days (DE:
Zahlungskonditionen/Zahlungsfrist).
dunning_procedure string The contract's dunning procedure (DE: Mahnverfahren), eg. "basic".
*billing_cycle BillingCycle The contract's billing cycle (DE: Abrechnungsturnus).
*billing_recurring_due_date DayOfMonth The day of month the billing due dates are based on (DE: Abrechnungstag).
*installment_cycle InstallmentCycle The contract's installment cycle (DE: Abschlagsturnus).
This field is required if billing_cycle is set to BILLING_CYCLE_ANNUALLY.
In case of NONE, there will be no installment plan.
installment_recurring_due_date DayOfMonth The day of month the installment due dates are based on (DE: Abschlagstag).
labels Contract.LabelsEntry repeated The contract's labels.
Labels are only informative values and are predominantly used for
filtering. Known label keys are for example: bundle
business bool Whether it's a commercial or private contract (DE: Gewerbe oder Privat).
info ContractInfo output only Details about a contract populated during its retrieval, but not applicable to its creation.
resource_version int32 The contract version in billing storage.
Omitted for contract creation, required for contract modification.
product_history ProductHistoryEntry repeated The full product history of the contract.

List

Retrieve a list of contracts matching the specified filter criteria.

Input: ContractListRequest

Field Type Rules Description
*tenant string The tenant the contracts belong to.
filter ContractFilter The filter selecting which contracts to retrieve.
Non-empty fields are AND-combined, empty fields are ignored.
page_size int32 The number of contracts in a single results page. 0 for default.
page_token string The next_page_token value returned from a previous List request, if any.
max_results int32 Optionally places a limit on results.
If set, page_size and page_token are ignored and inoperative.
If exceeded, ContractListResponse.max_results_exceeded will be true.

Output: ContractListResponse

Field Type Rules Description
contracts Contract repeated A page of contract results.
next_page_token string Token to retrieve the next page of results, or empty if there are no more
results in the list. Never set if ContractListRequest.max_results was specified.
max_results_exceeded bool Will be true if ContractListRequest.max_results was specified and exceeded.

Contract.Customer

For Create: - existing customers require id, other fields will be ignored. - new customers require contact.postal_address and contact.company.

Field Type Rules Description
id string The ID of the customer.
contact Contact The customer's company, address and other contact details.
If no Customer.id, then Customer.contact.company and Customer.contact.postal_address are REQUIRED.

Contract.LabelsEntry

Field Type Rules Description
key string
value string

ContractFilter

Field Type Rules Description
contract_id string optional The contract number of the contract. There will be no more than 1 result.
market_location string optional The market-location of the contract in the billing service.
delivery_address string optional The full or partial delivery address in the market-communication service.

ContractInfo

Field Type Rules Description
product_counting_procedure ProductCountingProcedure RLM or SLP
create_time google.protobuf.Timestamp The time of contract creation in the billing service.
electricity ElectricityCharacteristics If the commodity is electricity, contains electricity details.
gas GasCharacteristics If the commodity is gas, contains gas details.

ProductHistoryEntry

Field Type Rules Description
*active google.type.Date The date the product starts being active.
The entry where min(|today-active|) | today>active is the currently active one.
*product string The product used by this contract.
price_component_overrides PriceComponent repeated The contract specific price components.
These price components override and extend the ones specified in the product.

TechnicalDetails

Field Type Rules Description
meters TechnicalDetails.Meter repeated The contract's meters.
market_location string The market location as required by the B2B billing service.
delivery_address DeliveryAddress The contract's alternative delivery address, if different from
customer.address.
estimated_consumption TechnicalDetails.ConsumptionEstimate The estimated consumption.
transition TechnicalDetails.Transition The electricity contract's transition details.

TechnicalDetails.ConsumptionEstimate

Field Type Rules Description
*value int64 The consumption estimate's value.
*unit TechnicalDetails.ConsumptionEstimate.Unit The consumption estimate's (eg. "kWh")
*duration Duration The consumption estimate's duration (ie. "per n days/months/year").

TechnicalDetails.Meter

Field Type Rules Description
*number string The meter's number.

TechnicalDetails.Transition

Field Type Rules Description
self_terminated bool Whether customer or supplier terminates (DE: Kennzeichen Selbstkündiger).
previous_supplier string Previous provider's ID. (Can be fetched via
enpowerx.market.v2.Providers.List().)
separate_grid_fee_procedure bool The grid fees are billed separately. (DE: Selbstzahler Netznutzung)
*type TechnicalDetails.Transition.Type The transition type.

Contract.BillingLabel

Name Number Description
BILLING_LABEL_UNSPECIFIED 0 The billing label is unspecified.
BILLING_LABEL_NORMAL_CUSTOMER 1 The billing label for a normal customer (DE: Normalkunde
Konzernfremd).
BILLING_LABEL_NORMAL_CUSTOMER_REVERSE_CHARGE 2 The billing label for a normal customer with reverse charge (DE:
Normalkunde Konzernfremd (Reverse Charge)).
BILLING_LABEL_CONNECTED_COMPANY_WITH_TAX_CALCULATION 3 The billing label for a connected company with tax calculation (DE:
Verbundenes Unternehmen mit Steuerberechnung).
BILLING_LABEL_CONNECTED_COMPANY_WITHOUT_TAX_CALCULATION 4 The billing label for a connected company without tax calculation
(DE: Verbundenes Unternehmen ohne Steuerberechnung).

Contract.State

Name Number Description
STATE_UNSPECIFIED 0 The contract state is unspecified.
NEW 1 The contract is newly created, pending further lifecycle events.
TERMINATING_PREVIOUS_PROVIDER 2 In the process of terminating the customer's contract with their
previous provider.
WAITING_FOR_NETWORK_PROVIDER 3 Waiting for acknowledgment from the network provider.
WAITING_FOR_SUPPLY 4 Waiting for power supply to start.
ACTIVE 5 The contract is active.
BLOCKED 6 The contract is blocked.
TERMINATION_REQUESTED 7 Contract termination has been requested
TERMINATED 8 Contract has been terminated.
CANCELLED 9 The contract was cancelled.

TechnicalDetails.ConsumptionEstimate.Unit

Name Number Description
UNIT_UNSPECIFIED 0 The unit is unspecified.
UNIT_KWH 1 The unit is kilowatts/hour.

TechnicalDetails.Transition.Type

Name Number Description
TYPE_UNSPECIFIED 0 The transition type is unspecified.
TYPE_MOVE_IN 1 The transition type is moving-in (DE: Neueinzug).
TYPE_SUPPLIER_CHANGE 2 The transition type is a supplier change (DE: Lieferantenwechsel).
TYPE_INITIAL_MOVE_IN 3 The transition type is moving-in to a new property (DE:
Neueinzug/Neuanlage).
TYPE_CHANGE_FROM_SUBSTITUTE_SUPPLY 4 The transition type is a change from substitute supply (DE: Wechsel
aus der Ersatzversorgung).

BillingDetails

Field Type Rules Description
payment_method enpowerx.types.PaymentMethod The payment method method.
bank_account enpowerx.types.BankAccount The bank account used if payment_method is DIRECT_DEBIT.

Contact

Field Type Rules Description
person enpowerx.types.Person The contact person.
postal_address PostalAddress The postal address.
email string The email address.
phone_number string The phone number.
mobile_phone_number string The mobile phone number.
fax_number string The fax number.
company string The contact's company name.

DayOfMonth

Represents a day of a month.

Field Type Rules Description
month google.type.Month The month.
*day int32 Day of the month.

DeliveryAddress

Represents a delivery address, e.g. for electricity.

Field Type Rules Description
*region string The region the address is located in as a CLDR
region code. Example: DE for Germany
*postal_code string A postal code of the city (a city may have more than one).
Example: 76131 for Karlsruhe inner city
*city string The canonical name of the city (there may be more than one per postal
code). Example: Karlsruhe
*street string The canonical name of the street.
Example: Kaiserstr.
*house_number string The house number.
Examples: 32, 32a, 32/1

Duration

Represents a coarse time duration (e.g., 2 months).

Field Type Rules Description
*units int32 The number of time units.
*type google.type.CalendarPeriod The type the units refer to (days, months, etc.).

ElectricityCharacteristics

Field Type Rules Description
delivery_voltage ElectricityCharacteristics.DeliveryVoltage The delivery voltage at the market location.
measuring_voltage ElectricityCharacteristics.MeasuringVoltage The measuring voltage at the market location.

GasCharacteristics

Field Type Rules Description
pressure GasPressure The gas pressure at the market location.

PostalAddress

Field Type Rules Description
*region string The region the address is located in as a CLDR
region code. Example: DE for Germany
*postal_code string A postal code of the city (a city may have more than one).
Example: 76131 for Karlsruhe inner city
*city string The canonical name of the city (there may be more than one per postal
code). Example: Karlsruhe
*street string The canonical name of the street.
Example: Kaiserstr.
*house_number string The house number.
Examples: 32, 32a, 32/1
mailbox string The P.O. box aka mailbox (DE: Postfach). The mailbox is only considered if
street and house_number are unset.
addendum string Additional information regarding the address (DE: Lagezusatz).
careof string A person that may receive letters in the name of the actual recipient (e.g.
a "C/O" line added to the postal address).

Price

Field Type Rules Description
*net google.type.Money The price without sales tax.
*unit string The unit the price is related to (e.g "kWh", "PCS", "month", etc.)

PriceComponent

Field Type Rules Description
*type enpowerx.types.TenantScopedResource The type of the price component.
*period enpowerx.types.Period The period of this price component is applied.
billing_disabled bool Marks the price component to be not considered for billing.
This is primarily used to drop product price components for a specific
contract. Price components marked with this flag will not be part of the
bill.
price Price The net price of the price component.
If type.external_price_reference is set, this price will be fetched from
there. Otherwise, if not set, this price must be set in a product or
contract. If set in a contract this value will be overridden.
time_slices TimeSlice repeated The time slices this price component should be applied in.
If no time slices are set, the price component is applied all around the
clock on every day (in the billing period).
display_name string The price component's display name.
If not set, PriceComponent.type.display_name is used.
billing_rule BillingRule The billing rule of this price component.
id string The price component's product-scoped identifier.
Empty for newly-added contract-owned price components passed to Contracts.Create.
sales_tax_rate float optional The individual sales tax rate in percent (%) for this price component.
The values are in the range from 0.0 to 99.99.
sales_tax_exemption_reason PriceComponent.SalesTaxExemptionReason optional The reason for the exemption from sales tax.
Needed when the sales tax rate is set to 0.

TimeSlice

Field Type Rules Description
*daily_start google.type.TimeOfDay The time of a weekday the tariff starts to be applicable.
*daily_end google.type.TimeOfDay The time of a weekday the tariff starts to be applicable.
weekdays google.type.DayOfWeek repeated The weekdays the tariff is applicable

BillingCycle

The billing cycle (DE: Abrechnungsturnus).

Name Number Description
BILLING_CYCLE_UNSPECIFIED 0 The billing cycle is unspecified.
BILLING_CYCLE_MONTHLY 1 The billing cycle is monthly.
BILLING_CYCLE_QUARTERLY 2 The billing cycle is quarterly.
BILLING_CYCLE_SEMIANNUALLY 3 The billing cycle is semiannually.
BILLING_CYCLE_ANNUALLY 4 The billing cycle is annually.

BillingRule

Name Number Description
BILLING_RULE_UNSPECIFIED 0 The billing rule is unspecified.
BILLING_RULE_EXCLUSIVE 1 The price component is considered for billing in an exclusive manner.
Price components following this rule will be calculated, be part of the
bill and influence the total sum.
BILLING_RULE_INCLUSIVE 2 The price component is considered for billing in an inclusive manner.
Price components following this rule will not be calculated and not
influence the total sum. They are part of the bill in an informational
manner.

Commodity

Name Number Description
COMMODITY_UNSPECIFIED 0 The commodity is unspecified.
GAS 1 The commodity is gas.
ELECTRICITY 2 The commodity is electricity.
WATER 3 The commodity is water.

ElectricityCharacteristics.DeliveryVoltage

Name Number Description
DELIVERY_VOLTAGE_UNSPECIFIED 0 The delivery voltage is unspecified.
DELIVERY_VOLTAGE_LOW 1 The delivery voltage is low.
DELIVERY_VOLTAGE_MEDIUM_TO_LOW_TRANSFORMATION 2 The delivery voltage is transformed from medium voltage to low voltage.
DELIVERY_VOLTAGE_MEDIUM 3 The delivery voltage is medium.
DELIVERY_VOLTAGE_HIGH_TO_MEDIUM_TRANSFORMATION 4 The delivery voltage is transformed from high voltage to medium voltage.
DELIVERY_VOLTAGE_HIGH 5 The delivery voltage is high.

ElectricityCharacteristics.MeasuringVoltage

Name Number Description
MEASURING_VOLTAGE_UNSPECIFIED 0 The measuring voltage is unspecified.
MEASURING_VOLTAGE_LOW 1 The measuring voltage is low.
MEASURING_VOLTAGE_MEDIUM 2 The measuring voltage is medium.
MEASURING_VOLTAGE_HIGH 3 The measuring voltage is high.

GasPressure

Name Number Description
GAS_PRESSURE_UNSPECIFIED 0 Unspecified
LOW 1 Low
MEDIUM 2 Medium
HIGH 3 High

InstallmentCycle

The installment cycle (DE: Abschlagszyklus).

Name Number Description
INSTALLMENT_CYCLE_UNSPECIFIED 0 The installment cycle is unspecified.
INSTALLMENT_CYCLE_NONE 1 The installment cycle is unspecified.
INSTALLMENT_CYCLE_MONTHLY 2 The installment cycle is monthly.
INSTALLMENT_CYCLE_BIMONTHLY 3 The installment cycle is bimonthly.
INSTALLMENT_CYCLE_TRIMONTHLY 4 The installment cycle is trimonthly.
INSTALLMENT_CYCLE_FOUR_MONTHLY 5 The installment cycle is four-monthly.
INSTALLMENT_CYCLE_SEMIANNUALLY 6 The installment cycle is semiannually.

PriceComponent.SalesTaxExemptionReason

Name Number Description
SALES_TAX_EXEMPTION_REASON_UNSPECIFIED 0 The reason is unspecified.
SALES_TAX_EXEMPTION_REASON_REVERSE_CHARGE 1 The reason is reverse charge.
SALES_TAX_EXEMPTION_REASON_US_NATO 2 The reason is NATO.
SALES_TAX_EXEMPTION_REASON_DIRECT_MARKETING 3 The reason is direct marketing.

ProductCountingProcedure

Name Number Description
PRODUCT_COUNTING_PROCEDURE_UNSPECIFIED 0 The counting procedure is unspecified.
RLM 1 (DE: Registrierende Leistungsmessung).
SLP 2 Standard Load Profile (DE: Standardlastprofil).

Shared Types

Amount

Field Type Rules Description
unit string The unit of the amount. E.g.'kWh' or 'PCS' for pieces.
units int64 The whole units of the amount.
For example if unit is "PCS", then 1 unit is one piece.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

BankAccount

Information about a bank account.

Field Type Rules Description
*iban string The International Bank Account Number.
bic string The Bank Identifier Code.
account_holder string The name of the account holder.
bank string The name of the bank.

CustomerType

Represents the kind of the customer.

Name Number Description
CUSTOMER_TYPE_UNSPECIFIED 0 The customer type is unspecified.
PRIVATE 1 The customer type is private.
BUSINESS 2 The customer type is business.
BOTH 3 The customer type is private and business.

DateRange

Represents a range of dates.

Field Type Rules Description
*start google.type.Date The inclusive start date.
end google.type.Date The inclusive end date.
end_exclusive google.type.Date The exclusive end date.
time_zone string The time zone of the date range (defaults to Europe/Berlin).

DateTimeRange

Represents a range of date times.

Field Type Rules Description
*start google.protobuf.Timestamp The inclusive start date.
end google.protobuf.Timestamp The inclusive end date.

Decimal

Field Type Rules Description
units int64 The whole units of the amount.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Billing

Billing details.

Field Type Rules Description
*contact Contact The contact to send invoices to.
*payment_method PaymentMethod The payment method method.
bank_account BankAccount The bank account used if payment_method is DIRECT_DEBIT.

CommunicationChannel

Communication channel.

Name Number Description
COMMUNICATION_CHANNEL_UNSPECIFIED 0 Channel not specified.
LETTER 1 Send messages via letter.
EMAIL 2 Send messages via email.
SMS 3 Send messages via SMS.
MESSENGER 4 Send messages via messenger apps like WhatsApp.
PHONE 5 Communicate via telephone.

Contact

Contact details (postal, phone, etc.).

Field Type Rules Description
*person Person Information on how to address the contact.
postal_address PostalAddress The contact's postal address.
phone_number string The phone number of the contact.
Values are normalized into the form +123456789.
email string The email address of the contact.
careof Person A person that may receive communication in the name of the actual recipient (e.g. a "C/O" line added to the postal address).

Reading

Information about a reading.

Field Type Rules Description
*date google.type.Date The date when the reading was taken.
channel Reading.Channel How the reading was reported.
This is value is ignored when submitting via AddMine.
*values Reading.ValuesEntry repeated A map of values to submit with OBIS codes as the key.
ignore_plausibility_check_reason google.protobuf.StringValue If set the meter reading(s) will be saved, even if they're not plausible.
Specifies the reason why the plausibility check is to be ignored.

Reading.ValuesEntry

Field Type Rules Description
key string
value double

Reading.Channel

Name Number Description
CHANNEL_UNSPECIFIED 0 No channel specified.
PORTAL 1 Reported via end-user portal.
EMAIL 2 Reported via email.
LETTER 3 Reported via letter.
PHONE 4 Reported via phone call.
MSCONS 5 Reported via Metered Services Consumption report message.

Relocation

Information about the relocation of an contract.

Field Type Rules Description
*contract string The contract's ID this request is targeting.
*moveout_date google.type.Date The move-out date.
*movein_date google.type.Date The move-in date.
*delivery EnergyDelivery Which kind and amount of energy is to be delivered to where.
*use_new_address Relocation.UseNewAddress Use the new address as postal and billing address.
*meter string The ID of the meter at the new consumption point.
last_reading Reading The last reading at the old consumption point.
old_meter string The ID of the meter at the old consumption point.
Optional, must be set if a last reading is provided.

Relocation.UseNewAddress

Name Number Description
USE_NEW_ADDRESS_UNSPECIFIED 0 Use unspecified.
NO 1 Use not desired.
IMMEDIATELY 2 Use immediately desired.
ON_MOVE_IN 3 Use on moving in desired.

SalesInfo

Information on how a sale was made.

Field Type Rules Description
sales_partner_code string Direct sales partner code.
sales_partner_code_second string Second direct sales partner code.
campaign string Optional override for the default campaign.

ScheduledRequest

Reference to an entity with an optional scheduled starting date.

Field Type Rules Description
*id string The ID referencing the entity.
scheduled_date google.type.Date The scheduled starting date (earliest possible if unset).

TransitionType

Specifies modalities of a contract transition.

Name Number Description
TRANSITION_TYPE_UNSPECIFIED 0 The transition type is unspecified
MANUAL_TERMINATION 1 The customer terminates the prior contract.
VENDOR_TERMINATION 2 The vendor terminates the prior contract.
RELOCATION 3 The customer is going to or has recently moved to the new address.

Duration

Represents a coarse time duration (e.g., 2 months).

Field Type Rules Description
*units int32 The number of time units.
*type google.type.CalendarPeriod The type the units refer to (days, months, etc.).

EnergyDelivery

Describes which kind and amount of energy is to be delivered to where.

Field Type Rules Description
*energy_type EnergyType The kind of the energy.
*customer_type CustomerType The kind of the customer.
*address PostalAddress The address to deliver energy to.
annual_usage int32 The estimated power usage in kWh per year.
usage_type EnergyDelivery.UsageType The usage type for the delivered energy.
annual_usage_nt int32 The estimated off-peak power usage in kWh per year (DE: Niedertarifverbrauch).

EnergyDelivery.UsageType

Name Number Description
USAGE_TYPE_UNSPECIFIED 0 The consumption type is unspecified.
HOUSEHOLD_ELECTRICITY 1 The energy is used for household.
CHARGING_CURRENT 2 The energy is used for charging.
STORAGE_HEATER 3 The energy is used for a storage heater.
HEAT_PUMP 4 The energy is used for a heat pump.
HOUSEHOLD_ELECTRICITY_AND_STORAGE_HEATER 5 The energy is used for household with storage heater.
HOUSEHOLD_ELECTRICITY_AND_HEAT_PUMP 6 The energy is used for household with heat pump.

EnergyType

Represents the kind of the energy.

Name Number Description
ENERGY_TYPE_UNSPECIFIED 0 The energy type is unspecified.
ELECTRICITY 1 The energy type is electricity.
GAS 2 The energy type is gas.

FileContent

Field Type Rules Description
*mime_type string The media type / content type of the document.
*content bytes The raw data of the document.

AnnotationFilter

AnnotationFilter provides filter semantics for annotations.

Field Type Rules Description
*field string The annotation field path is a symbolic field path to target an annotation's field, for example:

"invoice.id", "is_consumption_based", ...
value google.protobuf.Value The value to match the annotation field's value.

DateFilter

DateFilter provides match semantics for date fields.

Field Type Rules Description
*date google.type.Date The date to filter for.
match_mode DateFilter.MatchMode The match mode to use. The default is EQUAL.

DateRangeFilter

DateTimeRangeFilter provides match semantics for date fields. The filter treats the start and end date as inclusive.

Field Type Rules Description
*start_date google.type.Date The start date to filter for.
*end_date google.type.Date The end date to filter for.

DateTimeFilter

DateTimeFilter provides match semantics for date time fields.

Field Type Rules Description
*time google.protobuf.Timestamp The date time to filter for.
match_mode DateTimeFilter.MatchMode The match mode to use. The default is EQUAL.

DateTimeRangeFilter

DateTimeRangeFilter provides match semantics for date time fields.

Field Type Rules Description
*start_time google.protobuf.Timestamp The start date time to filter for.
*end_time google.protobuf.Timestamp The end date time to filter for.

StringListFilter

Strings filter x IN and x NOT IN semantics.

Field Type Rules Description
*values string repeated The value to filter for.
negate bool If true the expression is negated.

StringScalarFilter

StringFilter provides match semantics for strings fields.

Field Type Rules Description
*value string The value to filter for.
match_mode StringScalarFilter.MatchMode The match mode to use.
negate bool If true the expression is negated.

DateFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EQUAL 1 Filter only matches if the date is equal to the provided date.
BEFORE 2 Filter matches all dates that are before the provided date.
AFTER 3 Filter matches all dates that are after the provided date.
BEFORE_OR_EQUAL 4 Filter matches all dates that are before or equal to the provided date.
AFTER_OR_EQUAL 5 Filter matches all dates that are after or equal to the provided date.

DateTimeFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EQUAL 1 Filter only matches if the date is equal to the provided date.
BEFORE 2 Filter matches all dates that are before the provided date.
AFTER 3 Filter matches all dates that are after the provided date.
BEFORE_OR_EQUAL 4 Filter matches all dates that are before or equal to the provided date.
AFTER_OR_EQUAL 5 Filter matches all dates that are after or equal to the provided date.

StringScalarFilter.MatchMode

Name Number Description
MATCH_MODE_UNSPECIFIED 0 The match mode is unspecified.
EXACT 1 Filter only matches if the field contains exactly the expected value.
PREFIX 2 Filter matches all fields that are prefixed with the given value.
SUFFIX 3 Filter matches all fields that are suffixed with the given value.
SUBSTRING 4 Filter matches all fields that contain the given value.

LetterAddress

Combines a name and a postal address.

Field Type Rules Description
*person Person The person being addressed.
careof string A person that may receive letters in the name of the actual recipient (e.g. a "C/O" line added to the postal address).
*postal_address PostalAddress The postal address.

MonthOfYear

Represents a month of a year.

Field Type Rules Description
month int32 Month of the year.
year int32 Year.

PaymentMethod

Possible methods for paying invoices.

Name Number Description
PAYMENT_METHOD_UNSPECIFIED 0 The payment method method is unspecified.
DIRECT_DEBIT 1 Money is automatically withdrawn from the specified bank account.
MANUAL_TRANSFER 2 The customer pays bills manually using money transfers.

Period

A period of time with inclusive start and inclusive and exclusive end time. If both (inclusive and exclusive) ends are specified, they must be consistent. If no end is specified, the period is considered unbounded on the end. If the time is unspecified it is considered to be 00:00:00.000000000 for the start (and exclusive end) and 23:59:59.999999999 for the inclusive end.

The following example represents a period of time from 2006-01-01 to 2006-01-31: { start_time: { hours: 0 minutes: 0 seconds: 0 nanos: 0 } start_date: { year: 2006 month: 1 day: 1 } end_time: { hours: 23 minutes: 59 seconds: 59 nanos: 999999999 } end_date: { year: 2006 month: 1 day: 31 } end_date_exclusive: { year: 2006 month: 2 day: 1 } end_time_exclusive: { hours: 0 minutes: 0 seconds: 0 nanos: 0 } }

Field Type Rules Description
start_time google.type.TimeOfDay The start time of the period (inclusive).
end_time google.type.TimeOfDay The end time of the period (inclusive).
start_date google.type.Date The start date of the period (inclusive).
end_date google.type.Date The end date of the period (inclusive).
end_time_exclusive google.type.TimeOfDay The end time of the period (exclusive).
end_date_exclusive google.type.Date The end date of the period (exclusive).
time_zone string The time zone of the period (defaults to Europe/Berlin).

Person

Information on how to address a person. A person can be either a natural person or a company with an optional contact Natural Person: Must provide firstname, lastname Company: Must provide company

Field Type Rules Description
salutation Person.SalutationForm The salutation of the person.
title string The title of the person.
firstname string The first name of the person.
lastname string The last name of the person.
birthday google.type.Date The birthday of the person.
company string The company name.

Person.SalutationForm

Name Number Description
SALUTATION_FORM_UNSPECIFIED 0 The salutation form is unspecified.
MRS 1 The salutation form is Mrs..
MR 2 The salutation form is Mr..
DIVERSE 3 The salutation form is Diverse.
FAMILY 4 The salutation form is Family.

PostalAddress

Represents a postal address, e.g. for postal delivery or payments addresses.

Field Type Rules Description
*region string The region the address is located in as a CLDR region code.
Example: DE for Germany
*postal_code string A postal code of the city (a city may have more than one).
Example: 76131 for Karlsruhe inner city
*city string The canonical name of the city (there may be more than one per postal code).
Example: Karlsruhe
street string The canonical name of the street.
Example: Kaiserstr.
house_number string The house number.
Examples: 32, 32a, 32/1
postbox_number string Postbox number in case address is a postbox.
district string Administrative division (i.e. Stadtteil).
additional_address_lines string repeated Additional address lines
Example: Appartment 104, Care of etc.

Price

Represents a price before and after taxes.

Field Type Rules Description
*net google.type.Money The price without VAT.
*gross google.type.Money The price including VAT.
unit string The unit the price is related to (e.g "kWh", "PCS", "month", etc.)

Quantity

Field Type Rules Description
unit string The unit of the quantity. E.g.'kWh' or 'PCS' for pieces.
units int64 The whole units of the quantity.
For example if unit is "PCS", then 1 unit is one piece.
nanos int32 Number of nano (10^-9) units of the quantity.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

RecurringCost

Represents a price/cost that repeats at a fixed interval.

Field Type Rules Description
*price Price The price per interval.
*interval google.type.CalendarPeriod The interval at which the cost occurs (per day, month, etc.).

TenantScopedListRequest

Field Type Rules Description
*tenant string The tenant the list belongs to.
page_size int32 The maximum number of items to return. 0 for default.
page_token string The next_page_token value returned from a previous List request, if any.

TenantScopedResource

A tenant scoped resource.

Field Type Rules Description
*tenant string The tenant the resource belongs to.
*id string The ID of the resource.

TimeRange

A range of time with inclusive start, inclusive and exclusive end time. If both (inclusive and exclusive) ends are specified, they must be consistent. If no end is specified, the period is considered unbounded on the end.

Field Type Rules Description
start google.protobuf.Timestamp The inclusive start.
end google.protobuf.Timestamp The inclusive end.
end_exclusive google.protobuf.Timestamp The exclusive end.

File-level Extensions

Extension Type Base Number Description
throws string .google.protobuf.MethodOptions 76131 throws is used to document error messages that the method might return in status.details.

CalendarPeriod

A CalendarPeriod represents the abstract concept of a time period that has a canonical start. Grammatically, "the start of the current CalendarPeriod." All calendar times begin at midnight UTC.

Name Number Description
CALENDAR_PERIOD_UNSPECIFIED 0 Undefined period, raises an error.
DAY 1 A day.
WEEK 2 A week. Weeks begin on Monday, following
ISO 8601.
FORTNIGHT 3 A fortnight. The first calendar fortnight of the year begins at the start
of week 1 according to
ISO 8601.
MONTH 4 A month.
QUARTER 5 A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each
year.
HALF 6 A half-year. Half-years start on dates 1-Jan and 1-Jul.
YEAR 7 A year.

Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following:

  • A full date, with non-zero year, month, and day values
  • A month and day value, with a zero year, such as an anniversary
  • A year on its own, with zero month and day values
  • A year and month value, with a zero day, such as a credit card expiration date

Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and google.protobuf.Timestamp.

Field Type Rules Description
year int32 Year of the date. Must be from 1 to 9999, or 0 to specify a date without
a year.
month int32 Month of a year. Must be from 1 to 12, or 0 to specify a year without a
month and day.
day int32 Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
to specify a year by itself or a year and month where the day isn't
significant.

Money

Represents an amount of money with its currency type.

Field Type Rules Description
currency_code string The three-letter currency code defined in ISO 4217.
units int64 The whole units of the amount.
For example if currencyCode is "USD", then 1 unit is one US dollar.
nanos int32 Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive.
If units is positive, nanos must be positive or zero.
If units is zero, nanos can be positive, zero, or negative.
If units is negative, nanos must be negative or zero.
For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Legend

*) required