Peepl API docs version 1.0
Last updated: 2019-01-24
Authentication
Step 1: Enable the API module for your Peepl account
To access the API, your Peepl account must have the API module enabled. This depends on your pricing plan and license model. If you don't have access yet, please contact us at support@peepl.be to discuss your options.
Step 2: Obtain an API Token
Login to your Peepl account with administrator permissions. Go to Settings / API and generate a Token. Warning: the full Token will only be shown once. Keep this token somewhere safe!
Step 3: Add the API Token in the header of every call
Every call needs to be authenticated with your API Token. You will need to add an Authorization header to every method of API call (GET, PUT, POST, DELETE) as follows: Authorization: Token <YOUR_API_TOKEN>
Step 4: Make your first API call
Try out the basic example in a language of your choice. We provide basic examples for PHP and Python below.
Rate limiting
Our API allows up to 100 calls per minute. When you are rate limited, the API will return a 429 Too Many Requests
error message for every subsequent call. In this case, we recommend to wait and retry the last call.
Trailing slash
All calls need to end with a forward slash (/
). If you get a 'Not Found' error, this is probably the issue. The documentation sometimes doesn't list these slashes, but they are required.
Pagination
Some calls return a paginated list of results, to optimize performance. The result will look like this:
{
"count": 1000,
"next": "http://api.peepl.io/v1/admin/contacts/?limit=10&offset=10",
"previous": null,
"results": [
...
]
}
The next
attribute gives you the URL of the next page. The limit
query parameter is limited to 10, which is the default value. You can set a lower limit, but increasing it will have no effect.
Examples
PHP
<?php
$api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$headers = array(
'Content-Type: application/json',
'Authorization: Token '. $api_token
);
// Base API path -- change this if you're not on our SaaS infrastructure.
$api_endpoint = "https://api.peepl.io/v1/admin";
// News endpoint
$news_endpoint = $api_endpoint . "/news/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $news_endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
$http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if($http_status != 200) {
echo "Invalid request -- did you use the right endpoint and Auth Token?";
} else {
$return_val = json_decode($result);
print_r($return_val);
}
Python
import requests
API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
API_BASE_URL = 'https://api.peepl.io/v1/admin';
headers = {'Authorization': 'Token %s' % API_KEY}
url_news = API_BASE_URL + "/news/";
result = requests.get(url, headers=headers)
print(result.json())
Contacts
Contacts represent real persons in your CRM database.
Paginated list of all Contacts.
Add a new Contact.
get /contacts
Paginated list of all Contacts.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
post /contacts
Add a new Contact.
Body
Media type: application/json
Type:
{
"uname": {
"required": false,
"type": "string",
"extra": "Username. Will be automatically generated as `FirstnameLastname` when not provided."
},
"first_name": {
"required": true,
"type": "string"
},
"last_name": {
"required": true,
"type": "string"
},
"birth_date": {
"required": true,
"type": "string"
},
"birth_place": {
"required": true,
"type": "string"
},
"preferred_language": {
"required": true,
"type": "string"
},
"gender": {
"required": true,
"type": "string"
},
"email": {
"required": true,
"type": "string"
"extra": "Primary email – must be unique"
},
}
Contact details.
Update a Contact's basic information.
get /contacts/{contact_id}
Contact details.
URI Parameters
- contact_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
}
put /contacts/{contact_id}
Update a Contact's basic information.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"uname": {
"required": false,
"type": "string",
"extra": "Username. Will be automatically generated as `FirstnameLastname` when not provided."
},
"first_name": {
"required": true,
"type": "string"
},
"last_name": {
"required": true,
"type": "string"
},
"birth_date": {
"required": true,
"type": "string"
},
"birth_place": {
"required": true,
"type": "string"
},
"preferred_language": {
"required": true,
"type": "string"
},
"gender": {
"required": true,
"type": "string"
},
"email": {
"required": true,
"type": "string"
"extra": "Primary email – must be unique"
},
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
}
List of all Addresses. There is always at least 1 correspondence address.
Create a new Address. Requires a valid AddressType.
get /contacts/{contact_id}/addresses
List of all Addresses. There is always at least 1 correspondence address.
URI Parameters
- contact_id: required (integer)
HTTP status code 201
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3,
}
]
post /contacts/{contact_id}/addresses
Create a new Address. Requires a valid AddressType.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"street1": {
"required": true,
"type": "string",
},
"street2": {
"required": true,
"type": "string",
},
"city": {
"required": true,
"type": "string",
},
"postal_code": {
"required": true,
"type": "string",
},
"country": {
"required": true,
"type": "string",
},
"address_type": {
"required": true,
"type": "integer",
}
}
Update an Address.
Delete an Address. The default address cannot be deleted.
put /contacts/{contact_id}/addresses/{address_id}
Update an Address.
URI Parameters
- contact_id: required (integer)
- address_id: required (integer)
Body
Media type: application/json
Type:
{
"street1": {
"required": true,
"type": "string",
},
"street2": {
"required": true,
"type": "string",
},
"city": {
"required": true,
"type": "string",
},
"postal_code": {
"required": true,
"type": "string",
},
"country": {
"required": true,
"type": "string",
},
"address_type": {
"required": true,
"type": "integer",
}
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3,
}
delete /contacts/{contact_id}/addresses/{address_id}
Add a secondary EmailAddress to a Contact.
post /contacts/{contact_id}/emailaddresses
Add a secondary EmailAddress to a Contact.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"type": {
"required": true,
"type": "string",
"extra": "home / work / father / mother / other"
},
"value": {
"required": true,
"type": "string",
},
"cc": {
"required": false,
"type": "bool",
},
}
Update a secondary EmailAddress.
Delete an EmailAddress
put /contacts/{contact_id}/emailaddresses/{emailaddress_id}
Update a secondary EmailAddress.
URI Parameters
- contact_id: required (integer)
- emailaddress_id: required (integer)
Body
Media type: application/json
Type:
{
"type": {
"required": true,
"type": "string",
"extra": "home / work / father / mother / other"
},
"value": {
"required": true,
"type": "string",
},
"cc": {
"required": false,
"type": "bool",
},
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
Can not resolve examples/requests/EmailAddress/get.json
Add an Education to a Contact.
post /contacts/{contact_id}/educations
Add an Education to a Contact.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"education_name": {
"required": true,
"type": "string"
},
"begin_date": {
"required": false,
"type": "string"
},
"end_date": {
"required": false,
"type": "string"
},
"school_name": {
"required": false,
"type": "string"
},
"completed": {
"required": false,
"type": "string"
},
"address_street1": {
"required": false,
"type": "string",
},
"address_street2": {
"required": false,
"type": "string",
},
"address_city": {
"required": false,
"type": "string",
},
"address_postal_code": {
"required": false,
"type": "string",
},
"address_country": {
"required": false,
"type": "string",
"extra": "ISO country code"
},
}
Example:
{
"education_name": "Physics",
"begin_date": "2010-02-02",
"school_name": "Stanford University",
"completed": true,
"address_country": "US",
}
Update an Education.
Delete an Education.
put /contacts/{contact_id}/educations/{education_id}
Update an Education.
URI Parameters
- contact_id: required (integer)
- education_id: required (integer)
Body
Media type: application/json
Type:
{
"education_name": {
"required": true,
"type": "string"
},
"begin_date": {
"required": false,
"type": "string"
},
"end_date": {
"required": false,
"type": "string"
},
"school_name": {
"required": false,
"type": "string"
},
"completed": {
"required": false,
"type": "string"
},
"address_street1": {
"required": false,
"type": "string",
},
"address_street2": {
"required": false,
"type": "string",
},
"address_city": {
"required": false,
"type": "string",
},
"address_postal_code": {
"required": false,
"type": "string",
},
"address_country": {
"required": false,
"type": "string",
"extra": "ISO country code"
},
}
Add a CompanyPosition to a Contact.
post /contacts/{contact_id}/companypositions
Add a CompanyPosition to a Contact.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"education_name": {
"required": true,
"type": "string"
},
"begin_date": {
"required": false,
"type": "string"
},
"end_date": {
"required": false,
"type": "string"
},
"school_name": {
"required": false,
"type": "string"
},
"completed": {
"required": false,
"type": "string"
},
"address_street1": {
"required": false,
"type": "string",
},
"address_street2": {
"required": false,
"type": "string",
},
"address_city": {
"required": false,
"type": "string",
},
"address_postal_code": {
"required": false,
"type": "string",
},
"address_country": {
"required": false,
"type": "string",
"extra": "ISO country code"
},
}
Example:
{
"education_name": "Physics",
"begin_date": "2010-02-02",
"school_name": "Stanford University",
"completed": true,
"address_country": "US",
}
Update a CompanyPosition.
Delete an Education
put /contacts/{contact_id}/companypositions/{companyposition_id}
Update a CompanyPosition.
URI Parameters
- contact_id: required (integer)
- companyposition_id: required (integer)
Body
Media type: application/json
Type:
{
"education_name": {
"required": true,
"type": "string"
},
"begin_date": {
"required": false,
"type": "string"
},
"end_date": {
"required": false,
"type": "string"
},
"school_name": {
"required": false,
"type": "string"
},
"completed": {
"required": false,
"type": "string"
},
"address_street1": {
"required": false,
"type": "string",
},
"address_street2": {
"required": false,
"type": "string",
},
"address_city": {
"required": false,
"type": "string",
},
"address_postal_code": {
"required": false,
"type": "string",
},
"address_country": {
"required": false,
"type": "string",
"extra": "ISO country code"
},
}
Create a new CustomField value for this contact. Note: you can't add two values for one CustomField for the same contact. Use the appropriate *_value, based on CustomField.field_type.
post /contacts/{contact_id}/customfieldvalues
Create a new CustomField value for this contact. Note: you can't add two values for one CustomField for the same contact. Use the appropriate *_value, based on CustomField.field_type.
URI Parameters
- contact_id: required (integer)
Body
Media type: application/json
Type:
{
"custom_field": {
"required": true,
"type": "integer"
},
"date_value": {
"required": true,
"type": "date"
"extra": "Depending on CustomField.field_type"
},
"datetime_value": {
"required": false,
"type": "datetime"
"extra": "Depending on CustomField.field_type"
},
"string_value": {
"required": false,
"type": "string"
"extra": "Depending on CustomField.field_type"
},
"int_value": {
"required": false,
"type": "integer"
"extra": "Depending on CustomField.field_type"
},
"bool_value": {
"required": false,
"type": "bool"
"extra": "Depending on CustomField.field_type"
}
}
Example:
{
"custom_field": 1,
"string_value": "Pizza"
}
Update a CustomFieldValue
put /contacts/{contact_id}/customfieldvalues/{customfieldvalue_id}
Update a CustomFieldValue
URI Parameters
- contact_id: required (integer)
- customfieldvalue_id: required (integer)
Body
Media type: application/json
Type:
{
"date_value": {
"required": true,
"type": "date",
"extra": "Depending on CustomField.field_type"
},
"datetime_value": {
"required": true,
"type": "datetime",
"extra": "Depending on CustomField.field_type"
},
"string_value": {
"required": true,
"type": "string",
"extra": "Depending on CustomField.field_type"
},
"int_value": {
"required": true,
"type": "integer",
"extra": "Depending on CustomField.field_type"
},
"bool_value": {
"required": true,
"type": "boolean",
"extra": "Depending on CustomField.field_type"
}
}
Example:
{
"string_value": "Pie"
}
List of Contact's positions
get /contacts/{contact_id}/positions
List of Contact's positions
URI Parameters
- contact_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 614,
"start_date": "2016-04-30",
"end_date": "2016-07-28",
"user_id": 921,
"combination_id": 587
},
{
"id": 589,
"start_date": "2016-05-02",
"end_date": null,
"user_id": 921,
"combination_id": 274
}
]
Search Contacts based on one or multiple parameters. Returns a paginated list of Contacts. Note: at least one parameter is required.
post /contacts/search
Body
Media type: application/json
Type:
{
"operator": {
"required": true,
"type": "string",
"extra": "AND or OR"
},
"first_name": {
"required": false,
"type": "string",
"extra": "One of these search parameters is required."
},
"last_name": {
"required": false,
"type": "string",
"extra": "One of these search parameters is required."
},
"city": {
"required": false,
"type": "string",
"extra": "One of these search parameters is required."
},
"email": {
"required": false,
"type": "string",
"extra": "One of these search parameters is required."
},
"last_modified": {
"required": false,
"type": "yyyy-mm-dd",
"extra": "One of these search parameters is required. This will return all Contacts that have been modified after the specified date."
},
}
Example:
{
"operator": "AND",
"first_name": "John",
"last_name": "Doe"
}
HTTP status code 201
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
CustomFieldCategory objects are used to group CustomField objects.
List of all CustomFieldCategory objects of Contacts.
CustomFields are used for account-specific data fields.
List of all CustomField objects of Contacts.
get /contacts/custom_fields
List of all CustomField objects of Contacts.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1,
"name": "Custom Text Field",
"display_order": 0,
"field_type": "text",
"options": [],
"category_id": 1,
},
{
"id": 2,
"name": "Custom Dropdown Field",
"display_order": 1,
"field_type": "choices_single",
"options": ["option1", "option2"],
"category_id": 1,
}
]
Segments are a subset of Contacts based on one or multiple rules.
Paginated list all Contacts in this Segment.
get /contacts/segments/{segment_id}
Paginated list all Contacts in this Segment.
URI Parameters
- segment_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Organisations
Organisations represent companies in your CRM database.
Paginated list of all Organisations.
get /organisations
Paginated list of all Organisations.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "Peepl",
"profile_pic": null,
"preferred_language": "nl",
"type": "private",
"email": "support@peepl.be",
"emails_secondary": [],
"vat_number": "BE0578.962.613",
"website": "https://www.peepl.io",
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3
}
],
"custom_fields": [],
"last_modified": "2017-12-05T10:08:44.234091Z",
"created_on": "2017-11-13T09:56:38.266160Z"
}
]
}
Organisation details.
get /organisations/{organisation_id}
Organisation details.
URI Parameters
- organisation_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"name": "Peepl",
"profile_pic": null,
"preferred_language": "nl",
"type": "private",
"email": "support@peepl.be",
"emails_secondary": [],
"vat_number": "BE0578.962.613",
"website": "https://www.peepl.io",
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3
}
],
"custom_fields": [],
"last_modified": "2017-12-05T10:08:44.234091Z",
"created_on": "2017-11-13T09:56:38.266160Z"
}
List of all Addresses. There is always at least 1 correspondence address.
Create a new Address. Requires a valid AddressType.
get /organisations/{organisation_id}/addresses
List of all Addresses. There is always at least 1 correspondence address.
URI Parameters
- organisation_id: required (integer)
HTTP status code 201
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3,
}
]
post /organisations/{organisation_id}/addresses
Create a new Address. Requires a valid AddressType.
URI Parameters
- organisation_id: required (integer)
Body
Media type: application/json
Type:
{
"street1": {
"required": true,
"type": "string",
},
"street2": {
"required": true,
"type": "string",
},
"city": {
"required": true,
"type": "string",
},
"postal_code": {
"required": true,
"type": "string",
},
"country": {
"required": true,
"type": "string",
},
"address_type": {
"required": true,
"type": "integer",
}
}
Update an Address.
Delete an Address. The default address cannot be deleted.
put /organisations/{organisation_id}/addresses/{address_id}
Update an Address.
URI Parameters
- organisation_id: required (integer)
- address_id: required (integer)
Body
Media type: application/json
Type:
{
"street1": {
"required": true,
"type": "string",
},
"street2": {
"required": true,
"type": "string",
},
"city": {
"required": true,
"type": "string",
},
"postal_code": {
"required": true,
"type": "string",
},
"country": {
"required": true,
"type": "string",
},
"address_type": {
"required": true,
"type": "integer",
}
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3,
}
delete /organisations/{organisation_id}/addresses/{address_id}
Add a secondary EmailAddress to an Organisation.
post /organisations/{organisation_id}/emailaddresses
Add a secondary EmailAddress to an Organisation.
URI Parameters
- organisation_id: required (integer)
Body
Media type: application/json
Type:
{
"type": {
"required": true,
"type": "string",
"extra": "home / work / father / mother / other"
},
"value": {
"required": true,
"type": "string",
},
"cc": {
"required": false,
"type": "bool",
},
}
Update a secondary EmailAddress.
Delete an EmailAddress
put /organisations/{organisation_id}/emailaddresses/{emailaddress_id}
Update a secondary EmailAddress.
URI Parameters
- organisation_id: required (integer)
- emailaddress_id: required (integer)
Body
Media type: application/json
Type:
{
"type": {
"required": true,
"type": "string",
"extra": "home / work / father / mother / other"
},
"value": {
"required": true,
"type": "string",
},
"cc": {
"required": false,
"type": "bool",
},
}
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
Can not resolve examples/requests/EmailAddress/get.json
delete /organisations/{organisation_id}/emailaddresses/{emailaddress_id}
Create a new CustomField value for this Organisation. Note: you can't add two values for one CustomField for the same Organisation. Use the appropriate *_value, based on CustomField.field_type.
post /organisations/{organisation_id}/customfieldvalues
Create a new CustomField value for this Organisation. Note: you can't add two values for one CustomField for the same Organisation. Use the appropriate *_value, based on CustomField.field_type.
URI Parameters
- organisation_id: required (integer)
Body
Media type: application/json
Type:
{
"custom_field": {
"required": true,
"type": "integer"
},
"date_value": {
"required": true,
"type": "date"
"extra": "Depending on CustomField.field_type"
},
"datetime_value": {
"required": false,
"type": "datetime"
"extra": "Depending on CustomField.field_type"
},
"string_value": {
"required": false,
"type": "string"
"extra": "Depending on CustomField.field_type"
},
"int_value": {
"required": false,
"type": "integer"
"extra": "Depending on CustomField.field_type"
},
"bool_value": {
"required": false,
"type": "bool"
"extra": "Depending on CustomField.field_type"
}
}
Example:
{
"custom_field": 1,
"string_value": "Pizza"
}
Update a CustomFieldValue
put /organisations/{organisation_id}/customfieldvalues/{customfieldvalue_id}
Update a CustomFieldValue
URI Parameters
- organisation_id: required (integer)
- customfieldvalue_id: required (integer)
Body
Media type: application/json
Type:
{
"date_value": {
"required": true,
"type": "date",
"extra": "Depending on CustomField.field_type"
},
"datetime_value": {
"required": true,
"type": "datetime",
"extra": "Depending on CustomField.field_type"
},
"string_value": {
"required": true,
"type": "string",
"extra": "Depending on CustomField.field_type"
},
"int_value": {
"required": true,
"type": "integer",
"extra": "Depending on CustomField.field_type"
},
"bool_value": {
"required": true,
"type": "boolean",
"extra": "Depending on CustomField.field_type"
}
}
Example:
{
"string_value": "Pie"
}
List of Organisation's positions
get /organisations/{organisation_id}/positions
List of Organisation's positions
URI Parameters
- organisation_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 614,
"start_date": "2016-04-30",
"end_date": "2016-07-28",
"user_id": 921,
"combination_id": 587
},
{
"id": 589,
"start_date": "2016-05-02",
"end_date": null,
"user_id": 921,
"combination_id": 274
}
]
CustomFieldCategory objects are used to group CustomField objects.
List of all CustomFieldCategory objects of Organisations.
CustomFields are used for account-specific data fields.
List of all CustomField objects of Organisations.
get /organisations/custom_fields
List of all CustomField objects of Organisations.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1,
"name": "Custom Text Field",
"display_order": 0,
"field_type": "text",
"options": [],
"category_id": 1,
},
{
"id": 2,
"name": "Custom Dropdown Field",
"display_order": 1,
"field_type": "choices_single",
"options": ["option1", "option2"],
"category_id": 1,
}
]
Segments are a subset of Organisations based on one or multiple rules.
Paginated list all Organisations in this Segment.
get /organisations/segments/{segment_id}
Paginated list all Organisations in this Segment.
URI Parameters
- segment_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "Peepl",
"profile_pic": null,
"preferred_language": "nl",
"type": "private",
"email": "support@peepl.be",
"emails_secondary": [],
"vat_number": "BE0578.962.613",
"website": "https://www.peepl.io",
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 3
}
],
"custom_fields": [],
"last_modified": "2017-12-05T10:08:44.234091Z",
"created_on": "2017-11-13T09:56:38.266160Z"
}
]
}
AddressType
AddressTypes are used to add multiple addresses to a Contact or Organisation.
List of all AddressTypes.
Create a new AddressType.
Update an AddressType.
Delete an AddressType. The default AddressType or types currently used by Addresses cannot be deleted.
put /address_types/{address_type_id}/
Update an AddressType.
URI Parameters
- address_type_id: required (string)
Body
Media type: application/json
Type:
{
"description": {
"required": true,
"type": "string"
},
"max_amount": {
"required": true,
"type": "integer"
}
}
delete /address_types/{address_type_id}/
Groups
Groups are used to categorize Contacts and Organisations.
Recursive list of all Groups and their subgroups.
get /groups
Recursive list of all Groups and their subgroups.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 435,
"name": "Iedereen",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": true,
"parent_id": null,
"visible_on_leaderboards": true,
"children": [
{
"id": 436,
"name": "Bestuur",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": true,
"parent_id": 435,
"visible_on_leaderboards": true,
"children": [
{
"id": 437,
"name": "Kernbestuur",
"permission_level": "can_login",
"visible_in_list": false,
"visible_on_clubsite": false,
"parent_id": 436,
"visible_on_leaderboards": false,
"children": []
}
]
},
{
"id": 888,
"name": "Leden",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": false,
"parent_id": 435,
"visible_on_leaderboards": true,
"children": []
},
{
"id": 439,
"name": "Spelers",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": false,
"parent_id": 435,
"visible_on_leaderboards": true,
"children": [
{
"id": 440,
"name": "U18",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": false,
"parent_id": 439,
"visible_on_leaderboards": true,
"children": []
},
{
"id": 882,
"name": "U21",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": false,
"parent_id": 439,
"visible_on_leaderboards": true,
"children": []
},
{
"id": 860,
"name": "U21",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": true,
"parent_id": 439,
"visible_on_leaderboards": true,
"children": []
},
{
"id": 883,
"name": "U17",
"permission_level": "can_login",
"visible_in_list": true,
"visible_on_clubsite": false,
"parent_id": 439,
"visible_on_leaderboards": true,
"children": []
}
]
}
]
}
]
Paginated list of Contacts or Organisations that are currently in this group.
get /groups/{group_id}/{object_type}
Paginated list of Contacts or Organisations that are currently in this group.
URI Parameters
- group_id: required (integer)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Paginated list of Contacts or Organisations that are in this group on a specific date.
get /groups/{group_id}/{object_type}/{date}
Paginated list of Contacts or Organisations that are in this group on a specific date.
URI Parameters
- group_id: required (integer)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
- date: required (yyyymmdd)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Functions
Functions define roles that Contacts or Organisations have.
List of all Functions.
Paginated list of Contacts or Organisations that currently have this function.
get /functions/{function_id}/{object_type}
Paginated list of Contacts or Organisations that currently have this function.
URI Parameters
- function_id: required (integer)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Paginated list of Contacts or Organisations that have this function on a specific date.
get /functions/{function_id}/{object_type}/{date}
Paginated list of Contacts or Organisations that have this function on a specific date.
URI Parameters
- function_id: required (integer)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
- date: required (yyyymmdd)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Combinations
A Combination is the link between a Group and a Function and can be assigned to a Contact or Organisation.
List of all Combinations.
get /combinations
List of all Combinations.
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1206,
"short_description": "Sponsors / Sponsor",
"function": 884,
"group": 798
},
{
"id": 1175,
"short_description": "Bestuur / Voorzitter",
"function": 1,
"group": 773
},
{
"id": 1176,
"short_description": "Bestuur / Ondervoorzitter",
"function": 2,
"group": 773
},
]
List of all Combinations that are linked to a certain Group.
get /combinations/group/{group_id}
List of all Combinations that are linked to a certain Group.
URI Parameters
- group_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1206,
"short_description": "Sponsors / Sponsor",
"function": 884,
"group": 798
},
{
"id": 1175,
"short_description": "Bestuur / Voorzitter",
"function": 1,
"group": 773
},
{
"id": 1176,
"short_description": "Bestuur / Ondervoorzitter",
"function": 2,
"group": 773
},
]
List of all Combinations that are linked to a certain Function.
get /combinations/function/{function_id}
List of all Combinations that are linked to a certain Function.
URI Parameters
- function_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 1206,
"short_description": "Sponsors / Sponsor",
"function": 884,
"group": 798
},
{
"id": 1175,
"short_description": "Bestuur / Voorzitter",
"function": 1,
"group": 773
},
{
"id": 1176,
"short_description": "Bestuur / Ondervoorzitter",
"function": 2,
"group": 773
},
]
Paginated list of all Contacts or Organisations that currently have this Combination.
get /combinations/{combination_id}/{object_type}
Paginated list of all Contacts or Organisations that currently have this Combination.
URI Parameters
- combination_id: required (string)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
- function_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Paginated list of all Contacts or Organisations that have this Combination on a specific date.
get /combinations/{combination_id}/{object_type}/{date}
Paginated list of all Contacts or Organisations that have this Combination on a specific date.
URI Parameters
- combination_id: required (string)
- object_type: required (one of contacts, organisations)
Return Contacts or Organisations?
- function_id: required (integer)
- date: required (yyyymmdd)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"uname": "JohnDoe",
"first_name": "John",
"last_name": "Doe",
"birth_date": "2000-01-01",
"birth_place": "Rome",
"age": 34,
"profile_pic": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/5/profile_pic/da6ea065-03cf-4c33-9cb2-1069e84ffdb6.png",
"preferred_language": "en",
"permission_level": "can_login",
"gender": "M",
"email": "john@peepl.io",
"title": "Mr.",
"emails_secondary": [
{
"id": 1,
"type": "home",
"value": "john.doe@peepl.io",
"cc": true
}
],
"companies": [
{
"id": 1,
"name": "Mockup BVBA",
"sector": "IT",
"function": "Business Owner",
"begin_date": "2015-01-28",
"end_date": null,
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": null
}
],
"email": "info@mockup.be",
"phone": "050/39.26.72"
}
],
"educations": [
{
"id": 1,
"education_name": "Engineering",
"begin_date": "2010-01-01",
"end_date": "2015-06-30",
"school_name": "University",
"completed": true,
"address": [
{
"id": 1,
"street1": "Jozef Plateaustraat 30",
"street2": "",
"city": "Gent",
"postal_code": "9000",
"country": "BE",
"address_type": null
}
]
}
],
"relatives": [],
"address": [
{
"id": 1,
"street1": "Torhoutsesteenweg 174",
"street2": "",
"city": "Zedelgem",
"postal_code": "8210",
"country": "BE",
"address_type": 4
}
],
"custom_fields": [],
"last_modified": "2018-09-13T12:47:12.441935Z",
"created_on": "2015-07-06T15:48:25.519633Z"
},
]
}
Activities
Get, create and update Activities
Get all activities
get /activities
Get all activities
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"name": "Activity 1",
"type": "external",
"description": "Activity 1 description",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z"
},
{
"id": 2,
"name": "Activity 2",
"type": "internal",
"description": "Activity 2 description",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-06T15:38:58.767000Z"
}
The "internal" parameter can be given in the json file as "type".
Add a new internal activity
post /activities/internal
Add a new internal activity
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"type": {
"required":true,
"type": "string",
"extra": "{internal, external, sale, announcement} in this case 'internal'"
},
"description": {
"required": true,
"type": "string",
"extra": "html allowed"
},
"default_price": {
"required": true,
"type": "integer"
},
"location": {
"required": false,
"type": "string",
"extra": "Only prodivded when session_location is not provided"
},
"session_location": {
"required": false,
"type": "id",
"extra": "Only prodivded when location is not provided"
},
"start_date": {
"required": true,
"type": "date"
},
"end_date": {
"required": false,
"type": "date"
},
"signup_start_date": {
"required": false,
"type": "date"
},
"signup_deadline": {
"required": false,
"type": "date"
},
"is_public": {
"required": true,
"type": "boolean"
},
"subscription_limit": {
"required": false,
"type": "integer"
},
"reminder_pattern": {
"required": false,
"type": "id"
},
"permissions": {
"invites": {
"invite_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"invite_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
},
"followers":{
"follow_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"follow_excluded": [{
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}]
}
},
"price_forms":[{
"price": {
"required": true,
"type": "integer"
},
"group": {
"required": true,
"type": "id"
}
}]
}
Example:
{
"type": "internal",
"name": "New internal activity",
"start_date": "2016-07-04T08:00:00Z",
"description": "<p>New internal activity description</p>",
"default_price": 10,
"permissions": {
"invites":{
"invite_allowed": ["all"],
"invite_excluded": []
},
"followers":{
"follow_allowed": [],
"follow_excluded": []
}
},
"price_forms":[{
"price": 10,
"group": 435
}]
}
The "external" parameter can be given in the json file as "type".
Add a new external activity
post /activities/external
Add a new external activity
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"type": {
"required":true,
"type": "string",
"extra": "{internal, external, sale, announcement} in this case 'external'"
},
"description": {
"required": true,
"type": "string",
"extra": "html allowed"
},
"location": {
"required": false,
"type": "string",
"extra info": "Only prodivded when session_location is not provided"
},
"session_location": {
"required": false,
"type": "id",
"extra info": "Only prodivded when location is not provided"
},
"start_date": {
"required": true,
"type": "date"
},
"end_date": {
"required": false,
"type": "date"
},
"signup_start_date": {
"required": false,
"type": "date"
},
"signup_deadline": {
"required": false,
"type": "date"
},
"is_public": {
"required": true,
"type": "boolean"
},
"subscription_limit": {
"required": false,
"type": "integer"
},
"reminder_pattern": {
"required": false,
"type": "id"
},
"permissions": {
"invites": {
"invite_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"invite_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
},
"followers":{
"follow_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"follow_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
}
},
"subscriptions":[{
"name": {
"required": true,
"type": "string"
},
"price": {
"required": true,
"type": "integer"
}
}]
}
Example:
{
"type": "external",
"name": "New external activity,
"start_date": "2016-07-04T08:00:00Z",
"description": "<p>New external activity description</p>",
"default_price": 10,
"reminder_pattern": 3,
"permissions": {
"invites":{
"invite_allowed": ["all"],
"invite_excluded": []
},
"followers":{
"follow_allowed": [],
"follow_excluded": []
}
},
"subscriptions":[{
"name": "Product 1",
"price": 20
},
{
"name": "Product 2",
"price": 30
}]
}
The "annoucement" parameter can be given in the json file as "type".
Add a new annoucement
post /activities/announcement
Add a new annoucement
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"type": {
"required":true,
"type": "string",
"extra": "{internal, external, sale, announcement} in this case 'annoucement'"
},
"description": {
"required": true,
"type": "string",
"extra": "html allowed"
},
"location": {
"required": false,
"type": "string",
"extra info": "Only prodivded when session_location is not provided"
},
"session_location": {
"required": false,
"type": "id",
"extra info": "Only prodivded when location is not provided"
},
"start_date": {
"required": true,
"type": "date"
},
"end_date": {
"required": false,
"type": "date"
},
"notification_date": {
"required": false,
"type": "date"
},
"is_public": {
"required": true,
"type": "boolean"
},
"permissions": {
"invites": {
"invite_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"invite_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
}
}
}
Example:
{
"type": "announcement",
"name": "New annoucement",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-20T08:00:00Z",
"description": "<p>New announcement description</p>",
"permissions": {
"invites":{
"invite_allowed": ["all"],
"invite_excluded": []
}
}
}
The "sale" parameter can be given in the json file as "type".
Add a new sale
post /activities/sale
Add a new sale
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"description": {
"required": true,
"type": "string",
"extra": "html accepted"
},
"type": {
"required": true,
"type": "string",
"extra": "{internal, external, sale, announcement} in this case 'sale'"
},
"location": {
"required": false,
"type": "string",
"extra info": "Only prodivded when session_location is not provided"
},
"session_location": {
"required": false,
"type": "id",
"extra info": "Only prodivded when location is not provided"
},
"start_date": {
"required": true,
"type": "date"
},
"end_date": {
"required": false,
"type": "date"
},
"is_public": {
"required": true,
"type": "boolean"
},
"permissions": {
"invites": {
"invite_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"invite_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
},
"followers":{
"follow_allowed": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
},
"follow_excluded": {
"required": true,
"type": "array",
"extra": "{group_<id>, user_<id>, segment_<id>, function_<id>, combination_<id>, all }"
}
}
},
"products":[{
"name": {
"required": true,
"type": "string"
},
"max_per_member": {
"required": false,
"price": "integer"
},
"stock": {
"required": false,
"price": "integer"
},
"price": {
"required": true,
"price": "integer"
}
}]
}
Example:
{
"type": "sale",
"name": "New sale",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-20T08:00:00Z",
"description": "<p>New sale description</p>",
"default_price": 10,
"permissions": {
"invites":{
"invite_allowed": ["all"],
"invite_excluded": []
},
"followers":{
"follow_allowed": [],
"follow_excluded": []
}
},
"products":[{
"name": "test 1",
"max_per_member": 1,
"price": 20
},
{
"name": "test 2",
"price": 30
}]
}
Get all activities since the given start date
get /activities/start/{start_date}
Get all activities since the given start date
URI Parameters
- start_date: required (date)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"name": "Activity 1",
"type": "external",
"description": "<p>Activity 1 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z"
},
{
"id": 2,
"name": "Activity 2",
"type": "internal",
"description": "<p>Activity 2 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-06T15:38:58.767000Z"
}
Get all activities ending before the given end date
get /activities/end/{end_date}
Get all activities ending before the given end date
URI Parameters
- end_date: required (date)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"name": "Activity 1",
"type": "external",
"description": "<p>Activity 1 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z"
},
{
"id": 2,
"name": "Activity 2",
"type": "internal",
"description": "<p>Activity 2 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-06T15:38:58.767000Z"
}
Get all activities between the start and end date
get /activities/{start_date}/{end_date}
Get all activities between the start and end date
URI Parameters
- start_date: required (date)
- end_date: required (date)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 1,
"name": "Activity 1",
"type": "external",
"description": "<p>Activity 1 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z"
},
{
"id": 2,
"name": "Activity 2",
"type": "internal",
"description": "<p>Activity 2 description</p>",
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-06T15:38:58.767000Z"
}
Edit general info for an activity
Delete an activity
put /activities/{activity_id}
Edit general info for an activity
URI Parameters
- activity_id: required (integer)
Body
Media type: application/json
Type:
{
"name" : {
"required": false,
"type": "string"
},
"description" : {
"required": false,
"type": "string",
"extra": "html allowed"
},
"start_date" : {
"required": false,
"type": "date"
},
"end_date" : {
"required": false,
"type": "date"
},
"is_public" : {
"required": false,
"type": "string"
},
"is_private" : {
"required": false,
"type": "string",
"extra": "Only for sale"
},
"clubsite_description" : {
"required": false,
"type": "string",
"extra": "html allowed"
},
"location" : {
"required": false,
"type": "string",
"extra info": "Only prodivded when session_location is not provided"
},
"session_location" : {
"required": false,
"type": "id",
"extra info": "Only prodivded when location is not provided"
},
"required" : {
"required": false,
"type": "string",
"extra": "Only for internal"
},
"signup_start_date" : {
"required": false,
"type": "date",
"extra": "Only for internal and external"
},
"signup_deadline" :{
"required": false,
"type": "date",
"extra": "Only for internal and external"
},
"notification_date" :{
"required": false,
"type": "date",
"extra": "Only for annoucement"
}
}
The "internal" parameter must not be provided and will be determined by the type of activity.
Get details of an internal activity
get /activities/{activity_id}/internal
Get details of an internal activity
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 7574,
"name": "External activity",
"type": "external",
"description": "<p>External activity description</p>",
"location": null,
"session_location_id": null,
"author_id": 424,
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z",
"signup_start_date": "2016-07-07T07:55:00Z",
"signup_deadline": "2016-07-04T08:00:00Z",
"cover_picture": null,
"is_public": false,
"attachments": [],
"product_groups": [
{
"id": 835,
"name": "Inschrijvingen",
"description": "Inschrijvingen",
"display_order": 1,
"activity_id": 7574,
"pick_one": false,
"products": [
{
"id": 770,
"name": "test 1",
"stock": -1,
"max_per_member": 1,
"is_visible": true,
"product_prices": [
812
]
},
{
"id": 771,
"name": "test 2",
"stock": -1,
"max_per_member": 1,
"is_visible": true,
"product_prices": [
813
]
}
]
}
]
}
The "external" parameter must not be provided and will be determined by the type of activity.
Get details of an external activity
get /activities/{activity_id}/external
Get details of an external activity
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 7574,
"name": "External activity",
"type": "external",
"description": "<p>External activity description</p>",
"location": null,
"session_location_id": null,
"author_id": 424,
"start_date": "2016-07-04T08:00:00Z",
"end_date": "2016-07-04T08:00:00Z",
"signup_start_date": "2016-07-07T07:55:00Z",
"signup_deadline": "2016-07-04T08:00:00Z",
"cover_picture": null,
"is_public": false,
"attachments": [],
"product_groups": [
{
"id": 835,
"name": "Inschrijvingen",
"description": "Inschrijvingen",
"display_order": 1,
"activity_id": 7574,
"pick_one": false,
"products": [
{
"id": 770,
"name": "Product 1",
"stock": -1,
"max_per_member": 1,
"is_visible": true,
"product_prices": [
812
]
},
{
"id": 771,
"name": "Product 2",
"stock": -1,
"max_per_member": 1,
"is_visible": true,
"product_prices": [
813
]
}
]
}
]
}
The "sale" parameter must not be provided and will be determined by the type of activity.
Get details of a sale
get /activities/{activity_id}/sale
Get details of a sale
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 7576,
"name": "Sale",
"type": "sale",
"description": "<p>Sale description</p>",
"location": "",
"session_location_id": null,
"author_id": 424,
"start_date": "2016-07-15T22:00:00Z",
"end_date": "2016-07-29T23:00:00Z",
"cover_picture": null,
"is_public": false,
"attachments": [],
"product_groups": [
{
"id": 837,
"name": "Producten",
"description": "Producten",
"display_order": 1,
"activity_id": 7576,
"pick_one": false,
"products": [
{
"id": 774,
"name": "Product",
"stock": -1,
"max_per_member": -1,
"is_visible": true,
"product_prices": [
816
]
}
]
}
]
}
The "announcement" parameter must not be provided and will be determined by the type of activity.
Get details of an announcement
get /activities/{activity_id}/announcement
Get details of an announcement
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 7586,
"name": "Announcement",
"description": "<p>Announcement example</p>",
"location": "",
"session_location_id": null,
"author_id": 424,
"start_date": "2016-07-14T22:00:00Z",
"end_date": "2016-07-14T22:00:00Z",
"notification_date": null,
"cover_picture": null,
"is_public": false,
"attachments": []
}
The "session" parameter must not be provided and will be determined by the type of activity.
Get details of an session
get /activities/{activity_id}/session
Get details of an session
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 7610,
"name": "Subscription",
"type": "session",
"description": "<p>Subscription description</p>",
"location": null,
"session_location_id": 137,
"author_id": null,
"start_date": "2016-08-04T07:00:00Z",
"end_date": "2016-08-04T08:00:00Z",
"notification_date": null,
"cover_picture": null,
"is_public": false,
"attachments": []
}
Attendance list for an activity
get /activities/{activity_id}/attendance/{status}
Attendance list for an activity
URI Parameters
- activity_id: required (integer)
- status: required (string)
(A)ttending, (N)ot attending (U)nknown
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"count": 5,
"next": null,
"previous": null,
"results": [
{
"name": "Elke De Ridder",
"user_id": 1314,
"purchases": [
{
"name": "1 x Inschrijving"
}
],
"photo_url": "http://dev.peepl.be:8000/static/images/icons/placeholder_U_small.png",
"comments": ""
},
{
"name": "Adam Frederick",
"user_id": 621,
"purchases": [
{
"name": "1 x Inschrijving"
}
],
"photo_url": "http://dev.peepl.be:8000/static/images/icons/placeholder_U_small.png",
"comments": ""
},
{
"name": "An Janssens",
"user_id": 1388,
"purchases": [
{
"name": "1 x Inschrijving"
}
],
"photo_url": "http://dev.peepl.be:8000/static/images/icons/placeholder_U_small.png",
"comments": ""
},
{
"name": "An Quaghebeur",
"user_id": 1090,
"purchases": [
{
"name": "2 x Inschrijving"
}
],
"photo_url": "http://dev.peepl.be:8000/static/images/icons/placeholder_U_small.png",
"comments": ""
},
{
"name": "Marie Vanaudenhove",
"user_id": 1704,
"purchases": [
{
"name": "1 x Inschrijving"
}
],
"photo_url": "http://dev.peepl.be:8000/static/images/icons/placeholder_U_small.png",
"comments": ""
}
]
}
Get all attachments for an activity
get /activities/{activity_id}/attachments
Get all attachments for an activity
URI Parameters
- activity_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 25,
"name": "VID_20160309_111412.mp4",
"filesize": 30848784,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/activity_attachments/7570/89f6bd74-bdd2-4786-b4af-0663751abbf9/VID_20160309_111412.mp4",
"activity_id": 7570
},
{
"id": 24,
"name": "207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"filesize": 8003,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/activity_attachments/7570/e26a16f8-0c77-4014-9ec1-2f1574924de2/207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"activity_id": 7570
},
{
"id": 23,
"name": "VID_20160309_111412.mp4",
"filesize": 30848784,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/activity_attachments/7570/af0b9b01-ac4f-4405-9524-11927bc018f0/VID_20160309_111412.mp4",
"activity_id": 7570
},
{
"id": 22,
"name": "207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"filesize": 8003,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/activity_attachments/7570/17844549-4618-4a65-a0c4-afd3dca06182/207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"activity_id": 7570
}
]
Delete an attachment from an activity
Add a new attachment to an activity
post /activities/{activity_id}/attachments/upload
Get products for an activity
Add a new product to an activity
get /activities/{activity_id}/products
post /activities/{activity_id}/products
Add a new product to an activity
URI Parameters
- activity_id: required (integer)
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"display_order": {
"required": true,
"type": "integer"
},
"required": {
"required": true,
"type": "boolean"
},
"stock": {
"required": true,
"type": "integer"
},
"max_per_member": {
"required": true,
"type": "integer"
},
"is_visible": {
"required": true,
"type": "boolean"
}
}
Edit a product
Delete a product from an activity
put /activities/{activity_id}/products/{product_id}
Edit a product
URI Parameters
- activity_id: required (integer)
- product_id: required (integer)
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"display_order": {
"required": true,
"type": "integer"
},
"required": {
"required": true,
"type": "boolean"
},
"stock": {
"required": true,
"type": "integer"
},
"max_per_member": {
"required": true,
"type": "integer"
},
"is_visible": {
"required": true,
"type": "boolean"
}
}
Product prices per grooup for a given activity
Add a product price to a given product
get /activities/{activity_id}/products/{product_id}/productprices
Product prices per grooup for a given activity
URI Parameters
- activity_id: required (integer)
- product_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 776,
"price": "0.00",
"price_not_attending": "0.00",
"product": 748,
"user_group": 435
}
]
post /activities/{activity_id}/products/{product_id}/productprices
Add a product price to a given product
URI Parameters
- activity_id: required (integer)
- product_id: required (integer)
Body
Media type: application/json
Type:
{
"price": {
"required": true,
"type": "integer"
},
"price_not_attending": {
"required": false,
"type": "integer"
},
"user_group": {
"required": true,
"type": "id"
},
"product": {
"required": true,
"type": "id"
}
}
Update product price for a given product
Delete product price (for a given product)
put /activities/{activity_id}/products/{product_id}/productprices/{productprice_id}
Update product price for a given product
URI Parameters
- activity_id: required (integer)
- product_id: required (integer)
- productprice_id: required (integer)
Body
Media type: application/json
Type:
{
"price": {
"required": false,
"type": "integer"
},
"price_not_attending": {
"required": false,
"type": "integer"
}
}
delete /activities/{activity_id}/products/{product_id}/productprices/{productprice_id}
NewsPost
NewsPost in Peepl
List of all NewsPosts
Add a NewsPost
get /news
List of all NewsPosts
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 114,
"name": "Newspost 1",
"content": "<p>Content newspost 1</p>",
"is_published": true,
"is_published_start_date": null,
"is_published_end_date": null,
"is_public": true,
"is_public_start_date": null,
"is_public_end_date": null,
"featured_on_peepl": false,
"featured_on_clubsite": false,
"shared_on_facebook": true,
"album_id": null,
"author_id": 424,
"last_modified_by_id": null,
"cover_photo": null
},
{
"id": 120,
"name": "Newspost 2",
"content": "<p>Content newspost 2</p>",
"is_published": true,
"is_published_start_date": null,
"is_published_end_date": null,
"is_public": true,
"is_public_start_date": null,
"is_public_end_date": null,
"featured_on_peepl": false,
"featured_on_clubsite": false,
"shared_on_facebook": true,
"album_id": null,
"author_id": 424,
"last_modified_by_id": 424,
"cover_photo": null
}
]
post /news
Add a NewsPost
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"content": {
"required": true,
"type": "string",
"extra": "html allowed"
},
"is_published": {
"required": true,
"type": "boolean"
},
"is_published_start_date": {
"required": true,
"type": "date"
},
"is_published_end_date": {
"required": true,
"type": "date"
},
"is_public": {
"required": true,
"type": "boolean"
},
"is_public_start_date": {
"required": true,
"type": "date"
},
"is_public_end_date": {
"required": true,
"type": "date"
},
"featured_on_peepl": {
"required": true,
"type": "boolean"
},
"featured_on_clubsite": {
"required": true,
"type": "boolean"
},
"shared_on_facebook": {
"required": true,
"type": "boolean"
}
}
Get details of NewsPost
Edit a NewsPost
Delete a NewsPost
get /news/{news_id}
Get details of NewsPost
URI Parameters
- news_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 116,
"name": "Newspost 3",
"content": "<p>Content newspost 3</p>",
"is_published": true,
"is_published_start_date": null,
"is_published_end_date": null,
"is_public": false,
"is_public_start_date": null,
"is_public_end_date": null,
"featured_on_peepl": false,
"featured_on_clubsite": false,
"shared_on_facebook": true,
"album_id": null,
"author_id": 424,
"last_modified_by_id": 424,
"cover_photo": null
}
put /news/{news_id}
Edit a NewsPost
URI Parameters
- news_id: required (integer)
Body
Media type: application/json
Type:
{
"name": {
"required": false,
"type": "string"
},
"content": {
"required": false,
"type": "string",
"extra": "html allowed"
},
"is_published": {
"required": false,
"type": "boolean"
},
"is_public": {
"required": false,
"type": "boolean"
},
"is_public_start_date": {
"required": false,
"type": "date"
},
"is_public_end_date": {
"required": false,
"type": "date"
},
"featured_on_peepl": {
"required": false,
"type": "boolean"
},
"featured_on_clubsite": {
"required": false,
"type": "boolean"
},
"shared_on_facebook": {
"required": false,
"type": "boolean"
}
}
Get all attachments of a newspost
get /news/{news_id}/attachments
Get all attachments of a newspost
URI Parameters
- news_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 17,
"name": "file.pdf",
"filesize": 1375872,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/news_attachments/119/25e3909f-2609-417c-bdc3-53354808a2c2/audi_a3_SB.pdf",
"news_id": 119
},
{
"id": 14,
"name": "image.jpg",
"filesize": 117747,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/news_attachments/119/3093078a-b5c8-4127-ba1b-e39b10d6de58/devil-06.jpg",
"news_id": 119
}
]
Add a new attachment to a NewsPost
Delete an attachment from a NewsPost
Folder
Folders in Peepl
List of all folders
Add a folder
get /folders
List of all folders
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 415,
"name": "Folder 1",
"created_by": 424,
"parent": null,
"files": [],
"children": [
{
"id": 416,
"name": "Subfolder 1",
"created_by": 424,
"parent": 415,
"files": [
{
"id": 231,
"filename": "2015-05-25-tsd18-final.pdf",
"filesize": 8365509,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/416/82150095-05e7-4a7d-99ae-4e24da57d441/2015-05-25-tsd18-final.pdf",
"directory_id": 416,
"uploaded_by_id": 424
}
],
"children": [
{
"id": 417,
"name": "Subsubfolder 1",
"created_by": 424,
"parent": 416,
"files": [
{
"id": 232,
"filename": "IMG_0040.JPG",
"filesize": 2444265,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/417/34d4476e-4c69-49b9-9530-599c56b61787/IMG_0040.JPG",
"directory_id": 417,
"uploaded_by_id": 424
}
],
"children": []
}
]
},
{
"id": 418,
"name": "Subfolder 2",
"created_by": 424,
"parent": 415,
"files": [],
"children": []
}
]
},
{
"id": 419,
"name": "Folder 2",
"created_by": 424,
"parent": null,
"files": [
{
"id": 233,
"filename": "207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"filesize": 8003,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/419/6b62bbdd-56e2-4aa5-9585-842aa0377d2b/207-f2342099-1baa-44cc-8dcb-661cacd1498e.jpg",
"directory_id": 419,
"uploaded_by_id": 424
}
],
"children": []
}
]
Folder details
Edit folder details
Delete a folder
get /folders/{folders_id}
Folder details
URI Parameters
- folders_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 415,
"name": "Folder 1",
"created_by": 424,
"parent": null,
"files": [],
"children": [
{
"id": 416,
"name": "Subfolder 1",
"created_by": 424,
"parent": 415,
"files": [
{
"id": 231,
"filename": "2015-05-25-tsd18-final.pdf",
"filesize": 8365509,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/416/82150095-05e7-4a7d-99ae-4e24da57d441/2015-05-25-tsd18-final.pdf",
"directory_id": 416,
"uploaded_by_id": 424
}
],
"children": [
{
"id": 417,
"name": "Subsubfolder 1",
"created_by": 424,
"parent": 416,
"files": [
{
"id": 232,
"filename": "IMG_0040.JPG",
"filesize": 2444265,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/417/34d4476e-4c69-49b9-9530-599c56b61787/IMG_0040.JPG",
"directory_id": 417,
"uploaded_by_id": 424
}
],
"children": []
}
]
},
{
"id": 418,
"name": "Subfolder 2",
"created_by": 424,
"parent": 415,
"files": [],
"children": []
}
]
}
Files
Files in Peepl
List of all files
get /files
List of all files
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 208,
"filename": "2016-04-16 20.10.05.jpg",
"filesize": 486386,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/375/2257c0f3-8b3b-4aaa-8a49-5bafc16c20f7/2016-04-16%2020.10.05.jpg",
"directory_id": 375,
"uploaded_by_id": 424
},
{
"id": 210,
"filename": "Template_voorbeeld_leden_inladen.xlsx",
"filesize": 25524,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/262/e4af112e-5230-4bdc-bc3a-22af0e67ebbd/Template_voorbeeld_leden_inladen.xlsx",
"directory_id": 262,
"uploaded_by_id": 424
}
]
Details of a file
Delete a file
get /files/{file_id}
Details of a file
URI Parameters
- file_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 208,
"filename": "2016-04-16 20.10.05.jpg",
"filesize": 486386,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/documents/375/2257c0f3-8b3b-4aaa-8a49-5bafc16c20f7/2016-04-16%2020.10.05.jpg",
"directory_id": 375,
"uploaded_by_id": 424
}
Add a file to folder
Picture Albums
Picture Albums in Peepl
List of all albums
Create an album
get /albums
List of all albums
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 211,
"name": "Album 1",
"description": "<p>Album 1 description</p>",
"is_published": true,
"is_public": false,
"activity_id": null,
"pictures": []
},
{
"id": 212,
"name": "Album 2",
"description": "<p>Album 2 description</p>",
"is_published": true,
"is_public": false,
"activity_id": null,
"pictures": []
}
]
post /albums
Create an album
Body
Media type: application/json
Type:
{
"name": {
"required": true,
"type": "string"
},
"description": {
"required": true,
"type": "string",
"extra": "html allowed"
},
"is_published": {
"required": true,
"type": "boolean"
},
"is_public": {
"required": true,
"type": "boolean"
}
}
Details of an album
Edit album details
Delete an album
get /albums/{albums_id}
Details of an album
URI Parameters
- albums_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 211,
"name": "Album 1",
"description": "<p>Album 1 description</p>",
"is_published": true,
"is_public": false,
"activity_id": null,
"pictures": []
}
put /albums/{albums_id}
Edit album details
URI Parameters
- albums_id: required (integer)
Body
Media type: application/json
Type:
{
"name": {
"required": false,
"type": "string"
},
"description": {
"required": false,
"type": "string",
"extra": "html allowed"
},
"is_published": {
"required": false,
"type": "boolean"
},
"is_public": {
"required": false,
"type": "boolean"
}
}
Pictures
Pictures in Peepl
Get all pictures
get /pictures
Get all pictures
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
[
{
"id": 287,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/pictures/205-8f7040bd-559e-4d0f-ac39-59065a65d5db.jpg",
"filesize": 963023,
"width": 1920,
"height": 1080,
"album_id": 205
},
{
"id": 288,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/pictures/205-4997dd21-c860-441b-91cd-1bd2c78445ed.jpg",
"filesize": 963023,
"width": 1920,
"height": 1080,
"album_id": 205
},
{
"id": 289,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/pictures/205-a12112d8-4aa1-416e-8278-e2c283f56d89.jpg",
"filesize": 963023,
"width": 1920,
"height": 1080,
"album_id": 205
}
]
Get details of a picture
Delete a picture
get /pictures/{picture_id}
Get details of a picture
URI Parameters
- picture_id: required (integer)
HTTP status code 200
Body
Media type: application/json
Type: any
Example:
{
"id": 287,
"file": "https://peepl-dev-media.s3.eu-central-1.amazonaws.com/217/pictures/205-8f7040bd-559e-4d0f-ac39-59065a65d5db.jpg",
"filesize": 963023,
"width": 1920,
"height": 1080,
"album_id": 205
}
Upload a picture