Preo
  • Homepage
  • About
Apps
  • Dashboard
  • App Store
  • Google Play
Social
  • LinkedIn

© 2026 Preo ApS

  • Integration
  • API
Information
Auth
    Get user infoget
Editions
    List editionsgetCreate editionpostGet edition detailsgetUpdate editionpatchDuplicate editionpostGet edition field choicesgetRun edition healthcheckget
Orders
    List ordersgetRetrieve order detailsget
Purchases
    Retrieve purchase detailsgetCreate refund request for purchasepost
User
    List usersgetRetrieve usergetPartially update userpatch
Refunds
    Create refund request for purchasepostList refund requestsgetCreate refund requestpostRetrieve refund request detailsgetApprove refund requestpostReject refund requestpost
Files
    List filesgetUpload filepostGet file detailsgetDelete filedeleteUpdate file metadatapatch
Data Imports
    List data importsgetCreate data importpostGet data import detailsgetUpdate data importpatchCancel data importpostList column mappingsgetUpdate column mappingspatchPreview import ordersgetProcess column mappingspostList product mappingsgetUpdate product mappingspatchStart import processpostValidate column mappingspostImport external orderspost
Campaigns
    List campaignsgetCreate campaignpostRetrieve campaigngetDelete campaigndeleteUpdate campaignpatchCancel campaignpostSchedule campaignpostSend campaign nowpostGet campaign statsget
Consents
    List consentsgetCreate consentpostRetrieve consentgetDelete consentdeleteUpdate consentpatch
Email Messages
    List email messagesgetCreate email messagepostGet email message detailsgetDelete email messagedeleteUpdate email messagepatchAdopt template to editionpostDuplicate email messagepostPreview emailpostGet template variablesget
Segments
    List segmentsgetCreate segmentpostRetrieve segmentgetDelete segmentdeleteUpdate segmentpatchExport segment users as CSVgetRecalculate segmentpostReset stuck segment to draftpostGet CEL context schema and dynamic valuesgetValidate CEL expressionpost
Webhooks
    List webhook endpointsgetCreate webhook endpointpostRetrieve webhook endpointgetDelete webhook endpointdeleteUpdate webhook endpointpatchList deliveries for webhook endpointgetGet delivery detailgetRetry a failed deliverypostRotate webhook secretpost
Schemas
Preo API
Preo API

Consents

Endpoint

List consents

GET
https://api.preo.dev
/v1/consents

Mixin for ViewSets that handle organization-scoped resources.

This mixin provides automatic filtering of querysets based on the organizations a staff user has access to, and adjusts permission checks to allow list operations without requiring an explicit organization_id parameter.

Class Attributes: organization_filter_field: Field name to use for filtering queryset (default: "organization_id") organization_param_name: Query/path parameter name for organization (default: "organization_id") min_role_for_list: Minimum role required for list operation (default: "staff") Options: "admin", "manager", "staff", "guest"

Behavior: - For list operations: Returns resources from ALL organizations where user has sufficient role - For other operations: Uses standard organization-specific permission checks - If organization_id is provided as query/path param: Filters to that specific organization only

Example: >>> class FileViewSet(OrganizationAccessMixin, ModelViewSet): ... organization_filter_field = "organization_id" ... organization_param_name = "organization_id" ... min_role_for_list = "staff" ... permission_classes = (IsAuthenticated, IsOrganizationStaff) ... ... # List will now return files from all accessible organizations ... # GET /api/files/ - returns all accessible files ... # GET /api/files/?organization_id=org_xyz - returns only from that organization

Notes: - The mixin expects the viewset to have a StaffUser as request.user - The mixin works with both direct organization fields and related fields (e.g., "vendor__organization_id") - For create operations, organization_id should be validated in the serializer

List consents › query Parameters

edition_id
​string
enabled
​boolean
ordering
​string[] · style: form

Ordering

  • created - Created
  • -created - Created (descending)
  • modified - Modified
  • -modified - Modified (descending)
  • order - Order
  • -order - Order (descending)
  • title - Title
  • -title - Title (descending)
Enum values:
-created
-modified
-order
-title
created
modified
order
title
organization_id
​string
page
​integer

A page number within the paginated result set.

page_size
​integer

Number of results to return per page (default: 100).

published
​boolean
scope
​string | null · enum
  • organization - organization
  • edition - edition
  • vendor - vendor
  • product - product
Enum values:
edition
organization
product
vendor
type
​string | null · enum
  • terms - terms
  • marketing - marketing
  • notice - notice
Enum values:
marketing
notice
terms

List consents › Responses

200
count
​integer · required
​object[] · required
next
​string · uri
previous
​string · uri
GET/v1/consents
curl --request GET \ --url https://api.preo.dev/v1/consents
shell
Example Responses
{ "count": 123, "next": "http://api.example.org/accounts/?page=4", "previous": "http://api.example.org/accounts/?page=2", "results": [ { "id": "id", "organization_id": "organization_id", "title": "title", "type": "terms", "scope": "scope", "enabled": true, "published": true, "published_date": "2024-08-25T15:00:00Z", "required": true, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ], "consent_text": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "document_url": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "order": 0, "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" } ] }
json
application/json

Create consent

POST
https://api.preo.dev
/v1/consents

Mixin for ViewSets that handle organization-scoped resources.

This mixin provides automatic filtering of querysets based on the organizations a staff user has access to, and adjusts permission checks to allow list operations without requiring an explicit organization_id parameter.

Class Attributes: organization_filter_field: Field name to use for filtering queryset (default: "organization_id") organization_param_name: Query/path parameter name for organization (default: "organization_id") min_role_for_list: Minimum role required for list operation (default: "staff") Options: "admin", "manager", "staff", "guest"

Behavior: - For list operations: Returns resources from ALL organizations where user has sufficient role - For other operations: Uses standard organization-specific permission checks - If organization_id is provided as query/path param: Filters to that specific organization only

Example: >>> class FileViewSet(OrganizationAccessMixin, ModelViewSet): ... organization_filter_field = "organization_id" ... organization_param_name = "organization_id" ... min_role_for_list = "staff" ... permission_classes = (IsAuthenticated, IsOrganizationStaff) ... ... # List will now return files from all accessible organizations ... # GET /api/files/ - returns all accessible files ... # GET /api/files/?organization_id=org_xyz - returns only from that organization

Notes: - The mixin expects the viewset to have a StaffUser as request.user - The mixin works with both direct organization fields and related fields (e.g., "vendor__organization_id") - For create operations, organization_id should be validated in the serializer

Create consent › Request Body

organization_id
​string · required
title
​string · maxLength: 250 · required
type
​string · enum
  • terms - terms
  • marketing - marketing
  • notice - notice
Enum values:
terms
marketing
notice
Default: terms
enabled
​boolean
Default: true
published
​boolean
Default: false
required
​boolean
Default: false
​object
​object
edition_id
​string | null
vendor_org_id
​string | null
product_ids
​string[]

Create consent › Responses

id
​string · readOnly · required
organization_id
​string | null · readOnly · required
title
​string · maxLength: 250 · required
scope
​string | null · readOnly · required
published_date
​string | null · date-time · readOnly · required
edition_id
​string | null · readOnly · required
vendor_org_id
​string | null · readOnly · required
product_ids
​string[] · readOnly · required
​object · required
​object · required
order
​integer · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
​
enabled
​boolean

Is consent visible to new users?

published
​boolean

Is consent applicable to new and existing users? Note, that published consents can't be edited.

required
​boolean

Is consent required for new and existing users?

POST/v1/consents
curl --request POST \ --url https://api.preo.dev/v1/consents \ --header 'Content-Type: application/json' \ --data ' { "organization_id": "organization_id", "title": "title", "type": "terms", "enabled": true, "published": false, "required": false, "consent_text": { "key": "string" }, "document_url": { "key": "string" }, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ] } '
shell
Example Request Body
{ "organization_id": "organization_id", "title": "title", "type": "terms", "enabled": true, "published": false, "required": false, "consent_text": { "key": "string" }, "document_url": { "key": "string" }, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ] }
json
Example Responses
{ "id": "id", "organization_id": "organization_id", "title": "title", "type": "terms", "scope": "scope", "enabled": true, "published": true, "published_date": "2024-08-25T15:00:00Z", "required": true, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ], "consent_text": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "document_url": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "order": 0, "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Retrieve consent

GET
https://api.preo.dev
/v1/consents/{id}

Mixin for ViewSets that handle organization-scoped resources.

This mixin provides automatic filtering of querysets based on the organizations a staff user has access to, and adjusts permission checks to allow list operations without requiring an explicit organization_id parameter.

Class Attributes: organization_filter_field: Field name to use for filtering queryset (default: "organization_id") organization_param_name: Query/path parameter name for organization (default: "organization_id") min_role_for_list: Minimum role required for list operation (default: "staff") Options: "admin", "manager", "staff", "guest"

Behavior: - For list operations: Returns resources from ALL organizations where user has sufficient role - For other operations: Uses standard organization-specific permission checks - If organization_id is provided as query/path param: Filters to that specific organization only

Example: >>> class FileViewSet(OrganizationAccessMixin, ModelViewSet): ... organization_filter_field = "organization_id" ... organization_param_name = "organization_id" ... min_role_for_list = "staff" ... permission_classes = (IsAuthenticated, IsOrganizationStaff) ... ... # List will now return files from all accessible organizations ... # GET /api/files/ - returns all accessible files ... # GET /api/files/?organization_id=org_xyz - returns only from that organization

Notes: - The mixin expects the viewset to have a StaffUser as request.user - The mixin works with both direct organization fields and related fields (e.g., "vendor__organization_id") - For create operations, organization_id should be validated in the serializer

Retrieve consent › path Parameters

id
​string · required

A unique value identifying this consent.

Retrieve consent › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
title
​string · maxLength: 250 · required
scope
​string | null · readOnly · required
published_date
​string | null · date-time · readOnly · required
edition_id
​string | null · readOnly · required
vendor_org_id
​string | null · readOnly · required
product_ids
​string[] · readOnly · required
​object · required
​object · required
order
​integer · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
​
enabled
​boolean

Is consent visible to new users?

published
​boolean

Is consent applicable to new and existing users? Note, that published consents can't be edited.

required
​boolean

Is consent required for new and existing users?

GET/v1/consents/{id}
curl --request GET \ --url https://api.preo.dev/v1/consents/:id
shell
Example Responses
{ "id": "id", "organization_id": "organization_id", "title": "title", "type": "terms", "scope": "scope", "enabled": true, "published": true, "published_date": "2024-08-25T15:00:00Z", "required": true, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ], "consent_text": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "document_url": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "order": 0, "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Delete consent

DELETE
https://api.preo.dev
/v1/consents/{id}

Mixin for ViewSets that handle organization-scoped resources.

This mixin provides automatic filtering of querysets based on the organizations a staff user has access to, and adjusts permission checks to allow list operations without requiring an explicit organization_id parameter.

Class Attributes: organization_filter_field: Field name to use for filtering queryset (default: "organization_id") organization_param_name: Query/path parameter name for organization (default: "organization_id") min_role_for_list: Minimum role required for list operation (default: "staff") Options: "admin", "manager", "staff", "guest"

Behavior: - For list operations: Returns resources from ALL organizations where user has sufficient role - For other operations: Uses standard organization-specific permission checks - If organization_id is provided as query/path param: Filters to that specific organization only

Example: >>> class FileViewSet(OrganizationAccessMixin, ModelViewSet): ... organization_filter_field = "organization_id" ... organization_param_name = "organization_id" ... min_role_for_list = "staff" ... permission_classes = (IsAuthenticated, IsOrganizationStaff) ... ... # List will now return files from all accessible organizations ... # GET /api/files/ - returns all accessible files ... # GET /api/files/?organization_id=org_xyz - returns only from that organization

Notes: - The mixin expects the viewset to have a StaffUser as request.user - The mixin works with both direct organization fields and related fields (e.g., "vendor__organization_id") - For create operations, organization_id should be validated in the serializer

Delete consent › path Parameters

id
​string · required

A unique value identifying this consent.

Delete consent › Responses

No response body

No data returned
DELETE/v1/consents/{id}
curl --request DELETE \ --url https://api.preo.dev/v1/consents/:id
shell
Example Responses
No example specified for this content type

Update consent

PATCH
https://api.preo.dev
/v1/consents/{id}

Mixin for ViewSets that handle organization-scoped resources.

This mixin provides automatic filtering of querysets based on the organizations a staff user has access to, and adjusts permission checks to allow list operations without requiring an explicit organization_id parameter.

Class Attributes: organization_filter_field: Field name to use for filtering queryset (default: "organization_id") organization_param_name: Query/path parameter name for organization (default: "organization_id") min_role_for_list: Minimum role required for list operation (default: "staff") Options: "admin", "manager", "staff", "guest"

Behavior: - For list operations: Returns resources from ALL organizations where user has sufficient role - For other operations: Uses standard organization-specific permission checks - If organization_id is provided as query/path param: Filters to that specific organization only

Example: >>> class FileViewSet(OrganizationAccessMixin, ModelViewSet): ... organization_filter_field = "organization_id" ... organization_param_name = "organization_id" ... min_role_for_list = "staff" ... permission_classes = (IsAuthenticated, IsOrganizationStaff) ... ... # List will now return files from all accessible organizations ... # GET /api/files/ - returns all accessible files ... # GET /api/files/?organization_id=org_xyz - returns only from that organization

Notes: - The mixin expects the viewset to have a StaffUser as request.user - The mixin works with both direct organization fields and related fields (e.g., "vendor__organization_id") - For create operations, organization_id should be validated in the serializer

Update consent › path Parameters

id
​string · required

A unique value identifying this consent.

Update consent › Request Body

title
​string · maxLength: 250
type
​string · enum
  • terms - terms
  • marketing - marketing
  • notice - notice
Enum values:
terms
marketing
notice
enabled
​boolean
published
​boolean
required
​boolean
​object
​object
edition_id
​string | null
vendor_org_id
​string | null
product_ids
​string[]

Update consent › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
title
​string · maxLength: 250 · required
scope
​string | null · readOnly · required
published_date
​string | null · date-time · readOnly · required
edition_id
​string | null · readOnly · required
vendor_org_id
​string | null · readOnly · required
product_ids
​string[] · readOnly · required
​object · required
​object · required
order
​integer · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
​
enabled
​boolean

Is consent visible to new users?

published
​boolean

Is consent applicable to new and existing users? Note, that published consents can't be edited.

required
​boolean

Is consent required for new and existing users?

PATCH/v1/consents/{id}
curl --request PATCH \ --url https://api.preo.dev/v1/consents/:id \ --header 'Content-Type: application/json' \ --data ' { "title": "title", "type": "terms", "enabled": true, "published": true, "required": true, "consent_text": { "key": "string" }, "document_url": { "key": "string" }, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ] } '
shell
Example Request Body
{ "title": "title", "type": "terms", "enabled": true, "published": true, "required": true, "consent_text": { "key": "string" }, "document_url": { "key": "string" }, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ] }
json
Example Responses
{ "id": "id", "organization_id": "organization_id", "title": "title", "type": "terms", "scope": "scope", "enabled": true, "published": true, "published_date": "2024-08-25T15:00:00Z", "required": true, "edition_id": "edition_id", "vendor_org_id": "vendor_org_id", "product_ids": [ "string" ], "consent_text": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "document_url": { "en": "en", "da": "da", "se": "se", "pl": "pl", "nl": "nl" }, "order": 0, "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

CampaignsEmail Messages