# Trigg Integrations API
This is the documentation for the current release of the Trigg Integrations API.
Current release: 2025-03-03 (v.4.3.0)
{% admonition type="info" name="Moved documentation" %} You are now viewing our new and improved API documentation.
If you were redirected here from https://dev.oip.oculos.no, 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.
Production: https://api.oculos.no/v4
Staging: https://api.staging.oculos.no/v4
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 hello@triggloyalty.com.
# 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.
Step 1: Obtain Your API Key
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.
Step 2: Include the x-api-key Header
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 : `
Step 3 [OPTIONAL]: White list your IP address(es) for your production environment
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.
API Usage
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.
API Key
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.
Prohibited Actions
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.
Data Privacy
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.
Functionality in preview
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.
# Troubleshooting & Tips
Coming soon
# 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
March 2025
2025-03-03
* 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)
November 2024
2024-11-19
* 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
June 2024
2024-06-18
* Added endpoint for deleting a customer by external id
* Minor bugfixes in documentation
May 2024
2024-05-22
* 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
2024-05-14
Added new methods
* Get customer by externalId
* Update customer by externalId
* Minor bugfixes
* Improved performance
April 2024
2024-04-17
Introduced dynamic methods on the customers and promotions endpoints
March 2024
2024-03-19
Release of v4
Version: 4.3.0
## 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
Endpoints for managing affiliates.
The affiliate endpoints currenly allows you to retrieve information about affiliates.
### Get affiliates [PREVIEW]
- [GET /affiliates](https://dev.triggloyalty.com/openapi/affiliates/getaffiliates.md): Returns a list of all available affiliates
## Abandoned carts
Endpoints for managing abandoned carts
An abandoned cart function helps businesses track when online shoppers add items to their virtual shopping carts but leave the website or app without completing their purchase.
It captures data about these abandoned carts, including the specific products left behind and, when available, the customer's contact information.
### Create or update a cart
- [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 existing cart.
### Empty cart
- [PUT /abandonedCarts](https://dev.triggloyalty.com/openapi/abandoned-carts/emptycart.md): Method that allows the client to empty a stored cart
## Customers
The customers endpoint allows you to create, update or search for customers through various parameters depending on your configuration.
Depending on your configuration, the API may take or return additional fields in the extendedProperties object.
To get an example of your specific integration, please contact our support team.
### Get customer by mobile phone
- [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 API may return additional fields in the extendedProperties object.
### Create customer
- [POST /customers](https://dev.triggloyalty.com/openapi/customers/createmember.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. For specific examples reach out to your technical contact.
### Update customer
- [PUT /customers](https://dev.triggloyalty.com/openapi/customers/updatemember.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. For specific examples reach out to your technical contact.
### Update customer by external id
- [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. For specific examples reach out to your technical contact.
### Get customer by id
- [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 configuration the API may return additional fields in the extendedProperties object.
### Get customer by external id
- [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 configuration the API may return additional fields in the extendedProperties object.
### Get changed customers
- [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 customer
- [DELETE /customers/id/{id}/source/{source}](https://dev.triggloyalty.com/openapi/customers/deletemember.md): Method that let's you delete a customer by Id
### Delete customer by external id
- [DELETE /customers/externalId/{externalId}/source/{source}](https://dev.triggloyalty.com/openapi/customers/deletememberbyexternalid.md): Method that let's you delete a customer by an external id
### Get customer by email [PREVIEW]
- [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, but depending on your configuration the API may return additional fields in the extendedProperties object.
### Create prospect [PREVIEW ]
- [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 your configuration, the API may take or return additional fields in the extendedProperties object. For specific examples reach out to your technical contact.
### Dynamic method
- [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.
## Consents
Endpoint that lists all available consents for a client.
Depending on your configuration, the API may take or return additional fields in the extendedProperties object.
To get an example of your specific integration, please contact our support team.
### Get consents
- [GET /consents](https://dev.triggloyalty.com/openapi/consents/getconsents.md): Returns a list of all available consents
## Data Enrichment
Endpoint that lets you enrich member data .
### Enrich and redirect member
- [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-configured URL.
### Discover member by phone number
- [GET /data-enrichment/mobilePhone/{mobilePhone}](https://dev.triggloyalty.com/openapi/data-enrichment/discovermemberbyphone.md): Looks up a mobile phone number and tries to discover owner data through 3rd party services.
### Discover member by social security number (SSN)
- [GET /data-enrichment/ssn/{ssn}](https://dev.triggloyalty.com/openapi/data-enrichment/discovermemberbyssn.md): This method let's you retreive information on a member based on their SSN
## Health
Endpoint for checking the Trigg API health status.
With these endpoint(s) you can make a request to Trigg to get a quick system status.
### Ping
- [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
Endpoint that provides methods for importing data, typically in batches into Trigg.
In this endpoint we can receive many formats and types, such as JSON and XML requests.
To get an example of your specific integration, please contact our support team.
### 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 an illustration of payload as the endpoint is fully dynamic.
### Form import
- [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.
### File import
- [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"
This endpoint may have to be configured by Oculos before usage.
## Loyalty
Endpoints for manually managing different types of loyalty objects.
Methods under this endpoint lets you view current campaigns, manually add bonus points, get balance of a customers loyalty card(s) etc.
Depending on your configuration, the API may take or return additional fields in the extendedProperties object.
To get an example of your specific integration, please contact our support team.
### Return all bonus campaigns
- [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 clients, the example below shows the most common types of fields.
### Import activity bonus
- [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.
The request and response can be customer specific and the example below shows only a common type of request body.
### Add bonus points
- [POST /loyalty/bonus/addRewardPoints](https://dev.triggloyalty.com/openapi/loyalty/bonusaddrewardpoints.md): Method that allows you to manually add points to specific member
### Add bonus by activity id
- [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 of the customer that has performed the activity.
The request body is fully dynamic and can contain any number of properties depending on configuration.
The request sample is only an minimum required example and may have to be replaced with the actual request body if the configuration requires it.
### Transfer clips [PREVIEW]
- [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 extendedProperties object.
### Return all bonus rules
- [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 cards
- [GET /loyalty/loyalty-cards/{customerId}](https://dev.triggloyalty.com/openapi/loyalty/stampcard1.md): Endpoint that returns a list of active loyalty/stamp cards for a customer.
### Update achievement [PREVIEW]
- [PUT /loyalty/achievements](https://dev.triggloyalty.com/openapi/loyalty/updateachivement.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 API may take or return additional fields in the extendedProperties object.
### Get loyalty card campaigns
- [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.
### Add bonus by activity id
- [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 of the customer that has performed the activity.
The request body is fully dynamic and can contain any number of properties depending on configuration.
The request sample is only an minimum required example and may have to be replaced with the actual request body if the configuration requires it.
## Messaging
Endpoint that lets yoy send different types of messages and manually trigger automations that send SMS.
In this endpoint you will also find a complete set of methods to create a 2F verfication solution by SMS.
### Send SMS
- [POST /messaging/sms](https://dev.triggloyalty.com/openapi/messaging/sendsmsmessage.md): Sends an SMS with a given sender name.
### Create Code
- [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.
### Verify code
- [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.
### Trigger sms
- [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
Endpoints for managing minor features that are not directly related to the main endpoints.
Available modules:
* Wishlist - Endpoints for managing wishlists
* Vehicles - Endpoints for managing vehicles [PREVIEW]
### Get vehicles [PREVIEW]
- [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 configuration the API may return additional fields in the extendedProperties object.
### Add vehicle [PREVIEW]
- [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
### Update vehicle [PREVIEW]
- [PUT /modules/vehicles/vehicleId/{vehicleId}](https://dev.triggloyalty.com/openapi/modules/updatevehicle.md): This method allows the client to update a vehicle
### Delete vehicle [PREVIEW]
- [DELETE /modules/vehicles/vehicleId/{vehicleId}](https://dev.triggloyalty.com/openapi/modules/deletevehicle.md): This method allows the client to delete a vehicle
## Payment Cards
TODO
### Attach payment card token to member
- [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 member by payment card token
- [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 all payment cards by customerId
- [GET /payment-cards/customerId/{customerId}](https://dev.triggloyalty.com/openapi/payment-cards/getpaymentcardsbymemberid.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 provider.
### Delete payment card
- [DELETE /payment-cards/{customerId}/{cardId}](https://dev.triggloyalty.com/openapi/payment-cards/deletecard.md): Method used for deleting card attached to member
### Create payment card signature
- [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
TODO
### Calculate new price on cart
- [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 of the data exchanged has to be agreed upon before activating.
### Extenda Plugin endpoint
- [POST /plugins/pos/extenda](https://dev.triggloyalty.com/openapi/plugins/extendaplugingetcoupons.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 of the data exchanged has to be agreed upon before activating.
## Promotions
This API provides various methods for managing promotions.
Clients can retrieve available promotions id or phone number, redeem promotions, and view redeemed ones.
### Get promotions
- [GET /promotions/customerId/{customerId}](https://dev.triggloyalty.com/openapi/promotions/getcouponsbymemberid.md): Returns a list of all available promotions for a member.
### Get promotions by phone number
- [GET /promotions/mobilePhone](https://dev.triggloyalty.com/openapi/promotions/getcouponsbymobilephone.md): Returns a list of all available promotions for a member by using the mobile phone number
### Redeem promotion
- [POST /promotions/redeem](https://dev.triggloyalty.com/openapi/promotions/redeempromotion.md): Method that redeems a promotion for a customer.
### Get Redeemed Promotions
- [GET /promotions/redeem/history/customerId/{customerId}](https://dev.triggloyalty.com/openapi/promotions/getcouponhistory.md): Method that returns a list of redeemed promotions for a customer.
Example of usage; ??
### Get promotions by cart
- [POST /promotions/cart](https://dev.triggloyalty.com/openapi/promotions/postpromotioncart.md): Return promotions based on shopping cart
### Get campaigns
- [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 definitions [PREVIEW]
- [GET /promotions/definitions](https://dev.triggloyalty.com/openapi/promotions/getpromotionsdefinitions.md): This method allows the client to list all promotion definitions
### Dynamic method
- [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.
### Enable promotion use
- [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 available/enabled for use when assigned to a customer.
### Disable promotion use
- [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
Endpoint that provides method(s) for returning various types of reports. Reports could be either of standard type or could be individually configured for clients.
Examples of reports:
* New customers last 24 hours
* Deleted customers last 24 hours
* Bonus transactions made by customer
* +++
Some reports that have a high volume response, may return the result in pages. This requires the client to iterate through each page to fetch the entire result.
In reports with paging functionality, a metaData object will contain paging information:
```
{
"metaData": {
"reportType": "customers",
"totalRecords": 12,
"totalPages": 1,
"activePage": 1
}
}
```
* `totalRecords` = Number of records available through all pages
* `totalPages` = How many pages available containing data
* `activePage` = Which page the client is on
To control wich page to fetch data from and how many records that should be return on each page use querystring parameters.
* `page` = from wich page should the dataset be fetched from (default = 1)
* `rowsPage` = how many results per page that should be returned (default = 25)
Please contact us for further information on your possiblites.
### Get reports
- [GET /reports/{reportType}](https://dev.triggloyalty.com/openapi/reports/report1.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 parameters and example of response in your implemenation, please contact our support team.
## Stores
Endpoint for Stores
### Get Stores
- [GET /stores](https://dev.triggloyalty.com/openapi/stores/store1.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 extendedProperties object.
## Transactions
Endpoint for transactions
### Get Transactions
- [GET /transactions/customerId/{customerId}](https://dev.triggloyalty.com/openapi/transactions/gettransactions.md): Returns all transactions for a member.
### Create transaction
- [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 around 400 transactions/items.
{% admonition type="info" name="Returns" %}
To make a transaction be processed as a return, you have to do the following:
* Set the transactionType field on item level to 'RETURN'
* Set the quantity value to a negative value.
{% /admonition %}
Example of transaction flagged as a return:
{
"ReceiptRequests": [
{
"Header": {
"StoreId": "001",
"ReceiptId": "9999258836",
"TimeStamp": "2023-10-13T14:50:05",
"ConsumerId": "9ae37ad3-8a55-4bb5-81fd-b08f00b684ed",
"GrossAmount": 1817.8,
"Vat": 363.56
},
"Items": [
{
"ReceiptId": "Id of receipt",
"LineNo": 1,
"Quantity": -1,
"ProductId": "VR1722775",
"ProductName": "MINI CHRISTMAS TREE WITH LED LIGHTS",
"GrossAmount": 1817.8,
"Vat": 363.56,
"NetAmount": 1454.24,
"TransactionType": "RETURN"
}
]
}
]
}
## Triggers
Endpoints that enables triggering automations through the API.
Automations is a feature that simplifies and speeds up repetitive tasks. It helps marketers send emails, post on social media, and manage customer data more efficiently
### Trigger automation by member id
- [POST /triggers/{id}/customer/{customerId}](https://dev.triggloyalty.com/openapi/triggers/triggerautomationbymemberid.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 is fully dynamic and should be posted as dictionary with key/value.
### Trigger automation by mobile phone number
- [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 system.
As the payload can vary between triggers, the request is fully dynamic and should be posted as dictionary with key/value.
## Vipps
Endpoint for Vipps integration
### Trigger recruitment by SMS
- [GET /vipps/codeword/{phone}](https://dev.triggloyalty.com/openapi/vipps/vippsrecruitbycodeword.md): Starts the recruitment process from a code word
### Trigger recruitment from POS
- [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.