Mappings

Manage destination and source mappings. List mappings for a destination or source, create mappings for allowed events, edit field mappings and condition logic.

GET
/rest/v1/mappings
AuthorizationBearer <token>

Ours Privacy API key

In: header

Query Parameters

limit?|

Maximum number of mappings to return. Defaults to 1000; values below 1 are clamped to 1 and values above 1000 are clamped to 1000. Most accounts can fetch the full list in one request.

cursor?string

Opaque pagination cursor from pagination.nextCursor in the previous response. Do not decode or modify it. Malformed cursors return 400 Bad Request.

entityId*string

Filter mappings by their parent entity id. Must be a destination id or source id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/mappings?entityId=00000000-0000-0000-0000-000000000000"
{
  "entities": [
    {
      "id": "string",
      "name": "string",
      "updatedAt": "string",
      "isEnabled": true,
      "templateName": "string",
      "templateId": "string",
      "destinationId": "string",
      "sourceId": "string",
      "isDefaultMapping": true,
      "priority": 0,
      "mappings": [
        {
          "property": "string",
          "map": "string",
          "modification": "CamelCase"
        }
      ]
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
POST
/rest/v1/mappings
*object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://app.oursprivacy.com/rest/v1/mappings" \  -H "Content-Type: application/json" \  -d '{    "allowedEventId": "string",    "destinationId": "string"  }'
{
  "id": "string",
  "name": "string",
  "updatedAt": "string",
  "isEnabled": true,
  "templateName": "string",
  "templateId": "string",
  "destinationId": "string",
  "sourceId": "string",
  "isDefaultMapping": true,
  "priority": 0,
  "mappings": [
    {
      "property": "string",
      "map": "string",
      "modification": "CamelCase"
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
GET
/rest/v1/mappings/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://app.oursprivacy.com/rest/v1/mappings/string"
{
  "id": "string",
  "name": "string",
  "updatedAt": "string",
  "isEnabled": true,
  "templateName": "string",
  "templateId": "string",
  "destinationId": "string",
  "sourceId": "string",
  "isDefaultMapping": true,
  "priority": 0,
  "mappings": [
    {
      "property": "string",
      "map": "string",
      "modification": "CamelCase"
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
PATCH
/rest/v1/mappings/{id}
*object
array<object>
object
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://app.oursprivacy.com/rest/v1/mappings/string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "string",
  "name": "string",
  "updatedAt": "string",
  "isEnabled": true,
  "templateName": "string",
  "templateId": "string",
  "destinationId": "string",
  "sourceId": "string",
  "isDefaultMapping": true,
  "priority": 0,
  "mappings": [
    {
      "property": "string",
      "map": "string",
      "modification": "CamelCase"
    }
  ]
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
DELETE
/rest/v1/mappings/{id}
AuthorizationBearer <token>

Ours Privacy API key

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://app.oursprivacy.com/rest/v1/mappings/string"
true
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}
{
  "error": "string",
  "details": "string"
}

How is this guide?