Skip to content

Treazure Cloud CRM

Use this API to interact with high level Treazure CRM Services.

POST /api/v1.0/Switch/Crm/Customer/Search

Searches for customers.

Request:

{
  "parameters": {
    "cardNumber": "string",
    "firstName": "string",
    "lastName": "string",
    "emailAddress": "string",
    "postalCode": "string",
    "houseNumber": "string",
    "houseNumberAddition": "string"
  }
}

Response:

{
  "customers": [
    {
      "id": "string",
      "firstName": "string",
      "lastName": "string",
      "emailAddress": "string",
      "street": "string",
      "postalCode": "string"
    }
  ]
}

Get customer

GET /api/v1.0/Switch/Crm/Customer/{customerId}

Gets customer information using Customer ID. Returns customer properties, programs and vouchers, both yet collected or ready for purchase.

Response model:

{
  "customerId": "string",
  "cardNumber": "string",
  "customerLevel": "string",
  "customerInfo": {
    "firstName": "string",
    "lastName": "string",
    "countryId": "string",
    "city": "string",
    "street": "string",
    "postalCode": "string",
    "houseNumber": "string",
    "houseNumberAddition": "string",
    "language": "string",
    "emailAddress": "string",
    "mobile": "string",
    "dateOfBirth": "2025-04-08T13:43:34.204Z",
    "gender": "Unknown",
    "communicationViaEmail": true,
    "communicationViaSms": true
  },
  "vouchers": [
    {
      "id": "string",
      "code": "string",
      "titles": [
        {
          "description": "string",
          "isoLanguageCode": "string",
          "isDefault": true
        }
      ],
      "descriptions": [
        {
          "description": "string",
          "isoLanguageCode": "string",
          "isDefault": true
        }
      ],
      "validUntil": "2025-04-08T13:43:34.204Z",
      "loyaltyProgramId": "string"
    }
  ],
  "balances": [
    {
      "loyaltyProgramId": "string",
      "description": "string",
      "pointsBalance": 0,
      "issueImmediateThreshold": 0,
      "purchases": [
        {
          "code": "string",
          "threshold": 0,
          "titles": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "descriptions": [
            {
              "description": "string",
              "isoLanguageCode": "string",
              "isDefault": true
            }
          ],
          "validUntil": "2025-04-08T13:43:34.204Z"
        }
      ]
    }
  ]
}

Create customer

POST /api/v1.0/Switch/Crm/Customer/Create

Creates a new customer.

Request:

{
  "customerInfo": {
    "firstName": "string",
    "lastName": "string",
    "countryId": "string",
    "city": "string",
    "street": "string",
    "postalCode": "string",
    "houseNumber": "string",
    "houseNumberAddition": "string",
    "language": "string",
    "emailAddress": "string",
    "mobile": "string",
    "dateOfBirth": "2025-04-08T13:40:50.003Z",
    "gender": "Unknown",
    "communicationViaEmail": true,
    "communicationViaSms": true
  }
}

Returns the newly created customer information, including assigned customer id.

Update customer

PUT /api/v1.0/Switch/Crm/Customer/{customerId}

Updates customer information.

Request:

{
  "customerInfo": {
    "firstName": "string",
    "lastName": "string",
    "countryId": "string",
    "city": "string",
    "street": "string",
    "postalCode": "string",
    "houseNumber": "string",
    "houseNumberAddition": "string",
    "language": "string",
    "emailAddress": "string",
    "mobile": "string",
    "dateOfBirth": "2025-04-08T13:41:29.791Z",
    "gender": "Unknown",
    "communicationViaEmail": true,
    "communicationViaSms": true
  }
}

Post Transaction

POST /api/v1.0/Switch/Crm/Customer/{customerId}/Transaction

Posts sale transaction, processes received points and purchases/redeems vouchers.

{
  "loyaltyPrograms": [
    {
      "loyaltyPointDefinitionId": "string",
      "loads": [
        {
          "value": 0
        }
      ],
      "redemptions": [
        {
          "value": 0
        }
      ],
      "purchases": [
        {
          "voucherId": "string",
          "use": true
        }
      ],
      "voucherRedemptions": [
        {
          "serialId": "string"
        }
      ]
    }
  ],
  "voucherRedemptions": [
    {
      "serialId": "string"
    }
  ],
  "context": {
    "receiptNr": "string",
    "shopId": "string",
    "posId": "string",
    "operatorId": "string",
    "utcOffset": "string"
  }
}