Skip to main content

Customer

The Customer object

idId

Unique identifier for the object.

merchantIduuid

The ID of the merchant this Customer belongs to, that is your own merchant.

tenantTenantMode

Has the value "live" if the object exists in live mode, or "sand" if it exists in test mode.

Possible values: [sand, live]

createddate-time

The date and time the Customer was created, in UTC.

registereddate-timenullable

The date and time the Customer registered on your website, in UTC, as you declared it with registeredAt when you created or updated it. Null for the Customers not created through this API, until an update declares it.

origin objectnullable

Where the Customer was won, set when it was created and never changed. Null for the Customers created before it was recorded.

typestring

The point of acquisition. Api is a Customer your own system created without saying where it came from.

Possible values: [Site, Table, PaymentLink, Reservation, LoyaltyCard, Collaborator, Popup, Import, Staff, Api]

storeIdstringnullable

The Store where the Customer was won, such as the Store of the table or of the reservation.

sourceIdstringnullable

The ID of what brought the Customer, such as the Payment link or the reservation.

emailstring

The customer’s email address.

firstNamestringnullable

The customer’s first name.

lastNamestringnullable

The customer’s last name.

phoneNumberstringnullable

The customer’s phone number.

referenceIdstringnullable

The ID of the customer in your own system, such as the user ID of your website. It is unique per environment, so two Customers of the same environment can't share it.

languagestringnullable

The language the Customer is written to in, as an ISO 639-1 two-letter code.

birthDatedatenullable

The Customer's date of birth, as yyyy-MM-dd.

companyIdstringnullable

The ID of the Company this Customer is associated with.

company objectnullable

The Company this Customer is associated with, returned in full when one exists.

idId

Unique identifier for the object.

merchantIduuid

The ID of the merchant this Company belongs to, that is your own merchant.

tenantTenantMode

Has the value "live" if the object exists in live mode, or "sand" if it exists in test mode.

Possible values: [sand, live]

joinCodestring

A unique 6-character code that can be used to join or reference this Company.

Possible values: >= 6 characters and <= 6 characters

referenceIdstringnullable

The ID of the Company in your own system. Unique among your Companies, so a Payment can find the Company by it.

Possible values: <= 100 characters

namestring

Company name.

prepaidPolicy object

The prepaid policy applied to the Customers of this Company.

isActiveboolean

Indicates whether the prepaid policy is currently active.

amountint32nullable

The maximum amount, in cents, that the Customer is allowed to spend in a single Date under this policy.

hidesPricesboolean

Whether the Company hides its prices from its employees. Only with an active policy, which then pays the whole order.

packagingTypestringnullable

The packaging used by the Customers of this Company that do not set one of their own. Null when the Company follows the ecommerce site default.

Possible values: [Reusable, Disposable]

addresses object[]nullable

An array of delivery addresses associated with this Company. Each address can have specific delivery fees and store information.

  • Array [
  • idstring

    Unique identifier for the address.

    labelstringnullable

    A friendly label or name for this address (e.g., "Main Office", "Warehouse").

    streetNamestringnullable

    The street name of the address.

    streetNumberstringnullable

    The street number of the address.

    citystringnullable

    The city of the address.

    provincestringnullable

    The province or state of the address.

    postalCodestringnullable

    The postal or ZIP code of the address.

    countrystringnullable

    The country code of the address (e.g., "IT" for Italy).

    deliveryFeeAmountint32

    The delivery fee amount for this address, in cents.

    storeIdstring

    The unique identifier of the store associated with this address.

  • ]
  • metadata objectnullable

    The fields of the Company, as you set them. A key the merchant declared in the Dashboard has the type declared there, any other key is text, and segments can filter Customers by the fields of their Company.

    property name*string
    packaging objectnullable

    The packaging set on the Customer itself, for merchants that operate a reusable container scheme. Absent when the Customer inherits both the type and the deposit.

    typestringnullable

    Whether the Customer is on reusable or disposable packaging. Null when the Customer inherits the type from its Company, or from the ecommerce site default.

    Possible values: [Reusable, Disposable]

    isDepositPaidbooleannullable

    Whether the deposit on the reusable packaging has been paid.

    wallet object

    Summary information about the Customer's wallet, including total amounts and last update timestamp.

    totalAmountint64

    The total amount available in the customer's wallet, in cents.

    totalVoucherAmountint64

    The total amount of voucher funds available in the customer's wallet, in cents.

    totalCashAmountint64

    The total amount of cash funds available in the customer's wallet, in cents.

    lastUpdatedOnUtcdate-time

    The UTC timestamp of when the wallet totals were last updated.

    spendData objectnullable

    Aggregated spending history of the Customer.

    totalSpentAmountint64

    The total amount the Customer has spent, in cents.

    totalRefundedAmountint64

    The total amount refunded to the Customer, in cents.

    noOfPaymentsint32

    The number of Payments the Customer has completed.

    averagePaymentAmountint32

    The average amount of the Customer's Payments, in cents.

    firstPaymentOnOtcdate-time

    The date and time of the Customer's first Payment, in UTC. The property name carries a typo that is part of the wire format.

    lastPaymentOnUtcdate-time

    The date and time of the Customer's most recent Payment, in UTC.

    consents object[]

    The current choice of the Customer for each purpose and channel it expressed one for. A consent never expressed is absent.

  • Array [
  • purposestring

    What the consent is for. Marketing is receiving promotional messages; Profiling is the analysis of the purchase history to tailor offers.

    Possible values: [Marketing, Profiling]

    channelstringnullable

    The channel of a marketing consent. Absent for profiling, which has no channel.

    Possible values: [Email, Sms, Whatsapp]

    grantedboolean

    Whether the consent is given. False means the Customer revoked it, which for email is also the opposition to promotional email sent to past buyers.

    collectedAtdate-time

    When the Customer made this choice, in UTC.

    versionstringnullable

    The version of the consent text the Customer was shown.

  • ]
  • metadata objectnullable

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. It can contain up to 10 key-value items with a maximum length of 40 for the key and of 400 chars for the value.

    property name*string
    Customer
    {
    "id": "string",
    "merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "tenant": "sand",
    "created": "2024-07-29T15:51:28.071Z",
    "registered": "2024-07-29T15:51:28.071Z",
    "origin": {
    "type": "Site",
    "storeId": "string",
    "sourceId": "string"
    },
    "email": "string",
    "firstName": "string",
    "lastName": "string",
    "phoneNumber": "string",
    "referenceId": "string",
    "language": "string",
    "birthDate": "2024-07-29",
    "companyId": "string",
    "company": {
    "id": "string",
    "merchantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "tenant": "sand",
    "joinCode": "string",
    "referenceId": "string",
    "name": "string",
    "prepaidPolicy": {
    "isActive": true,
    "amount": 0,
    "hidesPrices": true
    },
    "packagingType": "Reusable",
    "addresses": [
    {
    "id": "string",
    "label": "string",
    "streetName": "string",
    "streetNumber": "string",
    "city": "string",
    "province": "string",
    "postalCode": "string",
    "country": "string",
    "deliveryFeeAmount": 0,
    "storeId": "string"
    }
    ],
    "metadata": {
    "b2b": "true"
    }
    },
    "packaging": {
    "type": "Reusable",
    "isDepositPaid": true
    },
    "wallet": {
    "totalAmount": 0,
    "totalVoucherAmount": 0,
    "totalCashAmount": 0,
    "lastUpdatedOnUtc": "2024-07-29T15:51:28.071Z"
    },
    "spendData": {
    "totalSpentAmount": 0,
    "totalRefundedAmount": 0,
    "noOfPayments": 0,
    "averagePaymentAmount": 0,
    "firstPaymentOnOtc": "2024-07-29T15:51:28.071Z",
    "lastPaymentOnUtc": "2024-07-29T15:51:28.071Z"
    },
    "consents": [
    {
    "purpose": "Marketing",
    "channel": "Email",
    "granted": true,
    "collectedAt": "2024-07-29T15:51:28.071Z",
    "version": "string"
    }
    ],
    "metadata": {}
    }