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

Compartments

Operations related to Compartments, the logical partitions used to namespace User Account identifiers, ensuring uniqueness by combining Compartment ID with User Account ID across different systems (CRM, loyalty programs, partner SSOs). Each Datamart has a default compartment, and additional compartments can be created to represent different places where users have accounts and profiles.

Relevant documentation:

Search datamarts on which the compartment is enabled

get
/user_account_compartments/{compartment_id}/datamart_selections
Path parameters
compartment_idstringRequired
Query parameters
organisation_idstringOptional

Id of the organisation to search

idstringOptional

Id of a specific selection to search for

datamart_idstringOptional

Id of a specific datamart to search for

first_resultinteger · int32Optional

Offset from which the search must be performed

max_resultsinteger · int32Optional

Number of maximum items that shall be return by this search

Responses
200

Success !

application/json
first_resultintegerRequired
statusstring · enumRequiredPossible values:
max_resultsintegerRequired
totalintegerRequired
countintegerRequired
get/user_account_compartments/{compartment_id}/datamart_selections
GET /v1/user_account_compartments/{compartment_id}/datamart_selections HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "first_result": 1,
  "data": [
    {
      "type": "CUSTOM_COMPARTMENT_ID",
      "image_uri": "text",
      "datamart_id": "text",
      "token": "text",
      "id": "text",
      "compartment_id": "text",
      "default": false,
      "name": "text"
    }
  ],
  "status": "ok",
  "max_results": 1,
  "total": 1,
  "count": 1
}

Update the set of datamarts on which this compartment is enabled

put
/user_account_compartments/{compartment_id}/datamart_selections
Path parameters
compartment_idstringRequired
Query parameters
organisation_idstringRequired

Organisation id of the selected datamarts

Body
Responses
200

Success response

application/json
statusstring · enumRequiredPossible values:
put/user_account_compartments/{compartment_id}/datamart_selections
PUT /v1/user_account_compartments/{compartment_id}/datamart_selections?organisation_id=text HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "datamart_selections": [
    {
      "datamart_id": "text"
    }
  ]
}
{
  "status": "ok"
}

Search compartments

get
/datamarts/{datamart_id}/compartments
Path parameters
datamart_idinteger · int64Required
Query parameters
tokenstringOptional

user account compartment token

defaultbooleanOptional

is a default user account compartment or not

with_source_datamartsbooleanOptional

select or not source datamarts selections

Responses
200

Success !

application/json
first_resultintegerRequired
totalintegerRequired
max_resultsintegerRequired
countintegerRequired
statusstring · enumRequiredPossible values:
get/datamarts/{datamart_id}/compartments
GET /v1/datamarts/{datamart_id}/compartments HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "data": [
    {
      "type": "CUSTOM_COMPARTMENT_ID",
      "image_uri": "text",
      "datamart_id": "text",
      "token": "text",
      "id": "text",
      "compartment_id": "text",
      "default": false,
      "name": "text"
    }
  ],
  "first_result": 1,
  "total": 1,
  "max_results": 1,
  "count": 1,
  "status": "ok"
}

Create compartment on a datamart

post
/datamarts/{datamart_id}/compartments
Path parameters
datamart_idinteger · int64Required
Body
typestring · enumRequiredPossible values:
image_uristringOptional
datamart_idstringRequired
tokenstringRead-onlyRequired
idstringRead-onlyRequired
compartment_idstringRequired
defaultbooleanRequiredDefault: false
namestringRead-onlyRequired
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
post/datamarts/{datamart_id}/compartments
POST /v1/datamarts/{datamart_id}/compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "type": "CUSTOM_COMPARTMENT_ID",
  "image_uri": "text",
  "datamart_id": "text",
  "compartment_id": "text",
  "default": false
}
{
  "status": "ok",
  "data": {
    "type": "CUSTOM_COMPARTMENT_ID",
    "image_uri": "text",
    "datamart_id": "text",
    "token": "text",
    "id": "text",
    "compartment_id": "text",
    "default": false,
    "name": "text"
  }
}
Deprecated

Get the user account compartment by token or id for a datamart

get
/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
get/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
GET /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}
Deprecated

Update the user account compartment for a given token or id for a datamart

put
/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Body
idstringRead-onlyRequired
defaultbooleanRequiredDefault: false
organisation_idstringRequired
tokenstringOptional
typestring · enumRequiredPossible values:
namestringOptional
archivedbooleanRequiredDefault: false
image_uristringOptional
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
put/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
PUT /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "default": false,
  "organisation_id": "text",
  "token": "text",
  "type": "CUSTOM_COMPARTMENT_ID",
  "name": "text",
  "archived": false,
  "image_uri": "text"
}
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}
Deprecated

Delete the user account compartment for a given token or id for a datamart

delete
/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Responses
200

Success response

application/json
statusstring · enumRequiredPossible values:
delete/datamarts/{datamart_id}/user_account_compartments/{token_or_id}
DELETE /v1/datamarts/{datamart_id}/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok"
}

Get the user account compartment by token or id

get
/user_account_compartments/{token_or_id}
Path parameters
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Query parameters
user_authorizedbooleanOptional
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
get/user_account_compartments/{token_or_id}
GET /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}

Update the user account compartment for a given token or id

put
/user_account_compartments/{token_or_id}
Path parameters
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Body
idstringRead-onlyRequired
defaultbooleanRequiredDefault: false
organisation_idstringRequired
tokenstringOptional
typestring · enumRequiredPossible values:
namestringOptional
archivedbooleanRequiredDefault: false
image_uristringOptional
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
put/user_account_compartments/{token_or_id}
PUT /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "default": false,
  "organisation_id": "text",
  "token": "text",
  "type": "CUSTOM_COMPARTMENT_ID",
  "name": "text",
  "archived": false,
  "image_uri": "text"
}
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}

Delete the user account compartment for a given token or id

delete
/user_account_compartments/{token_or_id}
Path parameters
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Responses
200

Success response

application/json
statusstring · enumRequiredPossible values:
delete/user_account_compartments/{token_or_id}
DELETE /v1/user_account_compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok"
}
Deprecated

Search user account compartments for a datamart

get
/datamarts/{datamart_id}/user_account_compartments
Path parameters
datamart_idinteger · int64Required
Query parameters
with_source_datamartsbooleanOptional

select or not source datamarts selections

Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
totalintegerRequired
first_resultintegerRequired
max_resultsintegerRequired
countintegerRequired
get/datamarts/{datamart_id}/user_account_compartments
GET /v1/datamarts/{datamart_id}/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok",
  "total": 1,
  "data": [
    {
      "id": "text",
      "default": false,
      "organisation_id": "text",
      "token": "text",
      "type": "CUSTOM_COMPARTMENT_ID",
      "name": "text",
      "archived": false,
      "image_uri": "text"
    }
  ],
  "first_result": 1,
  "max_results": 1,
  "count": 1
}
Deprecated

Create user account compartment

post
/datamarts/{datamart_id}/user_account_compartments
Path parameters
datamart_idinteger · int64Required
Body
idstringRead-onlyRequired
defaultbooleanRequiredDefault: false
organisation_idstringRequired
tokenstringOptional
typestring · enumRequiredPossible values:
namestringOptional
archivedbooleanRequiredDefault: false
image_uristringOptional
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
post/datamarts/{datamart_id}/user_account_compartments
POST /v1/datamarts/{datamart_id}/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "default": false,
  "organisation_id": "text",
  "token": "text",
  "type": "CUSTOM_COMPARTMENT_ID",
  "name": "text",
  "archived": false,
  "image_uri": "text"
}
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}

Get user account compartment by id

get
/datamarts/{datamart_id}/compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
get/datamarts/{datamart_id}/compartments/{token_or_id}
GET /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok",
  "data": {
    "type": "CUSTOM_COMPARTMENT_ID",
    "image_uri": "text",
    "datamart_id": "text",
    "token": "text",
    "id": "text",
    "compartment_id": "text",
    "default": false,
    "name": "text"
  }
}

Update user account compartment

put
/datamarts/{datamart_id}/compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Body
typestring · enumRequiredPossible values:
image_uristringOptional
datamart_idstringRequired
tokenstringRead-onlyRequired
idstringRead-onlyRequired
compartment_idstringRequired
defaultbooleanRequiredDefault: false
namestringRead-onlyRequired
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
put/datamarts/{datamart_id}/compartments/{token_or_id}
PUT /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 112

{
  "type": "CUSTOM_COMPARTMENT_ID",
  "image_uri": "text",
  "datamart_id": "text",
  "compartment_id": "text",
  "default": false
}
{
  "status": "ok",
  "data": {
    "type": "CUSTOM_COMPARTMENT_ID",
    "image_uri": "text",
    "datamart_id": "text",
    "token": "text",
    "id": "text",
    "compartment_id": "text",
    "default": false,
    "name": "text"
  }
}

Delete user account compartment

delete
/datamarts/{datamart_id}/compartments/{token_or_id}
Path parameters
datamart_idinteger · int64Required
token_or_idstringRequired

Identifier in one of the two following format : - an id, often a number - token=xxx

Responses
200

Success response

application/json
statusstring · enumRequiredPossible values:
delete/datamarts/{datamart_id}/compartments/{token_or_id}
DELETE /v1/datamarts/{datamart_id}/compartments/{token_or_id} HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "status": "ok"
}

Search the user account compartments associated with a given organization id and extra optional filters

get
/user_account_compartments
Query parameters
organisation_idinteger · int64Required
datamart_idinteger · int64Optional
keywordsstringOptional
tokenstringOptional
include_archivedbooleanOptional
order_bystring[]Optional

Fields used to order the result

with_source_datamartsbooleanOptional

select or not source datamarts selections

first_resultinteger · int32Optional
max_resultsinteger · int32Optional
Responses
200

Success !

application/json
first_resultintegerRequired
countintegerRequired
statusstring · enumRequiredPossible values:
totalintegerRequired
max_resultsintegerRequired
get/user_account_compartments
GET /v1/user_account_compartments?organisation_id=1 HTTP/1.1
Host: api.mediarithmics.local
Accept: */*
{
  "first_result": 1,
  "count": 1,
  "data": [
    {
      "id": "text",
      "default": false,
      "organisation_id": "text",
      "token": "text",
      "type": "CUSTOM_COMPARTMENT_ID",
      "name": "text",
      "archived": false,
      "image_uri": "text"
    }
  ],
  "status": "ok",
  "total": 1,
  "max_results": 1
}

Create the user account compartments associated with a given organization id

post
/user_account_compartments
Query parameters
organisation_idstringOptional
Body
idstringRead-onlyRequired
defaultbooleanRequiredDefault: false
organisation_idstringRequired
tokenstringOptional
typestring · enumRequiredPossible values:
namestringOptional
archivedbooleanRequiredDefault: false
image_uristringOptional
Responses
200

Success !

application/json
statusstring · enumRequiredPossible values:
post/user_account_compartments
POST /v1/user_account_compartments HTTP/1.1
Host: api.mediarithmics.local
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "default": false,
  "organisation_id": "text",
  "token": "text",
  "type": "CUSTOM_COMPARTMENT_ID",
  "name": "text",
  "archived": false,
  "image_uri": "text"
}
{
  "status": "ok",
  "data": {
    "id": "text",
    "default": false,
    "organisation_id": "text",
    "token": "text",
    "type": "CUSTOM_COMPARTMENT_ID",
    "name": "text",
    "archived": false,
    "image_uri": "text"
  }
}

Last updated

Was this helpful?