# Trigg Integrations API

This is the documentation for the current release of the Trigg Integrations API.

Current release: 2026-09-15 (v.4.3.4)
{% admonition type="info" name="Moved documentation" %} You are now viewing our new and improved API documentation.  </p> If you were redirected here from <a href="https://dev.oip.oculos.no">https://dev.oip.oculos.no</a>, please update your bookmarks to this new URL.  {% /admonition %}
# Overview
Welcome to the Trigg Integrations API documentation, a resource for better understanding of our integration platform. 

This documentation is designed to be accessible and informative for both technical and sales professionals, ensuring that you can fully explore the capabilities and benefits of our API.

For technical experts, this documentation provides in-depth insights into the API endpoints, data structures, and integration possibilities. You'll find detailed explanations, code examples, and best practices to help you integrate our API into your applications and systems.

For sales persons and other non-technical stakeholders, this documentation offers a overview of the API's features, use cases, and potential business advantages. 


As the configuration of Trigg allows for a flexible request/reponse, only the standard data structures are displayed in this documentation.

If you have a customized configuration and need examples, please contact our support team or your sales person.


The API has two base URL's, one for production and one for testing.

<b>Production:</b> <a href="https://api.oculos.no/v4">https://api.oculos.no/v4</a>

<b>Staging:</b> <a href="https://api.staging.oculos.no/v4">https://api.staging.oculos.no/v4</a>

We are excited to announce that our API now has a sandbox environment available!  This allows you to test and integrate our features in a safe and controlled setting. 


To get your sandbox key, please contact us at <a href="mailto:hello@triggloyalty.com">hello@triggloyalty.com</a>.
# Authentication
Our API is designed to be secure and efficient, and it requires an API key to authenticate your requests. In this short documentation, we'll guide you on how to use our API with the x-api-key header to ensure successful integration.

<h3>Step 1: Obtain Your API Key</h3>
Before you can start using our API, you'll need to obtain an API key. This key acts as your access pass and is typically provided to you by your contact person. If you haven't received your API key, please reach out to our support team or your sales person.
<h3>Step 2: Include the x-api-key Header</h3>
To make authenticated requests to our API, you must include the API key in the header of your HTTP requests. Specifically, you should add the "x-api-key" header with your API key as its value. 
  
  `x-api-key : <API KEY>`

<h3>Step 3 [OPTIONAL]: White list your IP address(es) for your production environment </h3>
Although this step is optional, we strongly encourage you to send us an list of your IP addresses that are in use in your production environment.


This lets us configure Trigg to only allow access to your API account from those IP's.

# Error Messages
The Trigg API returns a standarized detailed error message where it's possible. The structure of the error message looks like this:

  ```
  {
    "code" : "409",
    "message" : "Conflict",
    "detailedErrorMessage" : {

    }
  }
  ```

  The `detailedErrorMessage` is fully dynamic and can contain a simple string aswell as a list of errors'. 

# Terms Of Use
By accessing or using our API (the "Service"), you agree to comply with these Terms of Use. Please read them carefully, as they govern your usage of our API.

<h3>API Usage</h3>

You are granted a non-exclusive, non-transferable, limited license to access and use our API in accordance with these terms. You may only use the API for its intended purpose and in compliance with our guidelines and documentation.

<h3>API Key</h3>

Access to the API requires an API key. Keep your API key secure and do not share it with unauthorized parties. You are responsible for all actions performed using your API key. Ensure that the API key is not visible in any way in your application.

<h3>Prohibited Actions</h3>

You may not use the API to engage in any illegal, harmful, or abusive activities. You may not decompile, reverse engineer, or attempt to gain unauthorized access to the API or our systems. You may not use the API in a way that could harm or interfere with our services, infrastructure, or other users.

<h3>Data Privacy</h3>

When using our API, you may have access to user data. Ensure you handle such data in compliance with applicable data protection laws and our privacy policy.


By using our API, you acknowledge that you have read, understood, and agreed to these Terms of Use. Failure to comply with these terms may result in the suspension or termination of your API access. 
<h3>Functionality in preview</h3>
Methods marked with Preview in this API documentation are subject to change. 

These methods are provided for early access to new features but may have limited support, and their behavior, parameters, or responses can be modified or deprecated without prior notice. 

Use these methods with caution in production environments, as changes may impact integration stability. 
It is recommended to regularly check the documentation for updates when utilizing preview features.


We reserve the right to update these terms, so it is recommended to review them periodically for any changes.

# Rate Limits
Trigg API does not have any rate limits, but some external systems integrated with Trigg may have. 

Exceeding these limits may result in temporary access restrictions.

We strongly recommend implementing a back-off strategy to handle rate limit exceeded responses. This strategy helps you avoid overloading our/external servers and ensures a smoother user experience.


If you are receving one of the following errors it's an indication of an issue with an external system.

  ```
  {
    "code" : "429",
    "message" : "Too Many Requests",
    "detailedErrorMessage" : {
    }
  }
  ```

  ```
  {
    "code" : "502",
    "message" : "Bad Gateway",
    "detailedErrorMessage" : {
      "gateway" : "Connection to backend system failed. System: [system_name]",
      "gatewayMessage" : "Detailed error message here"
    }
  }
  ```


# Tutorials
Coming soon.
# Webhooks
A webhook is a way for two different software applications to communicate with each other in real-time. 
It's like a notification system that triggers actions automatically when certain events occur.    

Oculos can configure webhooks on request, please contact our support team for more information.
# Change Log
<h3>September 2026</h3>
<h4>2026-09-15</h4>

* Bugfixes across the API.
* Performance optimizations across the API.
<h3>June 2026</h3>
<h4>2026-06-17</h4>

* Added new endpoint for checking if a customer is quarantined (https://dev.triggloyalty.com/openapi/customers/quarantine?mobilePhone={mobilePhone})
* Improved endpoint for listing historical promotions, the endpoint not only returns the promotions but also the promotion definition, store information and more. (https://dev.triggloyalty.com/openapi/promotions/redeemed/history/customerId/{customerId})
* Standardized endpoint summaries across the API to align with RESTful naming conventions.
<h3>March 2026</h3>
<h4>2026-03-16</h4>

* New Wallet endpoints available that generates authorized provisioning URLs for Apple Wallet and Google Wallet. This integration allows you to retrieve pass-links for promotions and memberships by passing a customer id, which can then be mapped directly to "Add to Wallet" buttons in your UI.

* Added new integration against Agillic marketing automation platform.

* Promotion definitions is out of preview
* New endpoint added that allows to search customer by email [PREVIEW]  (https://dev.triggloyalty.com/openapi/customers/getcustomerbyemail)
* Minor bugfixes in API and documentation

<h3>March 2025</h3>
<h4>2025-03-03</h4>

* Added support for multi branding. This means that you can now run multiple brands on one account. 
* Added 422 quarantine status for the create customers method. This status is used when a customer is quarantined for a period of time.
* Enable/disable promotions endpoints are now out of preview.
* The property 'promotionDefinitionId' is now available on the promotion object. This property contains the id of the promotion definition that the promotion is based on.
* New endpoint for listing all promotion definitions. [PREVIEW] (https://dev.triggloyalty.com/openapi/promotions/getpromotionsdefinitions)
* New endpoint for listing of all active promotions thare are available to customers. [PREVIEW] (https://dev.triggloyalty.com/openapi/promotions/getpromotionscampaigns)
* Added a module endpoint. This endpoint collects minor endpoints that are not directly related to the main endpoints.

Available modules:

  * /modules/vehicles - endpoint for fetching and adding vehicles [PREVIEW] (https://dev.triggloyalty.com/openapi/modules/getvehiclesbycustomeridd)


<h3>November 2024</h3>
<h4>2024-11-19</h4>

* Added endpoints for enabling/disabling of promotions (in preview)
* Added endpoint for transfering clips on loyalty cards between two existing customers (in preview)
* Minor bugfixes
* Minor bugfixes in documentation

<h3>June 2024</h3>
<h4>2024-06-18</h4>

* Added endpoint for deleting a customer by external id
* Minor bugfixes in documentation

<h3>May 2024</h3>
<h4>2024-05-22</h4>
  
* Added an endpoint for returning all transactions resulting in a bonus reward (https://dev.triggloyalty.com/openapi/loyalty/getbonustransactions)
* Added a list of promotions on the customer object when applicable. Please note that this list only will contain active promotions.
* Added information to the documentation on how to mark a transaction as a return (https://dev.triggloyalty.com/openapi/transactions/addtransactions)
* Minor bugfixes
* Improved performance

<h4>2024-05-14</h4>
Added new methods

* Get customer by externalId
* Update customer by externalId
* Minor bugfixes
* Improved performance 


<h3>April 2024</h3>
<h4>2024-04-17</h4>
Introduced dynamic methods on the customers and promotions endpoints
<h3>March 2024</h3>
<h4>2024-03-19</h4>
Release of v4


Version: 4.3.4

## Servers

Production
```
https://api.oculos.no/v4
```

Staging
```
https://api.staging.oculos.no/v4
```

## Security

### main_auth

Type: oauth2
Authorization URL: http://example.com/api/oauth/dialog
Scopes:
- `read:users`: read users info
- `write:users`: modify or remove users

### api_key

Type: apiKey
In: header
Name: x-api-key

## Download OpenAPI description

 - [Trigg Integrations API](https://dev.triggloyalty.com/_bundle/@v4/openapi.yaml)

## Affiliates

 - [GET /affiliates](https://dev.triggloyalty.com/openapi/affiliates/getaffiliates.md): Returns a list of all available affiliates
## Abandoned carts

 - [POST /abandonedCarts](https://dev.triggloyalty.com/openapi/abandoned-carts/createcart.md): Creates or updates a cart. As with many other endpoints, the payload is configurable and can contain additional data in the `extendedProperties` field. To update a cart, use the same cartId as an exis
 - [PUT /abandonedCarts](https://dev.triggloyalty.com/openapi/abandoned-carts/emptycart.md): Method that allows the client to empty a stored cart
## Customers

 - [GET /customers](https://dev.triggloyalty.com/openapi/customers/getcustomerbymobilephone.md): This method allows the client to search for a customer by a mobile phone number. Example: `+4712345678` The response sample below shows the default response, but depending on your configuration the AP
 - [POST /customers](https://dev.triggloyalty.com/openapi/customers/createcustomer.md): The request sample(s) below shows the default payload and one minimum required payload. Depending on your configuration, the API may take or return additional fields in the extendedProperties object
 - [PUT /customers](https://dev.triggloyalty.com/openapi/customers/updatecustomer.md): The request sample(s) below shows the default payload and one minimum required payload. Depending on your configuration, the API may take or return additional fields in the extendedProperties object
 - [PUT /customers/externalId](https://dev.triggloyalty.com/openapi/customers/updatecustomerbyexternalid.md): The request sample(s) below shows the default payload and one minimum required payload. Depending on your configuration, the API may take or return additional fields in the extendedProperties object
 - [GET /customers/id/{id}](https://dev.triggloyalty.com/openapi/customers/getcustomerbyid.md): This method allows the client to search for a customer by a unique id Example: `226B14AF-18A6-44CF-834E-BE4BCA5D64B7` The response sample below shows the default response, but depending on your config
 - [GET /customers/externalId/{id}](https://dev.triggloyalty.com/openapi/customers/getcustomerbyexternalid.md): This method allows the client to search for a customer by an external Id Example: `B9012E40-1B08-4DC5-84F9-BB8E2653B2A6` The response sample below shows the default response, but depending on your con
 - [GET /customers/changed/{timestamp}](https://dev.triggloyalty.com/openapi/customers/getchangedcustomerslist.md): Returns a list of changed customers since given timestamp. Default (empty parameter) is since last day.
 - [DELETE /customers/id/{id}/source/{source}](https://dev.triggloyalty.com/openapi/customers/deletecustomer.md): Method that let's you delete a customer by Id
 - [DELETE /customers/externalId/{externalId}/source/{source}](https://dev.triggloyalty.com/openapi/customers/deletecustomerbyexternalid.md): Method that let's you delete a customer by an external id
 - [GET /customers/email/{email}](https://dev.triggloyalty.com/openapi/customers/getcustomerbyemail.md): This method allows the client to search for a customer by email address `Note: Special characters such as '+'' must be encoded. Example: +=%2B` The response sample below shows the default response, bu
 - [POST /customers/prospects](https://dev.triggloyalty.com/openapi/customers/createprospect.md): This endpoint creates a new customer prospect record in the system. It accepts either email or mobilePhone in the request body and returns the created customer id upon success. Depending on
 - [POST /customers/dynamic/{function}](https://dev.triggloyalty.com/openapi/customers/postcustomerdynamic.md): This method is fully dynamic both in request/response and is available for specific client customizations on the customer endpoint.
 - [GET /customers/quarantine](https://dev.triggloyalty.com/openapi/customers/getcustomerquarantinestatus.md): Check if a customer is quarantined by providing their mobile phone number.
## Consents

 - [GET /consents](https://dev.triggloyalty.com/openapi/consents/getconsents.md): Returns a list of all available consents
## Data Enrichment

 - [GET /dataenrichment/forms/{clientName}/{id}](https://dev.triggloyalty.com/openapi/data-enrichment/enrichmentfromschema.md): This endpoints automatically enriches a member by thats already stored in the MA-system. The endpoints fetches the member from the MA-system, enriches it's data, updates and redirects back to a pre-
 - [GET /data-enrichment/mobilePhone/{mobilePhone}](https://dev.triggloyalty.com/openapi/data-enrichment/discovercustomerbyphone.md): Looks up a mobile phone number and tries to discover owner data through 3rd party services.
 - [GET /data-enrichment/ssn/{ssn}](https://dev.triggloyalty.com/openapi/data-enrichment/discovercustomerbyssn.md): This method let's you retreive information on a member based on their SSN
## Health

 - [GET /health/ping](https://dev.triggloyalty.com/openapi/health/oiphealthping.md): Ping OIP with a 200 GET request to check system status. This endpoint does not require authentication.
## Import

 - [POST /import](https://dev.triggloyalty.com/openapi/import/import_data.md): Imports data into OIP by the body request, this method accepts various formats such as JSON, XML, CSV etc. This method may have to be configured by Oculos before usage and the examples below is just
 - [POST /import/form](https://dev.triggloyalty.com/openapi/import/import_form.md): Imports data into OIP from a form using the `application/x-www-form-urlencoded` content type. The endpoint may have to be configured by Oculos before usage.
 - [POST /import/file](https://dev.triggloyalty.com/openapi/import/import_file.md): Imports a file into OIP. Use multipart/form-data with a required field file (the file to upload). Curl example: `curl -X POST "http://api.oculos.no/v4/import/file" -F "file=@path/to/your/file.txt"` Th
## Loyalty

 - [GET /loyalty/bonus/campaigns/{id}](https://dev.triggloyalty.com/openapi/loyalty/getbonuscampaigns.md): Methods that returns all current bonus campaigns. The id parameters is optional and can be used to return all campaigns for a specific member. The return object is dynamic and can vary between clie
 - [POST /loyalty/bonus/import](https://dev.triggloyalty.com/openapi/loyalty/bonusimport.md): Method that allows a third-party to manually import activities and update bonus amount for a member. Available activites that qualifies for bounus points can be found using the `/bonus/rules` endpoint
 - [POST /loyalty/bonus/addRewardPoints](https://dev.triggloyalty.com/openapi/loyalty/bonusaddrewardpoints.md): Method that allows you to manually add points to specific member
 - [POST /loyalty/activity/{activityId}/customerId/{customerId}](https://dev.triggloyalty.com/openapi/loyalty/addbonuspointsbyactivity.md): This method allows you to add bonus points to a specific customer based on activity. The activityId is the identifier of the activity that the customer has performed. The customerId is the identifier
 - [POST /loyalty/loyalty-cards/transfer-clips](https://dev.triggloyalty.com/openapi/loyalty/transferclips.md): A method that allows the client to transfer clips on a loyalty card between two existing customers. Depending on your configuration, the API may take or return additional fields in the extendedProper
 - [GET /bonus/rules](https://dev.triggloyalty.com/openapi/loyalty/getbonusrules.md): Methods that returns all the rules and activitys that qualifies to bonuses.
 - [GET /loyalty/loyalty-cards/{customerId}](https://dev.triggloyalty.com/openapi/loyalty/getloyaltycards.md): Endpoint that returns a list of active loyalty/stamp cards for a customer.
 - [PUT /loyalty/achievements](https://dev.triggloyalty.com/openapi/loyalty/updateachievement.md): A method that allows the client to manually add clips/stamps to a customers achievement card which can be useful i scenarions where live updates are not possible. Depending on your configuration, the
 - [GET /loyalty/loyalty-cards/campaigns](https://dev.triggloyalty.com/openapi/loyalty/stampcardcampaigns.md): Endpoint that return all products that qualifies for a count in each loyalty/stamp card. Depending on your OIP configuration, the API may return additional fields in the extendedProperties object.
 - [POST /loyalty/transactions/customerId/{customerId}](https://dev.triggloyalty.com/openapi/loyalty/addbonuspointsbyactivity.md): This method allows you to add bonus points to a specific customer based on activity. The activityId is the identifier of the activity that the customer has performed. The customerId is the identifier
## Messaging

 - [POST /messaging/sms](https://dev.triggloyalty.com/openapi/messaging/sendsmsmessage.md): Sends an SMS with a given sender name.
 - [GET /messaging/sms/code/create/{phoneNumber}](https://dev.triggloyalty.com/openapi/messaging/createsmscode.md): Creates and sends an SMS with a unique code that can be used in 2 factor logins or customer verification processes. The sender, length and expiration time is configurable.
 - [GET /messaging/sms/code/verify/{phoneNumber}/{code}](https://dev.triggloyalty.com/openapi/messaging/verifysmscode.md): Verifies the SMS code recevied in the Create Code endpoint.
 - [GET /messaging/sms/trigger/{customerId}/{id}](https://dev.triggloyalty.com/openapi/messaging/triggersmsautomation.md): Triggers the send out of a pre-defined message. This message has to be configured by Oculos in advance.
## Modules

 - [GET /modules/vehicles/customerId/{customerId}](https://dev.triggloyalty.com/openapi/modules/getvehiclesbycustomerid.md): This method allows the client to search for vehicles by a customer id Example: `B9012E40-1B08-4DC5-84F9-BB8E2653B2A6` The response sample below shows the default response, but depending on your config
 - [POST /modules/vehicles/customerId/{customerId}](https://dev.triggloyalty.com/openapi/modules/addvehicle.md): This method allows the client to add a new vehicle for a customer
 - [PUT /modules/vehicles/vehicleId/{vehicleId}](https://dev.triggloyalty.com/openapi/modules/updatevehicle.md): This method allows the client to update a vehicle
 - [DELETE /modules/vehicles/vehicleId/{vehicleId}](https://dev.triggloyalty.com/openapi/modules/deletevehicle.md): This method allows the client to delete a vehicle
## Payment Cards

 - [POST /payment-cards](https://dev.triggloyalty.com/openapi/payment-cards/addpaymentcard.md): Use this endpoint for adding a card token to an existing member. This method requires an integration with a payment provider.
 - [GET /payment-cards/token/{token}](https://dev.triggloyalty.com/openapi/payment-cards/getpaymentcards.md): Retrives a member by card token This method requires an integration with a payment provider.
 - [GET /payment-cards/customerId/{customerId}](https://dev.triggloyalty.com/openapi/payment-cards/getpaymentcardsbycustomerid.md): Method that returns a list of all payment cards attached to a member. If there are no cards attached to the member, an empty list will be returned. This method requires an integration with a payment
 - [DELETE /payment-cards/{customerId}/{cardId}](https://dev.triggloyalty.com/openapi/payment-cards/deletecard.md): Method used for deleting card attached to member
 - [POST /payment-cards/signature](https://dev.triggloyalty.com/openapi/payment-cards/createverifonesignature.md): Method used to create a payload that can be used to trigger a new card registration process. This metod requires addional services, please contact your advisor for more information.
## Plugins

 - [POST /plugins/cart/price](https://dev.triggloyalty.com/openapi/plugins/cartscalculateprice.md): Endpoint used for calculating a new price on a cart based on current campaigns and/or a members available: * Bonus * Coupons * Vouchers As both the request and response is fully dynamic, the format o
 - [POST /plugins/pos/extenda](https://dev.triggloyalty.com/openapi/plugins/extendaplugingetpromotions.md): Endpoint used for calculating a new price on a cart based on current campaigns and/or a members available: * Bonus * Coupons * Vouchers As both the request and response is fully dynamic, the format o
## Promotions

 - [GET /promotions/customerId/{customerId}](https://dev.triggloyalty.com/openapi/promotions/getpromotionsbycustomerid.md): Returns a list of all available promotions for a member.
 - [GET /promotions/mobilePhone](https://dev.triggloyalty.com/openapi/promotions/getpromotionsbymobilephone.md): Returns a list of all available promotions for a member by using the mobile phone number
 - [POST /promotions/redeem](https://dev.triggloyalty.com/openapi/promotions/redeempromotion.md): Method that redeems a promotion for a customer.
 - [GET /promotions/redeem/history/customerId/{customerId}](https://dev.triggloyalty.com/openapi/promotions/getpromotionhistory.md): Returns a list of redeemed promotions for a given customer.
 - [POST /promotions/cart](https://dev.triggloyalty.com/openapi/promotions/postpromotioncart.md): Return promotions based on shopping cart
 - [GET /promotions/campaigns](https://dev.triggloyalty.com/openapi/promotions/getpromotionscampaigns.md): This method allows the client to get a list of all active promotions.
 - [GET /promotions/definitions](https://dev.triggloyalty.com/openapi/promotions/getpromotionsdefinitions.md): This method allows the client to list all promotion definitions
 - [POST /promotions/dynamic/{function}](https://dev.triggloyalty.com/openapi/promotions/postpromotiondynamic.md): This method is fully dynamic both in request/response and is available for specific client customizations on the promotions endpoint.
 - [POST /promotions/{promotionId}/enableUse/{customerId}](https://dev.triggloyalty.com/openapi/promotions/enablecustomerpromotionuse.md): This method allows a specific promotion to be used (redeemed) by a specific customer again, if it previously has been disabled using the `disableUse ` method. As default, promotions are set to availa
 - [POST /promotions/{promotionId}/disableUse/{customerId}](https://dev.triggloyalty.com/openapi/promotions/disablecustomerpromotionuse.md): Disable the possiblity for a specific promotion to be used (redeemed) by a specific customer.
## Reports

 - [GET /reports/{reportType}](https://dev.triggloyalty.com/openapi/reports/getreport.md): Method that returns different types of reports based on input parameters and/or querys. Input parameters and/or querys are fully dynamic and can vary between clients. For a complete list of paramete
## Stores

 - [GET /stores](https://dev.triggloyalty.com/openapi/stores/getstores.md): Endpoint for getting all client stores, both physical and online. Default properties are id and name. Depending on the clients data, there may be additional data available under the extendedProper
## Transactions

 - [GET /transactions/customerId/{customerId}](https://dev.triggloyalty.com/openapi/transactions/gettransactions.md): Returns all transactions for a member.
 - [POST /transactions](https://dev.triggloyalty.com/openapi/transactions/addtransactions.md): Endpoint used for inserting transactions into OIP. It is recommended to send in a list/batch of transactions instead of sending multiple single transactions. The maximum recommended items per batch is
## Triggers

 - [POST /triggers/{id}/customer/{customerId}](https://dev.triggloyalty.com/openapi/triggers/triggerautomationbycustomerid.md): Methods available to trigger automations. The automation that should be triggered also has to be configured in the marketing automation system. As the payload can vary between triggers, the request
 - [POST /triggers/{id}/customer/mobilePhone/{mobilePhone}](https://dev.triggloyalty.com/openapi/triggers/triggerautomationbymobilephone.md): Methods available to trigger automations by a configurable identificator, for example mobile phone. The automation that should be triggered also has to be configured in the marketing automation sys
## Vipps

 - [GET /vipps/codeword/{phone}](https://dev.triggloyalty.com/openapi/vipps/vippsrecruitbycodeword.md): Starts the recruitment process from a code word
 - [POST /vipps](https://dev.triggloyalty.com/openapi/vipps/vippsrecruitfrompos.md): This method allows POS to trigger the Vipps recruitment process and OIP to collect store recruitment statistics.
## Wallets

 - [GET /wallets](https://dev.triggloyalty.com/openapi/wallets/generatewalletlinks.md): This method allows the client to generate wallet links for Apple Wallet and Google Wallet. This method allows you to retrieve pass-links for promotions and memberships by passing a customer id, which
