Customer#
Note
Viewing documentation for the current version v1.
The required Protobuf definitions can be downloaded here:
CustomerService#
The customer service to manage customers.
GetCustomer#
rpc
GetCustomer(GetCustomerRequest) returns (GetCustomerResponse)
Get a customer by ID.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
ListCustomers#
rpc
ListCustomers(ListCustomersRequest) returns (ListCustomersResponse)
List customers.
Fails with INVALID_ARGUMENT with the following reasons:
INVALID_PAGE_SIZEif thepage_sizeis less than zero.INVALID_PAGE_TOKENif thepage_tokendoes not match previous requests.
CreateCustomer#
rpc
CreateCustomer(CreateCustomerRequest) returns (CreateCustomerResponse)
Create a customer.
Fails with INVALID_ARGUMENT with the following reasons:
INVALID_PHONE_NUMBERif the provided phone number is invalid.INVALID_GIVEN_NAMEif the provided given name is longer than 100 characters.INVALID_FAMILY_NAMEif the provided family name is longer than 100 characters.INVALID_NAMEif neither a given name nor family name is provided.INVALID_LANGUAGE_CODEif the provided language code is unknown or invalid.INVALID_EMAIL_ADDRESSif the provided email address is longer than 250 characters or is invalid.
UpdateCustomer#
rpc
UpdateCustomer(UpdateCustomerRequest) returns (UpdateCustomerResponse)
Updates a customer.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
Fails with INVALID_ARGUMENT with the following reasons:
INVALID_PHONE_NUMBERif the provided phone number is invalid.INVALID_GIVEN_NAMEif the provided given name is longer than 100 characters.INVALID_FAMILY_NAMEif the provided family name is longer than 100 characters.INVALID_NAMEif neither a given name or family name is provided.INVALID_LANGUAGE_CODEif the provided language code is unknown or invalid.INVALID_EMAIL_ADDRESSif the provided email address is longer than 250 characters or is invalid.
DeleteCustomer#
rpc
DeleteCustomer(DeleteCustomerRequest) returns (DeleteCustomerResponse)
Deletes a customer.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
ListCustomerFlags#
rpc
ListCustomerFlags(ListCustomerFlagsRequest) returns (ListCustomerFlagsResponse)
List customer flags.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
Fails with INVALID_ARGUMENT with the following reasons:
INVALID_PAGE_SIZEif thepage_sizeis less than zero.INVALID_PAGE_TOKENif thepage_tokendoes not match previous requests.
AddCustomerFlag#
rpc
AddCustomerFlag(AddCustomerFlagRequest) returns (AddCustomerFlagResponse)
Adds a customer flag. Succeeds if the flag already exists. Flags may be configured with your service configuration manager.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
Fails with INVALID_ARGUMENT with the reason INVALID_FLAG if the provided flag is not available or read-only.
RemoveCustomerFlag#
rpc
RemoveCustomerFlag(RemoveCustomerFlagRequest) returns (RemoveCustomerFlagResponse)
Removes a customer flag. Succeeds if the flag does not exist.
Fails with NOT_FOUND with the reason CUSTOMER_NOT_FOUND if the customer does not exist.
Messages#
AddCustomerFlagRequest#
The request to add a flag to a customer.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer. |
| string | The flag to add. |
AddCustomerFlagResponse#
The response indicating a flag was added to a customer.
This message is an empty message and has no fields. The JSON representation is {}.
CreateCustomerRequest#
The request to create a customer.
Field | Type | Description |
|---|---|---|
| string | The customer’s e-mail address. The email address is expected to be confirmed before. Used by customer support to contact the customer. The maximum allowed length is 250 characters. |
| string | The customer’s phone number. The phone number is expected to be confirmed before. Used by customer support to contact the customer. The phone number must follow the E.164 format. For example ‘+4930726219941’. |
| string | The customer’s given name. The maximum allowed length is 100 characters. Empty strings are allowed. If empty, the family name must not be empty. |
| string | The customer’s family name. The maximum allowed length is 100 characters. Empty strings are allowed. If empty, the given name must not be empty. |
| string | The customer’s preferred language. The language code needs to follow the IETF BCP-47 format. For example ‘en’ or ‘de’. |
CreateCustomerResponse#
The response containing the created customer.
Field | Type | Description |
|---|---|---|
| The created customer. |
Customer#
A customer.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer. |
| string | The customer’s e-mail address. The email address is expected to be confirmed before. Used by customer support to contact the customer. The maximum allowed length is 250 characters. |
| string | The customer’s phone number. The phone number is expected to be confirmed before. Used by customer support to contact the customer. The phone number must follow the E.164 format. For example ‘+4930726219941’. |
| string | The customer’s given name. The maximum allowed length is 100 characters. Empty strings are allowed. If empty, the family name must not be empty. |
| string | The customer’s family name. The maximum allowed length is 100 characters. Empty strings are allowed. If empty, the given name must not be empty. |
| string | The customer’s preferred language. The language code needs to follow the IETF BCP-47 format. |
DeleteCustomerRequest#
The request to delete a customer.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer to delete. |
DeleteCustomerResponse#
The response indicating the customer was deleted.
This message is an empty message and has no fields. The JSON representation is {}.
GetCustomerRequest#
The request to get a customer by ID.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer. |
GetCustomerResponse#
The response containing the requested customer.
Field | Type | Description |
|---|---|---|
| The customer with the given ID. |
ListCustomerFlagsRequest#
The request to list the flags for a customer.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer. |
| optional int32 | The maximum number of customer flags to return. The service may return fewer than this value. If unspecified or set to zero, at most 50 customer flags will be returned. Negative values won’t be accepted. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| optional string | A page token, received from a previous |
ListCustomerFlagsResponse#
The response to list the flags for a customer.
Field | Type | Description |
|---|---|---|
| repeated string | The active flags for the customer. |
| optional string | A token, which can be sent as |
ListCustomersRequest#
The request to list customers.
Field | Type | Description |
|---|---|---|
| optional int32 | The maximum number of customers to return. The service may return fewer than this value. If unspecified or set to zero, at most 50 customers will be returned. Negative values won’t be accepted. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| optional string | A page token, received from a previous |
ListCustomersResponse#
The response containing the customers.
Field | Type | Description |
|---|---|---|
| repeated Customer | The customers. |
| optional string | A token, which can be sent as |
RemoveCustomerFlagRequest#
The request to remove a flag from a customer.
Field | Type | Description |
|---|---|---|
| string | The ID of the customer. |
| string | The flag to remove. |
RemoveCustomerFlagResponse#
The response indicating a flag was removed from a customer.
This message is an empty message and has no fields. The JSON representation is {}.
UpdateCustomerRequest#
The request to update a customer.
Field | Type | Description |
|---|---|---|
| The updated customer. |
UpdateCustomerResponse#
The response containing the updated customer.
Field | Type | Description |
|---|---|---|
| The updated customer. |