Contracting API v2 (Beta)
Accounting
Accounting service.
GetMyBalance
Get the account balance for the logged in user.
Input: AccountRequest
Output: AccountBalanceResponse
Field | Type | Rules | Description |
balances | AccountBalance | repeated | Account balance. |
ListMyBalances
List all accounts balances for the logged in user.
Input: AccountListRequest
Output: AccountBalanceResponse
Field | Type | Rules | Description |
balances | AccountBalance | repeated | Account balance. |
GetBalance
Get a specific account balance.
Output: AccountBalanceResponse
Field | Type | Rules | Description |
balances | AccountBalance | repeated | Account balance. |
ListBalances
List all accounts balances.
Output: AccountBalanceResponse
Field | Type | Rules | Description |
balances | AccountBalance | repeated | Account balance. |
GetOverview
Get a specific account overview.
Output: AccountOverviewResponse
Field | Type | Rules | Description |
overview | AccountOverview | repeated | Account overview. |
ListOverviews
List all accounts overviews.
Output: AccountOverviewResponse
Field | Type | Rules | Description |
overview | AccountOverview | repeated | Account overview. |
GetDetails
Get specific account details..
Output: AccountDetailsResponse
Field | Type | Rules | Description |
details | AccountDetails | repeated | Account details. |
ListDetails
List accounts details.
Output: AccountDetailsResponse
Field | Type | Rules | Description |
details | AccountDetails | repeated | Account details. |
GetAggregatedReceivables
Get aggregated receivables.
Output: AggregatedReceivablesResponse
AccountBalance
AccountDetails
Field | Type | Rules | Description |
contract | string | | Account contract. |
accounting_record_internal | string | | Account Record Internal. |
account_id_external | string | | Account ID External. |
accounting_record_kind | string | | Account Record Kind. |
accounting_record_kind_text | string | | Account Record Kind Text. |
accounting_record_source_key | string | | Account Record Source Key. |
accounting_record_source_key_text | string | | Account Record Source Key Text. |
accounting_record_date | string | | Account Record Date. |
post_date | string | | Post Date. |
entry_date | string | | Entry Date. |
bill_date_start | string | | Bill Date From. |
bill_date_end | string | | Bill Date To. |
due_date | string | | Due Date. |
due_date_gen | string | | Date Date Gen. |
amount_full | google.type.Money | | Amount Full. |
amount_open | google.type.Money | | Amount Open. |
currency_code | string | | Currency. |
invoice_internal | string | | Invoice Internal. |
clear_status | string | | Clear Status. |
clear_date | string | | Clear Date. |
clear_accounting_record_internal | string | | Clear Accounting Record Internal. |
clear_reason | string | | Clear Reason. |
clear_reason_text | string | | Clear Reason Text. |
dunning_procedure | string | | Dunning Procedure. |
dunning_level | string | | Dunning Level. |
document_status | string | | Document Status (Beleg Status). |
document_hierarchy_type | string | | Document Hierarchy Type. |
sub_description | string | | Description of sub item. |
is_bookable | bool | | Is bookable. |
is_deferred | bool | | Is deferred. |
is_installment_plan_capable | bool | | Is installment plan capable. |
is_deferment_capable | bool | | Is installment plan capable. |
is_transferable | bool | | Is transferable. |
account_owner | string | | Account owner. |
is_installment | bool | | Is installment. |
details | AccountDetails | repeated | Accounting Details. |
AccountListRequest.Filter
AccountOverview
AccountRequest.Filter
AccountValues
AggregatedReceivable
AdvertisementConsent
Field | Type | Rules | Description |
channels | Channel | repeated | The approved channels for marketing messages. |
allowed_topics | string | repeated | The approved topics for marketing messages. A topic must not be present in allowed_marketing_topics and denied_marketing_topics . |
denied_topics | string | repeated | The disapproved topics for marketing messages. A topic must not be present in allowed_marketing_topics and denied_marketing_topics . |
*consent_text | string | | The consent text agreed on or declined by the customer. |
Channel
Name | Number | Description |
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. |
Billing
Billing details.
Field | Type | Rules | Description |
address | enpowerx.types.LetterAddress | | The name and the postal address. If not set, invoices will be sent to the delivery address. |
email | string | | The email address. |
phone_number | string | | The phone number. Values are normalized into the form +123456789 . |
mobile_phone_number | string | | The mobile phone number. Values are normalized into the form +123456789 . |
Confirmations
Manages confirmations that are required by German law. An order or product switch has to be confirmed if it doesn't satisfy a textual form, e.g. if it was initiated by telephone.
ConfirmOrder
Confirm the order of a new product or a product change.
Input: ConfirmOrderRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant scope of the confirmation. |
*token | string | | The token authorizing the confirmation. |
ContractBilling
Manage billing details for contracts.
Get the current contact for a specific contract.
Change the contact for a specific contract.
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*contract | string | | The contract ID the billing-contact belongs to. |
*contact | BillingContact | | The desired contact. |
Change the contact for all contracts of a specific customer.
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*customer | string | | The customer ID the billing-contact belongs to. |
*contact | BillingContact | | The desired contact. |
Get the current contact for a specific contract of the current customer (identity from OAuth token).
Change the contact for a specific contract of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*contract | string | | The contract ID the billing-contact belongs to. |
*contact | BillingContact | | The desired contact. |
Change the contact for all contracts of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*contact | BillingContact | | The desired contact. |
GetPayment
Get the current payment details for a specific contract.
Output: ContractPayment
SetPayment
Change the payment details for a specific contract.
Input: ContractBillingSetPaymentRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*contract | string | | The contract ID the billing-contact belongs to. |
*payment | ContractPayment | | The desired payment. |
SetAllPayments
Change the payment details for all contracts of a specific customer.
Input: ContractBillingSetAllPaymentsRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*customer | string | | The customer ID the billing-contact belongs to. |
*payment | ContractPayment | | The desired payment. |
GetMyPayment
Get the current payment details for a specific contract of the current customer (identity from OAuth token).
Output: ContractPayment
SetMyPayment
Change the payment details for a specific contract of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*contract | string | | The contract ID the billing-contact belongs to. |
*payment | ContractPayment | | The desired payment. |
SetAllMyPayments
Change the payment details for all contracts of the current customer (identity from OAuth token).
Input: ContractBillingSetAllMyPaymentsRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the billing-contact belongs to. |
*payment | ContractPayment | | The desired payment. |
SetAllEmailAddresses
Change the email for all contracts of a specific customer.
Input: ContractBillingSetAllEmailAddressesRequest
Field | Type | Rules | Description |
*tenant | string | | The customer's tenant. |
*customer | string | | The customer ID. |
*email | string | | The desired email address. |
Contracts
Manage contracts.
Get
Get a specific contract.
Input: ContractRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*id | string | | The contract's ID this request is targeting. |
filter | ContractRequest.Filter | | The filter to be applied on all products. |
Output: Contract
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the contract belongs to. |
*id | string | immutable | The contract's ID in the tenant's scope. |
*state | Contract.State | | The current state of the contract. |
cancellation_reason | ContractCancellationReason | output only | The reason for the contract cancellation. |
*customer | string | | The ID of the customer this contract belongs to. |
*delivery | enpowerx.types.EnergyDelivery | | Which kind and amount of energy is to be delivered to where. |
*billing | Billing | | The billing details. |
*meter_number | string | | The current meter number. |
active_range | enpowerx.types.DateRange | output only | The date range when the contract was active.
end is set if the contract was already terminated or has a planned termination in the future. |
minimum_duration | enpowerx.types.Duration | output only | The minimum duration of the contract. |
cancellation_period | enpowerx.types.Duration | output only | The cancellation period of the contract. |
next_cancellation_date | google.type.Date | output only | The next date when a cancellation can take place. |
renewal_period | enpowerx.types.Duration | output only | The renewal period of the contract. |
is_relocatable | bool | output only | The contract can be relocated. |
previous_contract | string | output only | The id of the previous contract, if contract was relocated. |
next_invoice | google.type.Date | output only | The expected next invoice. |
latest_cancellation_date | google.type.Date | output only | The latest date when a cancellation can take place. |
tariff | ContractTariff | output only | The tariff this contract is for. |
future_tariff | ContractTariff | output only | The future tariff of this contract. |
malo | string | output only | The market location identifier. |
is_climate | bool | output only | Is climate. |
end_date_price_guarantee | google.type.Date | output only | End date of the price guarantee. |
bonus | google.type.Money | output only | The bonus. |
network_operator | string | output only | The network operator. |
network_operator_consumption_forecast | Consumption | output only | The network operator annual consumption forecast. |
List
List contracts with optional filters.
Input: ContractListRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract 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. |
filter | ContractListRequest.Filter | | The filter to be applied on all contracts. |
Output: ContractList
Field | Type | Rules | Description |
contracts | Contract | repeated | The requested contracts. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
Cancel
Cancel a specific contract.
Input: ContractCancelRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*id | string | | The contract's ID this request is targeting. |
*cancellation_reason | ContractCancellationReason | | The reason for the contract cancellation. |
due_date | google.type.Date | | The date the cancellation shall take place. Waits until the end of the contract period if unset. |
ListMine
List contracts for the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract 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. |
filter | ContractListRequest.Filter | | The filter to be applied on all contracts. |
Output: ContractList
Field | Type | Rules | Description |
contracts | Contract | repeated | The requested contracts. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
GetMine
Get a specific contract for the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*id | string | | The contract's ID this request is targeting. |
filter | ContractRequest.Filter | | The filter to be applied on all products. |
Output: Contract
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the contract belongs to. |
*id | string | immutable | The contract's ID in the tenant's scope. |
*state | Contract.State | | The current state of the contract. |
cancellation_reason | ContractCancellationReason | output only | The reason for the contract cancellation. |
*customer | string | | The ID of the customer this contract belongs to. |
*delivery | enpowerx.types.EnergyDelivery | | Which kind and amount of energy is to be delivered to where. |
*billing | Billing | | The billing details. |
*meter_number | string | | The current meter number. |
active_range | enpowerx.types.DateRange | output only | The date range when the contract was active.
end is set if the contract was already terminated or has a planned termination in the future. |
minimum_duration | enpowerx.types.Duration | output only | The minimum duration of the contract. |
cancellation_period | enpowerx.types.Duration | output only | The cancellation period of the contract. |
next_cancellation_date | google.type.Date | output only | The next date when a cancellation can take place. |
renewal_period | enpowerx.types.Duration | output only | The renewal period of the contract. |
is_relocatable | bool | output only | The contract can be relocated. |
previous_contract | string | output only | The id of the previous contract, if contract was relocated. |
next_invoice | google.type.Date | output only | The expected next invoice. |
latest_cancellation_date | google.type.Date | output only | The latest date when a cancellation can take place. |
tariff | ContractTariff | output only | The tariff this contract is for. |
future_tariff | ContractTariff | output only | The future tariff of this contract. |
malo | string | output only | The market location identifier. |
is_climate | bool | output only | Is climate. |
end_date_price_guarantee | google.type.Date | output only | End date of the price guarantee. |
bonus | google.type.Money | output only | The bonus. |
network_operator | string | output only | The network operator. |
network_operator_consumption_forecast | Consumption | output only | The network operator annual consumption forecast. |
Consumption
ContractListRequest.Filter
ContractRequest.Filter
ContractTariff
Field | Type | Rules | Description |
active_range | enpowerx.types.DateRange | | The date range when the tariff is active. |
product | string | | The product ID. |
display_name | string | | A human-readable name for the product. |
fixed_cost | enpowerx.types.RecurringCost | | The fixed recurring cost. |
working_price | enpowerx.types.Price | | The price per usage in kWh. |
eco_percentage | int32 | | The percentage of environmentally friendly power generation. |
graduated_prices | ContractTariff.GraduatedPrice | repeated | The graduated prices belonging to this contract, if it is a contract based on graduated prices. |
is_price_adjustment | bool | | True if current tariff was created as a price adjustment of any previous tariff |
fixed_price_date | string | | The fixed price end date. |
fixed_price_months | string | | The fixed price duration in months. |
product_bonus | string | | The product bonus. |
ContractTariff.GraduatedPrice
ContractTariff.GraduatedPrice.WorkingPrice
Contract.State
Name | Number | Description |
STATE_UNSPECIFIED | 0 | The contract state is unspecified. |
OPEN | 1 | The contract is new and awaiting further processing. |
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 | 10 | The contract was cancelled. |
ContractCancellationReason
Name | Number | Description |
CONTRACT_CANCELLATION_REASON_UNSPECIFIED | 0 | Reason unspecified. |
MOVE_OUT | 1 | The customer has moved out. |
MOVE_OUT_3RD_PARTY | 2 | Move out reported by third party. |
CHANGE_OF_SUPPLIER | 3 | The supplier has changed. |
PRICE_ADJUSTMENT | 4 | Contract cancelled because of price adjustment. |
DEATH | 5 | Customer died. |
METER_DECOMMISSIONING | 6 | The meter was decommissioned. |
BAD_PAYER | 7 | The customer has not complied with the payments. |
COMPANY_DEREGISTRATION | 8 | Company de-registered. |
LOCKED_DELIVERY_POINT | 9 | The delivery point is locked. |
MISSING_READINGS_FOR_ICM | 10 | Missing reading for Intelligent Electricity Meter. |
RELOCATION_WITH_CONTRACT_TRANSFER | 11 | The customer relocates and wants to keep his contract. |
RegisterType
Name | Number | Description |
REGISTER_TYPE_UNSPECIFIED | 0 | Type is not specified |
SINGLE_TARIFF | 1 | Single tariff meter |
DOUBLE_TARIFF_PEAK | 2 | aka Hochtarif (HT) |
DOUBLE_TARIFF_OFF_PEAK | 3 | aka Niedertarif (NT) |
Documents
List and download contract related documents.
List
List documents for a specific contract.
Input: DocumentListRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant to list documents for. |
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. |
*contract | string | | The ID of the contract to list documents for. |
Output: DocumentList
Field | Type | Rules | Description |
documents | Document | repeated | The requested documents. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
Download
Download a specific document.
Input: DocumentRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the document belongs to. |
*id | string | | The ID of the document. |
*contract | string | | The ID of the contract the document belongs to. |
ListMine
List documents for a specific contract of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant to list documents for. |
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. |
*contract | string | | The ID of the contract to list documents for. |
Output: DocumentList
Field | Type | Rules | Description |
documents | Document | repeated | The requested documents. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
DownloadMine
Download a specific invoice of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the document belongs to. |
*id | string | | The ID of the document. |
*contract | string | | The ID of the contract the document belongs to. |
Document
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the document belongs to. |
*id | string | immutable | The documents's ID in the tenant's scope. |
*kind | Document.Kind | | The kind of document, e.g. letter, email, etc. |
*create_time | google.protobuf.Timestamp | | The creation timestamp of the document. |
*subject | string | immutable | The document subject. |
*content_kind | string | immutable | The kind of content in the document. |
Document.Kind
Name | Number | Description |
KIND_UNSPECIFIED | 0 | Kind not specified. |
LETTER | 1 | Document is a letter |
EMAIL | 2 | Document is an email |
NOTE | 3 | Document is a note |
Installments
Manage installments for contracts.
Get
Get the current installment for a specific contract.
Output: InstallmentResponse
Field | Type | Rules | Description |
*current | Installment | | The currently active installment. |
pending | Installment | | An optional pending installment that will replace the current one in the future. |
*minimum_amount | google.type.Money | | The minimum possible installment. |
*maximum_amount | google.type.Money | | The maximum possible installment. |
Change
Change the installment for a specific contract.
Input: InstallmentChangeRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the installment belongs to. |
*contract | string | | The contract ID the installment belongs to. |
*amount | google.type.Money | | The desired installment amount. |
GetMine
Get the current installment for a specific contract of the current customer (identity from OAuth token).
Output: InstallmentResponse
Field | Type | Rules | Description |
*current | Installment | | The currently active installment. |
pending | Installment | | An optional pending installment that will replace the current one in the future. |
*minimum_amount | google.type.Money | | The minimum possible installment. |
*maximum_amount | google.type.Money | | The maximum possible installment. |
SetMine
Change the installment for a specific contract of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the installment belongs to. |
*contract | string | | The contract ID the installment belongs to. |
*amount | google.type.Money | | The desired installment amount. |
Installment
Invoices
List and download invoices.
List
List invoices for a specific contract.
Input: InvoiceListRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant to list invoices for. |
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. |
*contract | string | | The ID of the contract to list invoices for. |
Output: InvoiceList
Field | Type | Rules | Description |
invoices | Invoice | repeated | The requested invoices. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
Download
Download a specific invoice.
Input: InvoiceRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the invoice belongs to. |
*id | string | | The ID of the invoice. |
*contract | string | | The ID of the contract the invoice belongs to. |
ListMine
List invoices for a specific contract of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant to list invoices for. |
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. |
*contract | string | | The ID of the contract to list invoices for. |
Output: InvoiceList
Field | Type | Rules | Description |
invoices | Invoice | repeated | The requested invoices. |
next_page_token | string | | Token to retrieve the next page of results, or empty if there are no more results in the list. |
DownloadMine
Download a specific invoice of the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the invoice belongs to. |
*id | string | | The ID of the invoice. |
*contract | string | | The ID of the contract the invoice belongs to. |
Invoice
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the invoice belongs to. |
*id | string | immutable | The invoice's ID in the tenant's scope. |
*customer | string | | The ID of the customer this invoice belongs to. |
*invoice_number | string | | The invoice number that is customer facing |
*start_date | google.type.Date | | The start of the invoice period. |
*end_date | google.type.Date | | The end of the invoice period. |
*annual_usage | int32 | | The estimated power usage in kWh per year. |
*value | enpowerx.types.Price | | The invoice amount for the defined time period. |
*is_paid | bool | | Indicates if the invoice was paid. |
*is_cancelled | bool | | Indicates if the invoice was cancelled. |
*kind | Invoice.Kind | | The kind of invoice, e.g. regular or final invoice. |
*invoice_date | google.type.Date | | The date the invoice was charged [Rechnungsdatum] This date is used for accounting and has legal implications |
Invoice.Kind
Name | Number | Description |
KIND_UNSPECIFIED | 0 | Kind not specified. |
REGULAR | 1 | The default kind of recurring invoices. |
INTERIM | 2 | An out-of-cycle invoice. |
FINAL | 3 | The final invoice when a contract terminates. |
Orders
Onboard customers and place orders.
Set
Create a new order or update an existing one.
Input: Order
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant who requested the order. |
id | string | | The unique identifier of the in scope the tenant. |
*payload | Order.Payload | | The actual order. |
external_id | string | | The unique external identifier in scope the tenant. |
Output: Order
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant who requested the order. |
id | string | | The unique identifier of the in scope the tenant. |
*payload | Order.Payload | | The actual order. |
external_id | string | | The unique external identifier in scope the tenant. |
StartCustomerOnboarding
Start the workflow to onboard a new customer.
Input: CustomerOnboardingRequest
Output: CustomerOnboardingResponse
Field | Type | Rules | Description |
*tenant | string | | The tenant the workflow was instantiated for. |
reference | string | output only | A reference to the workflow instance. |
Confirm
Confirm the order of a new product or a product change.
An order has to be confirmed if it doesn't satifisfy textual form, e.g. if it was initiated by telephone.
Input: OrderConfirmRequest
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant who requested the order. |
*id | string | immutable | The unique identifier of the order. |
*proof | google.protobuf.Struct | | Proof that customer has confirmed the order. |
GetMeterInfoFromToken
Get meter number and/or previous provider of specific order by using a generated one time token.
Input: OrderGetMeterInfoFromTokenRequest
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the order belongs to. |
*token | string | | A one time token for a specific order. |
Output: MeterInfo
Field | Type | Rules | Description |
*meter_number | string | | The meter number of the order. |
*previous_provider | string | | The previous provider ID of the order. |
SetMeterInfoFromToken
Set meter number and/or previous provider in specific order by using a generated one time token.
Input: OrderSetMeterInfoFromTokenRequest
Field | Type | Rules | Description |
*tenant | string | immutable | The tenant the order belongs to. |
*token | string | | A one time token for a specific order. |
*meter_info | MeterInfo | | The actual updating request. |
CustomerOnboardingRequest.Payload
Field | Type | Rules | Description |
*order | Order.Payload | | The order. |
portal_login | bool | | Indicates whether the customer should be invited to set up a portal account at the end of the process. |
marketing_optin | bool | | Indicates whether the customer has opted-in to receiving marketing messages. |
advertisement_consent | AdvertisementConsent | | Contains information advertisement consent |
Order.Payload
Field | Type | Rules | Description |
*product | string | | The product's ID the customer wishes to order. |
scheduled_date | google.type.Date | | The scheduled starting date (earliest possible if unset). |
*person | enpowerx.types.Person | | The personal details. |
*delivery | enpowerx.types.EnergyDelivery | | Which kind and amount of energy is to be delivered to where. |
*billing | Billing | | The billing details. |
meter_number | string | | The number of the meter. |
transition | Order.Payload.Transition | | How to handle the customer's existing contract with another provider. |
direct_sales | Order.Payload.DirectSales | | Information on how the sale was made. |
campaign | string | | An optional campaign override. |
market_location_id | string | | An optional market location identifier. |
*input_channel | InputChannel | | Defines where the order came from. |
addons | string | repeated | Addons to add to the order, e.g. "PAPKOM:v2". |
customer_id | int32 | | Existing customer id. |
Order.Payload.DirectSales
Field | Type | Rules | Description |
code | string | | Direct sales partner code. |
second_code | string | | Second direct sales partner code. |
Order.Payload.Transition
Field | Type | Rules | Description |
relocation_date | google.type.Date | | The date the customer moved in, if this happened within the last 4 weeks. If this is set termination_date and previous_provider must be unset. |
termination_date | google.type.Date | | The date when the previous contract is terminated. If this is set relocation_date must be unset. |
previous_provider | string | | If the new provider shall terminate the previous contract, set the previous provider's ID. (You can get provider IDs via enpowerx.market.v2.Providers.List() .) If the customer terminates the previous contract, leave unset. If this is set relocation_date must be unset. |
Name | Number | Description |
INPUT_CHANNEL_UNSPECIFIED | 0 | Channel is unspecified |
INPUT_CHANNEL_WEB | 1 | Channel is web |
INPUT_CHANNEL_PHONE | 2 | Channel is telephone |
INPUT_CHANNEL_MAIL | 3 | Channel is mail |
INPUT_CHANNEL_FAX | 4 | Channel is fax |
Products
Manages contracts switching to different products.
List
Get all available products a specific contract can switch to.
Output: ProductList
Field | Type | Rules | Description |
products | Product | repeated | The available products. |
Switch
Switch the product for a specific contract.
Input: ProductSwitchRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*contract | string | | The contract's ID this request is targeting. |
*product | string | | The new product's ID. |
parameters | ProductSwitchRequest.Parameters | | Additional parameters for the switch request. |
ConfirmProductSwitch
Confirm the product switch.
A product switch has to be confirmed if it doesn't satisfy textual form, e.g. if it was initiated by telephone.
Input: ConfirmProductSwitchRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*contract | string | | The contract's ID concerned with the product switch. |
*product_version_id | string | | The new product version's id. Its format is {product_id}-{version} , e.g. smart_energy-v3 |
*proof | google.protobuf.Struct | | Proof that customer has confirmed the order. |
ListMine
Get all available products a specific contract of the current customer (identity from OAuth token) can switch to.
Output: ProductList
Field | Type | Rules | Description |
products | Product | repeated | The available products. |
SwitchMine
Switch the product for a specific contract for the current customer (identity from OAuth token).
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*contract | string | | The contract's ID this request is targeting. |
*product | string | | The new product's ID. |
parameters | ProductSwitchRequest.Parameters | | Additional parameters for the switch request. |
FailedPreconditionProductListNotAllowedError
Listing available products is not allowed for the provided contract.
FailedPreconditionProductSwitchNotAllowedError
Switching product is not allowed for the provided contract.
Product
Field | Type | Rules | Description |
*id | string | | The product ID. |
*display_name | string | | A human-readable name for the product. |
usage_nt_percentage | int32 | | The percentage of usage for this product. |
price_type | string | | The type of price for this product. |
ProductSwitchRequest.Parameters
Field | Type | Rules | Description |
scheduled_date | google.type.Date | | The scheduled starting date (earliest possible if unset). |
campaign | string | | Optional override for the default campaign. |
paper_communication | bool | | Optional field to turn paper communication on or off. |
signature_date | google.protobuf.Timestamp | | Optional signature date override to fetch historical prices (price date). Leave empty to use auto date. |
ReceivableManagement
Receivables service.
GetReceivables
Get all claims such as orders, debt collection, blocking orders, ... for a contract.
Input: GetReceivablesRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant to query for. |
*id | string | | Contract id. |
Output: GetReceivablesResponse
Field | Type | Rules | Description |
receivables | Receivables | | Receivables contains receivables for a contract. |
Account
ContractData
Field | Type | Rules | Description |
sector | string | | Sector. |
delivery_address | string | | Delivery address. |
start_of_delivery | string | | Start of delivery, |
dunning_lock | bool | | There is a dunning lock. |
dunning_lock_valid_until | string | | Dunning lock valid until. |
start_of_contract | string | | Start of contract. |
contract_number | string | | Contract number. |
counter_number | string | | Counter number. |
CustomerData
Field | Type | Rules | Description |
is_business_customer | bool | | Is business customer. |
surname | string | | Surname. |
lastname | string | | Lastname. |
address | string | | Address. |
mobile_phone | string | | Mobile phone. |
email_address | string | | Email address. |
NetworkOperator
Field | Type | Rules | Description |
is_external_network_operator | bool | | Is external network operator. |
number | string | | Number. |
operator_name | string | | Name. |
OrderData
Field | Type | Rules | Description |
order_status | string | | Order status. |
order_status_code | string | | Order status code. |
network_operator | NetworkOperator | | Network operator. |
block_order_balance | string | | Block order balance. |
order_id | string | | Order ID. |
order_type | string | | Order Type. |
order_number | string | | Order Number. |
creator | string | | Creator. |
creation_date | string | | Creation Date. |
contract_number | string | | Contract Number. |
is_non_commodity_order | string | | Is NonCommodity Order. |
Receivables
Field | Type | Rules | Description |
order | OrderData | | Order data. |
customer | CustomerData | | Customer data. |
contract | ContractData | | Contract data. |
changes | StateChange | repeated | State change. |
account | Account | | Account details. |
can_cancel_reconnection_task | bool | | Can cancel reconnection task. |
is_cancel_reconnection_task_process_running | bool | | Is cancel reconnection task process running. |
can_connection_be_unlocked | bool | | Can connection be unblocked. |
can_be_rejected | bool | | Can be rejected. |
can_be_approved | bool | | Can be approved. |
can_be_cancelled | bool | | Can be cancelled. |
can_unblock_request_be_rejected | bool | | Unlocking request can be rejected. |
can_unblock_request_be_commissioned | bool | | Unblocking can be commissioned. |
can_unblock_request_be_paused_or_commissioned | bool | | Can the unblock request be paused / commissioned. |
can_unblock_request_be_paused | bool | | Can the unblock request be paused. |
can_unblock_feedback_be_recorded | bool | | Can unblock feedback be recorded. |
can_blocking_be_ordered | bool | | Can blocking be ordered. |
can_block_feedback_be_recorded | bool | | Can block feedback be recorded. |
can_cancellation_order_be_rejected | bool | | Can cancellation orders be rejected. |
can_cancellation_order_be_ordered | bool | | Can cancellation order be ordered. |
can_cancellation_feedback_be_recorded | bool | | Can cancellation feedback be recorded. |
can_costs_be_booked | bool | | Can costs be booked. |
can_be_terminated | bool | | Can be terminated. |
StateChange
Field | Type | Rules | Description |
can_order_be_rejected | bool | | Can order be rejected. |
can_unblocking_order_be_rejected | bool | | Can unblocking order be rejected. |
can_unblocking_be_ordered | bool | | Can unblocking be ordered. |
can_unblock_feedback_be_recorded | bool | | Can unblock feedback be recorded. |
can_connection_be_unblocked | bool | | Can connection be unblocked. |
can_unblock_request_be_paused_or_commissioned | bool | | Can the unblock request be paused / commissioned. |
is_feedback_admin_event_state_change | bool | | Is feedback admin event state change. |
is_cancellation_feedback_admin_event_state_change | bool | | Is cancellation feedback admin event state change. |
can_unblock_request_be_paused | bool | | Can the unblock request be paused. |
can_order_be_approved | bool | | Can order be approved. |
can_order_be_cancelled | bool | | Can order be cancelled. |
can_blocking_be_requested | bool | | Can blocking be requested. |
can_block_feedback_be_recorded | bool | | Can block feedback be recorded. |
can_cancellation_orders_be_rejected | bool | | Can cancellation orders be rejected. |
can_cancellation_order_be_ordered | bool | | Can cancellation order be ordered. |
can_cancellation_feedback_be_recorded | bool | | Can cancellation feedback be recorded. |
can_costs_be_booked | bool | | Can costs be booked. |
can_cancellation_costs_be_booked | bool | | Can cancellation costs be booked. |
can_block_costs_be_booked | bool | | Can block costs be booked. |
can_unblock_costs_be_booked | bool | | Can unblock costs be booked. |
can_block_prevention_costs_be_booked | bool | | Can block prevention costs be booked. |
new_status | string | | New status. |
new_status_text | string | | New status text. |
predecessor_status | string | | Predecessor status. |
predecessor_status_text | string | | Predecessor status text. |
order_type | string | | Order type. |
set_by_admin | bool | | Set by admin. |
creator | string | | Creator. |
creation_date | string | | Creation date. |
id | int32 | | ID. |
order_balance | google.type.Money | | Order balance. |
Relocations
Allows moving customers' contracts to new addresses (relocation).
RelocateMe
Start the workflow to relocate a specific contract for the current customer (identity from OAuth token).
Input: RelocateRequest
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*contract | string | | The contract to be relocated. |
*relocation | Relocation | | The relocation details. |
filter | RelocateRequest.Filter | | The filter to be applied on the relocate request. |
Relocate
Start the workflow to relocate a specific contract for the given customer.
Field | Type | Rules | Description |
*tenant | string | | The tenant the contract belongs to. |
*contract | string | | The contract to be relocated. |
*relocation | Relocation | | The relocation details. |
filter | RelocateRequest.Filter | | The filter to be applied on the relocate request. |
RelocateRequest.Filter
Relocation
Relocation.Reading
Relocation.Reading.ValuesEntry
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. |
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.
DateTimeRange
Represents a range of date times.
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 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
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).
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.
DateRangeFilter
DateTimeRangeFilter provides match semantics for date fields. The filter treats the start and end date as inclusive.
DateTimeFilter
DateTimeFilter provides match semantics for date time fields.
DateTimeRangeFilter
DateTimeRangeFilter provides match semantics for date time fields.
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.
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 } }
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. |
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.
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.
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.
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