Saltar para o conteúdo

Customer

Retrieve customer details and reward credit history

Show customer details

Pedido

Retrieves the customer details, including reward balances.

Required scope: customer:read

Segurança
accountId and apiKey
Caminho
idstring, (uuid)obrigatório

Resource Identification

curl -i -X GET \
  'https://api.test.easypay.pt/2.0/customer/{id}' \
  -H 'AccountId: 2b0f63e2-9fb5-4e52-aca0-b4bf0339bbe6' \
  -H 'ApiKey: eae4aa59-8e5b-4ec2-887d-b02768481a92'

Respostas

OK

Corpoapplication/json
idstring, (uuid)

Unique identifier for the customer.

Exemplo:"649e88cf-0b78-4c36-8f99-33f5ebb812a1"
namestring, <= 255 characters

Full name of the customer.

Exemplo:"John Doe"
emailstring, (email), <= 70 characters

Customer's email address.

Exemplo:"john.doe@example.com"
phonestring, <= 15 characters

The contact phone number of the customer, excluding the country code indicator.

Exemplo:"911234567"
phone_indicativestring, <= 5 characters

The country code indicator for the customer's phone number.

Exemplo:"+351"
fiscal_numberstring, <= 20 characters

Customer's tax identification number or fiscal number.

Exemplo:"PT123456789"
keystring, <= 255 characters

A customizable text field for users to input their own identifier for the customer.

Exemplo:"customer Key Example"
languagestring, = 2 characters

Preferred language for customer communications. Uses ISO 639-1 language codes.

Enum:"PT""EN""ES"
Exemplo:"PT"
reward_balancesArray of objects

Reward balances across all reward accounts for this customer. Empty array if no reward accounts exist. See the Rewards & Redemptions guide for the full flow.

Response
Success
{ "id": "649e88cf-0b78-4c36-8f99-33f5ebb812a1", "name": "John Doe", "email": "john.doe@example.com", "phone": "911234567", "phone_indicative": "+351", "fiscal_number": "PT123456789", "key": "customer Key Example", "language": "PT", "reward_balances": [ {}, {} ] }