Back to top

Congrego

Profiles management

Segments

Create segment

Create segment
POST/plugins/congrego/segments

Example URI

POST http://api.nearit.com/plugins/congrego/segments
Request  body
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer 9o7amjxl9gzixjjey9to5srdgkhz6qs7ovnkhs3eqxuxjee35t25n6iinuclsnsb
X-Near-App-Id: c6432393-9110-4b17-b3d0-95c80f14af33
Body
{
  "app_id": "fdd86511-10cb-4835-ba58-ff3738cfde7d",
  "data": {
    "type": "segment",
    "attributes": {
      "name": "soluta",
      "app_id": "fdd86511-10cb-4835-ba58-ff3738cfde7d",
      "conditions": [
        {
          "key": "name",
          "predicate": "eq",
          "value": "Marco"
        },
        {
          "key": "points",
          "predicate": "gteq",
          "value": "10"
        },
        {
          "plugin": "geopolis",
          "parameters": {
            "event": "been_in_place",
            "identifier": "c7752f56-cd09-4840-abcf-c6371b5037cc",
            "start_date": "2017-12-11T00:00:00.000Z",
            "end_date": "2017-12-11T23:59:59.999Z"
          }
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "app_id": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "app_id": {
              "type": "string"
            },
            "conditions": {
              "type": "array"
            }
          }
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "34c7ad23-722e-4362-bdf5-3e346af7f9fa",
    "type": "segments",
    "attributes": {
      "app_id": "bbbf7f28-8961-4663-b085-b351efcb4f21",
      "name": "soluta",
      "conditions": [
        {
          "key": "points",
          "value": "10",
          "predicate": "gteq"
        },
        {
          "key": "name",
          "value": "Marco",
          "predicate": "eq"
        },
        {
          "plugin": "geopolis",
          "parameters": {
            "event": "been_in_place",
            "identifier": "c7752f56-cd09-4840-abcf-c6371b5037cc",
            "start_date": "2017-12-11T00:00:00.000Z",
            "end_date": "2017-12-11T23:59:59.999Z"
          }
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "conditions": {
              "type": "array"
            }
          }
        }
      }
    }
  }
}

Update segment

Update segment
PUT/plugins/congrego/segments/f531557a-54db-49c3-a291-7daff8cb209c

Example URI

PUT http://api.nearit.com/plugins/congrego/segments/f531557a-54db-49c3-a291-7daff8cb209c
Request  body
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer cb3y89gulwzirtbjdxk9ojkt5y8jsn504sycmuxfewwq4uq1ar3c3f2mupj4stqm
X-Near-App-Id: 8366cc6c-7944-4bfa-9ad4-bfc913ec49a6
Body
{
  "data": {
    "id": "f531557a-54db-49c3-a291-7daff8cb209c",
    "type": "segment",
    "attributes": {
      "name": "placeat",
      "app_id": "fdd86511-10cb-4835-ba58-ff3738cfde7d",
      "conditions": [
        {
          "key": "name",
          "predicate": "eq",
          "value": "Marco"
        },
        {
          "key": "points",
          "predicate": "gteq",
          "value": "10"
        },
        {
          "plugin": "geopolis",
          "parameters": {
            "event": "been_in_place",
            "identifier": "6f73ca42-e7d1-4879-9ec5-fe09c6b68055",
            "start_date": "2017-12-11T00:00:00.000Z",
            "end_date": "2017-12-11T23:59:59.999Z"
          }
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "app_id": {
              "type": "string"
            },
            "conditions": {
              "type": "array"
            }
          }
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "d1ba25e1-e31a-40a8-b886-98f293c7f00e",
    "type": "segments",
    "attributes": {
      "app_id": "327d9f0b-c6b4-446d-a55e-3b6afaa700d1",
      "name": "placeat",
      "conditions": [
        {
          "key": "name",
          "value": "Marco",
          "predicate": "eq"
        },
        {
          "key": "points",
          "value": "10",
          "predicate": "gteq"
        },
        {
          "plugin": "geopolis",
          "parameters": {
            "event": "been_in_place",
            "identifier": "6f73ca42-e7d1-4879-9ec5-fe09c6b68055",
            "start_date": "2017-12-11T00:00:00.000Z",
            "end_date": "2017-12-11T23:59:59.999Z"
          }
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "conditions": {
              "type": "array"
            }
          }
        }
      }
    }
  }
}

List segments

List segments
GET/plugins/congrego/segments

Example URI

GET http://api.nearit.com/plugins/congrego/segments
URI Parameters
HideShow
filter[app_id]
string (optional) Example: fdd86511-10cb-4835-ba58-ff3738cfde7d
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer j94vnz9al5wxf8rd9s8otdq9r3lrmiq7d4s3igelwf3w43fjswnt6xw94q4slmom
X-Near-App-Id: 702d5856-81a9-4d30-a46e-a8c1d639463b
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": "414111ce-d147-411a-8e84-19bde5c580f1",
      "type": "segments",
      "attributes": {
        "app_id": "282cff73-291a-4c30-b17c-66db27c30a03",
        "name": null,
        "conditions": []
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}

Get segment

Get segment
GET/plugins/congrego/segments/f531557a-54db-49c3-a291-7daff8cb209c

Example URI

GET http://api.nearit.com/plugins/congrego/segments/f531557a-54db-49c3-a291-7daff8cb209c
URI Parameters
HideShow
id
string (required) Example: f531557a-54db-49c3-a291-7daff8cb209c
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer dtz3b2nypb1ytrvc1zl30gjfssr7r6p44ehx9ad9ijpwr06390wo2r44nec1je67
X-Near-App-Id: 2de21db1-b628-48e8-a6e0-94b142215eaa
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "5e872851-d24a-46cf-9108-33ca965dc5e8",
    "type": "segments",
    "attributes": {
      "app_id": "eb4f4e4e-0755-4f84-8834-c45f0f1983d5",
      "name": "placeat",
      "conditions": [
        {
          "key": "points",
          "value": "10",
          "predicate": "gteq"
        },
        {
          "key": "name",
          "value": "Marco",
          "predicate": "eq"
        },
        {
          "plugin": "geopolis",
          "parameters": {
            "event": "been_in_place",
            "identifier": "6f73ca42-e7d1-4879-9ec5-fe09c6b68055",
            "start_date": "2017-12-11T00:00:00.000Z",
            "end_date": "2017-12-11T23:59:59.999Z"
          }
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "conditions": {
              "type": "array"
            }
          }
        }
      }
    }
  }
}

Profiles

Create profile

Create profile
POST/profiles

Example URI

POST http://api.nearit.com/profiles
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer w7thvfk8zy0qtyhtwm73ameszyk8fkllt80brszp25nzw67hmmb6heh6xhrp6b7a
X-Near-App-Id: 0eb9699f-ba51-4476-8f82-3691965f44a8
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "f4ddac89-f03b-4b63-b5a0-752d707820e2",
    "type": "profiles",
    "attributes": {
      "app_id": "59d8b2b9-de0c-41af-980d-0a81e8b0c26d"
    },
    "relationships": {
      "data_points": {
        "data": []
      },
      "installations": {
        "data": []
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "data_points": {
              "type": "object",
              "properties": {
                "data": {}
              }
            },
            "installations": {
              "type": "object",
              "properties": {
                "data": {}
              }
            }
          }
        }
      }
    }
  }
}

List profiles

List profiles
GET/profiles{?include}

Example URI

GET http://api.nearit.com/profiles?include=data_points
URI Parameters
HideShow
include
string (optional) Example: data_points
page[size]
number (optional) Example: 5
page[number]
number (optional) Example: 1
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer ms9v6n4b3zkmzwthw7bejivp1yd99xxw2gzs8jw43s9u6pprg7563bpcuy0p42bo
X-Near-App-Id: 3f62f172-4c0b-4a1b-94e3-9df2e7aeb60d
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": "6a094033-775e-4869-8243-9808e30bc205",
      "type": "profiles",
      "attributes": {
        "app_id": "cba1f2d6-70d3-42f4-82a9-51da86931c13"
      },
      "relationships": {
        "data_points": {
          "data": []
        },
        "installations": {
          "data": []
        }
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}

Show profile

Show profile
GET/profiles/9f5d07a8-fc66-4136-a9a2-3b240da1d180

Example URI

GET http://api.nearit.com/profiles/9f5d07a8-fc66-4136-a9a2-3b240da1d180
URI Parameters
HideShow
id
string (required) Example: 9f5d07a8-fc66-4136-a9a2-3b240da1d180
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer w43awirvj8wecg78xjop8tf1wjct59pdqlef1hoj3mowlfpouient6w128f58u7n
X-Near-App-Id: 5ff838c4-1aad-4050-9251-d645c75e9146
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "7bae6ae1-7101-44e7-92b6-f478a324c77b",
    "type": "profiles",
    "attributes": {
      "app_id": "fc410cff-2700-4eba-9e17-21de852c9f3b"
    },
    "relationships": {
      "data_points": {
        "data": []
      },
      "installations": {
        "data": []
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "data_points": {
              "type": "object",
              "properties": {
                "data": {}
              }
            },
            "installations": {
              "type": "object",
              "properties": {
                "data": {}
              }
            }
          }
        }
      }
    }
  }
}

Stats

Stats
GET/profiles

Example URI

GET http://api.nearit.com/profiles
URI Parameters
HideShow
filter[app_id]
string (optional) Example: fdd86511-10cb-4835-ba58-ff3738cfde7d
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer ra55hytsvqrysljbai1o4v9j3y4cgesc2fhlbtfyjhw24mxc4fbkoradoq4uib3o
X-Near-App-Id: 836770e7-a3e9-43bd-9949-5adbd686d80e
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": "8eaaff3b-fd73-47ca-ae04-ec9562437228",
      "type": "profiles",
      "attributes": {
        "app_id": "896a439a-b81e-4372-857b-4678d348e873"
      },
      "relationships": {
        "data_points": {
          "data": []
        },
        "installations": {
          "data": []
        }
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer xncrrg5j135fggqd9g1qoqj4xuo2mkprbthfkc6ht2sc8abryqto8vrx7coqih85
X-Near-App-Id: 53451bd0-123c-41cf-b5d3-0f855fa8793b
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": [
    {
      "id": "225fed83-0ae5-4fa9-b9df-737031110e12",
      "type": "profiles",
      "attributes": {
        "app_id": "16461b21-f7a4-42d6-b769-46e172d5c8e0"
      },
      "relationships": {
        "data_points": {
          "data": []
        },
        "installations": {
          "data": []
        }
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}

Optout

Optout
DELETE/profiles/9a18222f-6f20-4124-ba97-0c911def5e6d/optout

Example URI

DELETE http://api.nearit.com/profiles/9a18222f-6f20-4124-ba97-0c911def5e6d/optout
URI Parameters
HideShow
id
string (required) Example: 9a18222f-6f20-4124-ba97-0c911def5e6d
Response  202
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "5a3546f1-7a5d-4f24-8f91-087f485d237c",
    "type": "profiles",
    "attributes": {
      "app_id": "3b230964-111a-4f62-906e-d68492174211"
    },
    "relationships": {
      "data_points": {
        "data": []
      },
      "installations": {
        "data": []
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "data_points": {
              "type": "object",
              "properties": {
                "data": {}
              }
            },
            "installations": {
              "type": "object",
              "properties": {
                "data": {}
              }
            }
          }
        }
      }
    }
  }
}

Configurations

Get

Get
GET/plugins/congrego/configurations/fdd86511-10cb-4835-ba58-ff3738cfde7d

Example URI

GET http://api.nearit.com/plugins/congrego/configurations/fdd86511-10cb-4835-ba58-ff3738cfde7d
URI Parameters
HideShow
app_id
string (required) Example: fdd86511-10cb-4835-ba58-ff3738cfde7d
Request
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer vu8wok2bjoksabk8vqfmmvd78vuhi6vx6q22z3lzyzpdxy88mqgkn12azv5l3jn2
X-Near-App-Id: 73643fec-4211-47c6-9947-43d3ed7a12f2
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "8aeac898-7ea5-45ca-bc31-9a8ff14a4e75",
    "type": "configurations",
    "attributes": {
      "mappings": {
        "name": {
          "kind": "text",
          "label": "Name"
        },
        "colors": {
          "kind": "text",
          "label": "colors"
        },
        "points": {
          "kind": "numeric",
          "label": "Points"
        },
        "surname": {
          "kind": "text",
          "label": "Surname"
        },
        "birthday": {
          "kind": "date",
          "label": "Birthday"
        },
        "language": {
          "kind": "text",
          "label": "Language"
        },
        "new_field": {
          "kind": "numeric",
          "label": "New Field"
        },
        "list-field": {
          "kind": "list",
          "label": "List Field",
          "allowed": [
            {
              "key": "female",
              "label": "Female"
            },
            {
              "key": "male",
              "label": "Male"
            }
          ]
        },
        "subscribed": {
          "kind": "boolean",
          "label": "Is Subscribed?"
        },
        "max_purchase": {
          "kind": "numeric",
          "label": "Max Purchase"
        },
        "subscription": {
          "kind": "date",
          "label": "Subscription Date"
        },
        "preferred_team": {
          "kind": "text",
          "label": "Preferred Team"
        },
        "field-with-hypens": {
          "kind": "numeric",
          "label": "Test Hypen"
        }
      }
    },
    "meta": {
      "external_fields": [
        "ab"
      ],
      "total_profiles": 185
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "mappings": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "colors": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "points": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "surname": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "birthday": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "language": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "new_field": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "list-field": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "allowed": {
                      "type": "array"
                    }
                  }
                },
                "subscribed": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "max_purchase": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "subscription": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "preferred_team": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "field-with-hypens": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "meta": {
          "type": "object",
          "properties": {
            "external_fields": {
              "type": "array"
            },
            "total_profiles": {
              "type": "number"
            }
          }
        }
      }
    }
  }
}

Update

Update
PUT/plugins/congrego/configurations/fdd86511-10cb-4835-ba58-ff3738cfde7d

Example URI

PUT http://api.nearit.com/plugins/congrego/configurations/fdd86511-10cb-4835-ba58-ff3738cfde7d
Request  body
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer qbmo62ke79qkbgfljfoqn7urzhyo6ua3mjvy7572c1s6y5asjz386npbd315075j
X-Near-App-Id: 50f8a315-c00f-4423-aa79-7e1521631352
Body
{
  "data": {
    "id": "fdd86511-10cb-4835-ba58-ff3738cfde7d",
    "type": "configurations",
    "attributes": {
      "mappings": {
        "name": {
          "kind": "text",
          "label": "Name"
        },
        "colors": {
          "kind": "text",
          "label": "colors"
        },
        "points": {
          "kind": "numeric",
          "label": "Points"
        },
        "surname": {
          "kind": "text",
          "label": "Surname"
        },
        "birthday": {
          "kind": "date",
          "label": "Birthday"
        },
        "language": {
          "kind": "text",
          "label": "Language"
        },
        "subscribed": {
          "kind": "boolean",
          "label": "Is Subscribed?"
        },
        "max_purchase": {
          "kind": "numeric",
          "label": "Max Purchase"
        },
        "subscription": {
          "kind": "date",
          "label": "Subscription Date"
        },
        "preferred_team": {
          "kind": "text",
          "label": "Preferred Team"
        },
        "new_field": {
          "label": "New Field",
          "kind": "numeric"
        },
        "field-with-hypens": {
          "label": "Test Hypen",
          "kind": "numeric"
        },
        "list-field": {
          "label": "List Field",
          "kind": "list",
          "allowed": [
            {
              "key": "female",
              "label": "Female"
            },
            {
              "key": "male",
              "label": "Male"
            }
          ]
        }
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "mappings": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "colors": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "points": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "surname": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "birthday": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "language": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "subscribed": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "max_purchase": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "subscription": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "preferred_team": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    }
                  }
                },
                "new_field": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    }
                  }
                },
                "field-with-hypens": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    }
                  }
                },
                "list-field": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "allowed": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "4ff3b61a-eaf5-4a6b-97ac-0d2f88b1533f",
    "type": "profiles",
    "attributes": {
      "app_id": "3db7db0e-821d-497f-802e-c8656089fe5e"
    },
    "relationships": {
      "data_points": {
        "data": []
      },
      "installations": {
        "data": []
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "data_points": {
              "type": "object",
              "properties": {
                "data": {}
              }
            },
            "installations": {
              "type": "object",
              "properties": {
                "data": {}
              }
            }
          }
        }
      }
    }
  }
}

Data Points

Create data-point

Create data-point
POST/profiles/27c31ef1-555e-46a0-b160-1b01d9aca5aa/data_points

Example URI

POST http://api.nearit.com/profiles/27c31ef1-555e-46a0-b160-1b01d9aca5aa/data_points
Request  body
HideShow
Headers
Content-Type: application/json
Accept: application/vnd.api+json
X-Near-Version: 2
Authorization: Bearer xf31moxa6ehdolcipje43mamkqo8rahvggmsa7f5dtootu76x8eynvn3v8753ld1
X-Near-App-Id: 1edcef2a-61bd-4fa1-bcbd-4f9cc6556311
Body
{
  "data": [
    {
      "type": "data_points",
      "attributes": {
        "key": "atque",
        "value": "fugiat"
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "array"
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "ec9baf2d-3746-48be-bb2b-af8e3310af2a",
    "type": "profiles",
    "attributes": {
      "app_id": "0892c2be-8fb5-47b0-9ed3-5b43495196a4"
    },
    "relationships": {
      "data_points": {
        "data": []
      },
      "installations": {
        "data": []
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "app_id": {
              "type": "string"
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "data_points": {
              "type": "object",
              "properties": {
                "data": {}
              }
            },
            "installations": {
              "type": "object",
              "properties": {
                "data": {}
              }
            }
          }
        }
      }
    }
  }
}

Generated by aglio on 09 Jan 2018