For the complete documentation index, see llms.txt. This page is also available as Markdown.

LoyaltyProgram

LoyaltyProgram

Search for a loyalty program membership

post
/tenants/{tenantUid}/customers/loyalty/search

Search for (look up) a loyalty program membership. The preferred and main search criteria is mobile number, but email can be used when mobile number is not available.

Country code must be with a plus sign, e.g. +47 for Norway. If country code is missing, the default country code of the tenant is used.

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body
querystringRequired

full mobile number or email

Responses
200

Example response

application/json
post/tenants/{tenantUid}/customers/loyalty/search
POST /v2/tenants/{tenantUid}/customers/loyalty/search HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "query": "text"
}
200

Example response

{
  "items": [
    {
      "loyaltyId": "text",
      "firstName": "text",
      "lastName": "text",
      "address": "text",
      "postalCode": "text",
      "city": "text",
      "countryCode": "text",
      "email": "text",
      "mobile": "text",
      "consents": [
        "text"
      ],
      "customerUid": "text",
      "origin": "text",
      "displayName": "text"
    }
  ]
}

Enroll new customer to loyalty program

post
/tenants/{tenantUid}/customers/loyalty

Enroll new customer to loyalty program. If the mobile number is not in the country of the tenant you must add the country code (e.g. +358 for Finland). The store is where the enroll was made from.

Required permissions: CUSTOMER

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body
mobilestringRequired
mobileCountryCodestringOptional
storeUidstringRequiredPattern: ^[A-Za-z0-9-_]+
Responses
204

No Content

No content

post/tenants/{tenantUid}/customers/loyalty
POST /v2/tenants/{tenantUid}/customers/loyalty HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62

{
  "mobile": "text",
  "mobileCountryCode": "text",
  "storeUid": "text"
}
204

No Content

No content

Get loyalty program member details for customer

get
/tenants/{tenantUid}/customers/{customerUid}/loyalty

Get loyalty program member details for customer.

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
customerUidstringRequired

Reference to a Customer.

Pattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json
addressstringRequired
citystringRequired
companyNamestringRequired
countryCodestringRequired

ISO 3166-1: 2 characters representation of country

createdAtstring · date-timeRequired
customerUidstringRequiredPattern: ^[A-Za-z0-9-_]+
customerTypestring · enumRequiredPossible values:
emailstringRequired
externalIdstringRequired
firstnamestringRequired
lastModifiedAtstring · date-timeRequired
lastnamestringRequired
ledgerNumberstringRequired

Ledger number must be a valid number with possible leading zeros

mobilestringRequired
postalCodestringRequired
pricelistUidstringRequiredPattern: ^[A-Za-z0-9-_]*
vatNumberstringRequired

VAT identification number for value added tax reporting purposes.

originstringRequired
get/tenants/{tenantUid}/customers/{customerUid}/loyalty
GET /v2/tenants/{tenantUid}/customers/{customerUid}/loyalty HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "address": "text",
  "city": "text",
  "companyName": "text",
  "countryCode": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "customerUid": "text",
  "customerType": "COMPANY",
  "email": "text",
  "externalId": "text",
  "firstname": "text",
  "lastModifiedAt": "2026-01-01T00:00:00.000Z",
  "lastname": "text",
  "ledgerNumber": "text",
  "mobile": "text",
  "postalCode": "text",
  "pricelistUid": "text",
  "vatNumber": "text",
  "origin": "text"
}

Enroll existing customer to loyalty program

post
/tenants/{tenantUid}/customers/{customerUid}/loyalty

Enroll existing customer to loyalty program. The store is where the enroll is made from.

Required permissions: CUSTOMER

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
customerUidstringRequired

Reference to a Customer.

Pattern: ^[A-Za-z0-9-_]+
Body
storeUidstringRequiredPattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json

CustomerResponseSchema

addressstringRequired
citystringRequired
companyNamestringRequired
countryCodestringRequired

ISO 3166-1: 2 characters representation of country

createdAtstring · date-timeRequired
customerUidstringRequiredPattern: ^[A-Za-z0-9-_]+
customerParentUidstringRequired

References another customer, establishing it as a department under the main customer. Only applicable when customerType is COMPANY.

Pattern: ^[A-Za-z0-9-_]*
customerTypestring · enumRequiredPossible values:
emailstringRequired
externalIdstringRequired
firstnamestringRequired
lastModifiedAtstring · date-timeRequired
lastnamestringRequired
ledgerNumberstringOptionalDeprecated

Deprecated. Use ledgerNumber in accountingConfigs instead

mobilestringRequired
postalCodestringRequired
pricelistUidstringRequiredPattern: ^[A-Za-z0-9-_]*
vatNumberstringRequired

VAT identification number for value added tax reporting purposes.

originstringRequired
loyaltyIdstringRequired
displayNamestringRequired
paymentTermsintegerRequired
internalNotestringRequired
ehfEnabledbooleanOptional

Deprecated: Use ehf -> enabled instead

customerGroupUidsstring[]Required
relevancenumberRequired
post/tenants/{tenantUid}/customers/{customerUid}/loyalty
POST /v2/tenants/{tenantUid}/customers/{customerUid}/loyalty HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19

{
  "storeUid": "text"
}
200

Example response

{
  "address": "text",
  "city": "text",
  "companyName": "text",
  "countryCode": "text",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "customerUid": "text",
  "customerParentUid": "text",
  "customerType": "COMPANY",
  "email": "text",
  "externalId": "text",
  "firstname": "text",
  "lastModifiedAt": "2026-01-01T00:00:00.000Z",
  "lastname": "text",
  "mobile": "text",
  "postalCode": "text",
  "pricelistUid": "text",
  "vatNumber": "text",
  "origin": "text",
  "addresses": [
    {
      "address": "text",
      "city": "text",
      "companyName": "text",
      "firstname": "text",
      "lastname": "text",
      "countryCode": "text",
      "email": "text",
      "phone": "text",
      "postalCode": "text",
      "type": "DELIVERY_ADDRESS",
      "customerAddressUid": "text",
      "displayName": "text"
    }
  ],
  "contacts": [
    {
      "firstname": "text",
      "lastname": "text",
      "email": "text",
      "mobile": "text",
      "createdAt": "2026-01-01T00:00:00.000Z",
      "lastModifiedAt": "2026-01-01T00:00:00.000Z",
      "customerContactUid": "text",
      "extensions": [
        {
          "extensionCode": "TWO_INVOICE",
          "organizationUid": "text"
        }
      ],
      "displayName": "text",
      "role": "ADMIN"
    }
  ],
  "extensions": [
    {
      "extensionCode": "TWO_INVOICE",
      "organizationUid": "text"
    }
  ],
  "consents": [
    {
      "consentUid": "text",
      "name": "text",
      "status": true,
      "source": "text",
      "createdAt": "2026-01-01T00:00:00.000Z"
    }
  ],
  "loyaltyId": "text",
  "displayName": "text",
  "credit": {
    "limit": 1,
    "balance": 1
  },
  "paymentTerms": 1,
  "internalNote": "text",
  "accountManager": {
    "tenantUserUid": "text",
    "displayName": "text",
    "userCode": "text"
  },
  "ehfEnabled": true,
  "ehf": {
    "enabled": true,
    "address": "text"
  },
  "customerGroupUids": [
    "text"
  ],
  "defaultStore": {
    "name": "text",
    "storeUid": "text"
  },
  "relevance": 1
}

List loyalty program discounts for customer

get
/tenants/{tenantUid}/customers/{customerUid}/loyalty/discounts

List available loyalty program member discounts for customer.

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
customerUidstringRequired

Reference to a Customer.

Pattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json
get/tenants/{tenantUid}/customers/{customerUid}/loyalty/discounts
GET /v2/tenants/{tenantUid}/customers/{customerUid}/loyalty/discounts HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "items": [
    {
      "discountCode": "text",
      "title": "text",
      "description": "text",
      "validFrom": "2026-01-01T00:00:00.000Z",
      "validTo": "2026-01-01T00:00:00.000Z",
      "discountType": "PERCENTAGE",
      "discountValue": 1,
      "maxUsage": 1,
      "timesUsed": 1,
      "productSkus": [
        "text"
      ]
    }
  ]
}

Get loyalty program points for customer

get
/tenants/{tenantUid}/customers/{customerUid}/loyalty/points

Get available loyalty program member points for customer.

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
customerUidstringRequired

Reference to a Customer.

Pattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json
customerUidstringRequiredPattern: ^[A-Za-z0-9-_]+
balanceintegerRequired
currencystringRequired
expiringBalanceintegerRequired
expirationDatestring · date-timeRequired
get/tenants/{tenantUid}/customers/{customerUid}/loyalty/points
GET /v2/tenants/{tenantUid}/customers/{customerUid}/loyalty/points HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "customerUid": "text",
  "balance": 1,
  "currency": "text",
  "expiringBalance": 1,
  "expirationDate": "2026-01-01T00:00:00.000Z"
}

Get loyalty program member balance for customer on order.

get
/tenants/{tenantUid}/orders/{orderUid}/loyalty

Get loyalty program member balance for customer on order.

  • If order total > 0, the response shows balance to use as payment on order.

  • If order total on order < 0, the response shows bonus point that can be refunded on order.

Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
orderUidstringRequired

Reference to an Order.

Pattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json
balanceintegerRequired
get/tenants/{tenantUid}/orders/{orderUid}/loyalty
GET /v2/tenants/{tenantUid}/orders/{orderUid}/loyalty HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Example response

{
  "balance": 1
}

Last updated