Customer#
Note
Viewing documentation for the current version v1beta1.
The required Protobuf definitions can be downloaded here:
CustomerService#
The customer service to manage customers.
GetCustomer#
rpc GetCustomer(GetCustomerRequest) GetCustomerResponse
Get a customer by ID.
Fails with NOT_FOUND
if the customer does not exist.
ListCustomers#
rpc ListCustomers(ListCustomersRequest) ListCustomersResponse
List customers.
Fails with INVALID_ARGUMENT
if the page_size
is invalid or the page_token
does not match previous requests.
CreateCustomer#
rpc CreateCustomer(CreateCustomerRequest) CreateCustomerResponse
Create a customer.
Fails with INVALID_ARGUMENT
if provided customer data contains invalid entries.
UpdateCustomer#
rpc UpdateCustomer(UpdateCustomerRequest) UpdateCustomerResponse
Updates a customer.
Fails with NOT_FOUND
if the customer does not exist.
Fails with INVALID_ARGUMENT
if provided customer data contains invalid entries.
DeleteCustomer#
rpc DeleteCustomer(DeleteCustomerRequest) DeleteCustomerResponse
Deletes a customer.
Fails with NOT_FOUND
if the customer does not exist.
ListCustomerFlags#
rpc ListCustomerFlags(ListCustomerFlagsRequest) ListCustomerFlagsResponse
List customer flags.
Fails with INVALID_ARGUMENT
if the page_size
is invalid or the page_token
does not match previous requests.
AddCustomerFlag#
rpc AddCustomerFlag(AddCustomerFlagRequest) AddCustomerFlagResponse
Adds a customer flag.
Fails with NOT_FOUND
if the customer does not exist.
Fails with INVALID_ARGUMENT
if provided flag is invalid or if it is read-only. Flags may be configured with your service configuration manager.
Succeeds if the flag already exists.
RemoveCustomerFlag#
rpc RemoveCustomerFlag(RemoveCustomerFlagRequest) RemoveCustomerFlagResponse
Removes a customer flag.
Fails with NOT_FOUND
if the customer does not exist.
Succeeds if the flag does not exist.
Messages#
AddCustomerFlagRequest#
The request to add a flag to a customer.
Field |
Type |
Description |
---|---|---|
customer_id |
string |
The ID of the customer. |
flag |
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 |
---|---|---|
email_address |
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. |
phone_number |
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’. |
given_name |
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. |
family_name |
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. |
language_code |
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 |
---|---|---|
customer |
The created customer. |
Customer#
A customer.
Field |
Type |
Description |
---|---|---|
id |
string |
The ID of the customer. |
email_address |
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. |
phone_number |
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’. |
given_name |
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. |
family_name |
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. |
language_code |
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 |
---|---|---|
id |
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 |
---|---|---|
id |
string |
The ID of the customer. |
GetCustomerResponse#
The response containing the requested customer.
Field |
Type |
Description |
---|---|---|
customer |
The customer with the given ID. |
ListCustomerFlagsRequest#
The request to list the flags for a customer.
Field |
Type |
Description |
---|---|---|
customer_id |
string |
The ID of the customer. |
page_size (optional) |
int32 |
The maximum number of customer flags to return. The service may return fewer than this value. If unspecified, at most 50 customer flags will be returned. The minimum value is 1; values below 1 won’t be accepted. The maximum value is 1000; values above 1000 will be coerced to 1000. |
page_token (optional) |
string |
A page token, received from a previous |
ListCustomerFlagsResponse#
The response to list the flags for a customer.
Field |
Type |
Description |
---|---|---|
flags |
string |
The active flags for the customer. |
next_page_token (optional) |
string |
A token, which can be sent as |
ListCustomersRequest#
The request to list customers.
Field |
Type |
Description |
---|---|---|
page_size (optional) |
int32 |
The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 50 customers will be returned. The minimum value is 1; values below 1 won’t be accepted. The maximum value is 1000; values above 1000 will be coerced to 1000. |
page_token (optional) |
string |
A page token, received from a previous |
ListCustomersResponse#
The response containing the customers.
Field |
Type |
Description |
---|---|---|
customers |
The customers. |
|
next_page_token (optional) |
string |
A token, which can be sent as |
RemoveCustomerFlagRequest#
The request to remove a flag from a customer.
Field |
Type |
Description |
---|---|---|
customer_id |
string |
The ID of the customer. |
flag |
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 |
---|---|---|
customer |
The updated customer. |
UpdateCustomerResponse#
The response containing the updated customer.
Field |
Type |
Description |
---|---|---|
customer |
The updated customer. |