{"_id":"5640b2002b14f70d0039b8b3","link_url":"","order":0,"parentDoc":null,"slug":"getting-started","__v":12,"createdAt":"2015-11-09T14:47:28.858Z","link_external":false,"title":"Getting Started with Influitive","version":"5640b1fe2b14f70d0039b8b0","isReference":false,"sync_unique":"","type":"basic","user":"54afec2fed9ada1400afbf85","category":"5640b1ff2b14f70d0039b8b1","githubsync":"","hidden":false,"updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authorization\"\n}\n[/block]\nMost API endpoints (with the exception of AdvocateAnywhere) require the use of an **API Token**. You can retrieve this token by following these steps:\n\n- Log into your Influitive instance, and go to the Integrations area (available by clicking on your user icon)\n- Find the integration named \"Influitive API\". Enable that integration if it's not currently active.\n- Click on \"Configuration\". A popup will appear with your API Token. All requests to Influitive must include this token in requests, within the \"Authorization\" header.  Some API calls require an X_ORG_ID, which is also provided in the Influitive API configuration settings.\n\n\n\n[block:html]\n{\n  \"html\": \"<p>&nbsp;</p>\\n\"\n}\n[/block]\n![alt text](https://i.imgur.com/taFotfW.png  =50x50)\n\n[block:html]\n{\n  \"html\": \"<p>&nbsp;</p>\\n\"\n}\n[/block]\n![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)","excerpt":"","project":"5640b1fd2b14f70d0039b8ad","next":{"description":"","pages":[]},"childrenPages":[]}

Getting Started with Influitive


[block:api-header] { "type": "basic", "title": "Authorization" } [/block] Most API endpoints (with the exception of AdvocateAnywhere) require the use of an **API Token**. You can retrieve this token by following these steps: - Log into your Influitive instance, and go to the Integrations area (available by clicking on your user icon) - Find the integration named "Influitive API". Enable that integration if it's not currently active. - Click on "Configuration". A popup will appear with your API Token. All requests to Influitive must include this token in requests, within the "Authorization" header. Some API calls require an X_ORG_ID, which is also provided in the Influitive API configuration settings. [block:html] { "html": "<p>&nbsp;</p>\n" } [/block] ![alt text](https://i.imgur.com/taFotfW.png =50x50) [block:html] { "html": "<p>&nbsp;</p>\n" } [/block] ![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)
[block:api-header] { "type": "basic", "title": "Authorization" } [/block] Most API endpoints (with the exception of AdvocateAnywhere) require the use of an **API Token**. You can retrieve this token by following these steps: - Log into your Influitive instance, and go to the Integrations area (available by clicking on your user icon) - Find the integration named "Influitive API". Enable that integration if it's not currently active. - Click on "Configuration". A popup will appear with your API Token. All requests to Influitive must include this token in requests, within the "Authorization" header. Some API calls require an X_ORG_ID, which is also provided in the Influitive API configuration settings. [block:html] { "html": "<p>&nbsp;</p>\n" } [/block] ![alt text](https://i.imgur.com/taFotfW.png =50x50) [block:html] { "html": "<p>&nbsp;</p>\n" } [/block] ![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)
{"_id":"5640b257d4b2e00d00bb3cf1","user":"54afec2fed9ada1400afbf85","createdAt":"2015-11-09T14:48:55.098Z","editedParams2":true,"excerpt":"Utilize AdvocateAnywhere APIs directly to customimze the experience for your advocates.","link_url":"","slug":"advocateanywhere-direct-api-access","type":"get","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n   \"challenges\":[\n      {\n         \"id\":555,\n         \"name\":\"Online Action\",\n         \"headline\":\"Online Action\",\n         \"description\":\"Online Action\",\n         \"description_text_only\":\"Online Action\",\n         \"type\":\"Activities\",\n         \"multiple_completion\":true,\n         \"activity\":{\n            \"state\":\"active\",\n            \"stage_type\":\"online_action\",\n            \"stage_type_image_url\":\"https://example.org/stage_type.png\",\n            \"current_index\":0,\n            \"stage_id\":2550,\n            \"stage_name\":\"Complete an Action Online\",\n            \"stage_points\":100,\n            \"completion_text\":\"Done\",\n            \"stage_params\":{\n               \"url\":\"http://example.org\",\n               \"preview\":{\n                  \"title\":\"URL Title\",\n                  \"description\":\"URL Description\",\n                  \"image\":\"http://example.org/image.jpg\"\n               }\n            },\n            \"questions\":[\n\n            ],\n            \"params\":{\n               \"url\":\"http://example.org\",\n               \"preview\":{\n                  \"title\":\"URL Title\",\n                  \"description\":\"URL Description\",\n                  \"image\":\"http://example.org/image.jpg\"\n               }\n            },\n            \"stage_instructions\":\"\"\n         },\n         \"timeout_message\":null,\n         \"stage_count\":1,\n         \"points\":100,\n         \"featured\":true,\n         \"stage_types\":[\n            \"online_action\"\n         ],\n         \"created_at\":\"2015-11-05T08:27:56.954-05:00\",\n         \"image\":\"http://example.org/image.png\"\n      }\n   ],\n   \"contact\":null,\n   \"X-CSRF-Token\":null,\n   \"X-Community\":\"RockstarVIP\",\n   \"X-Color\":\"#14a2d4\",\n   \"X-Logo\":\"http://example.org/logo.png\",\n   \"X-EmbedThanks\":\"Thanks! We really appreciate your participation.\",\n   \"X-TabWidth\":64,\n   \"X-TabLocation\":\"right\"\n}","name":""}]},"settings":"5640b2e22b14f70d0039b8b6","url":"/embedded/challenges","auth":"required","method":"get","params":[{"desc":"Comma-delimited list of challenge IDs. Setting this will return the specified challenges.","default":"","type":"string","name":"challenge_ids","in":"query","_id":"5640b400eaede117005c99c0","required":false},{"default":"","type":"string","name":"url","in":"query","_id":"5640b400eaede117005c99bf","required":false,"desc":"The URL that the request originated from. Setting this will look up challenges that have been targeted to this URL."}]},"link_external":false,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","title":"Calling AdvocateAnywhere Directly","updates":[],"version":"5640b1fe2b14f70d0039b8b0","__v":2,"body":"You can use the AdvocateAnywhere API directly to retrieve information on challenges that are targeted to advocates using AdvocateAnywhere.\n\nThere are two ways to retrieve challenges targeted to AdvocateAnywhere:\n\n- **Specifying a URL** - If you pass a `url` parameter to the API, Influitive will locate challenges associated with that URL (configured by editing the challenge)\n- **Specifying challenge ids** - If you pass a comma-delimited list of challenge ids through the `challenge_ids` parameter, Influitive will directly fetch those challenges, ignoring any URL targeting rules specified on those challenges.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Targeting Gotchas\",\n  \"body\": \"Regardless of the method you use to retrieve challenges from the AdvocateAnywhere API, the challenge **must** be targeted to \\\"AdvocateAnywhere\\\".\\n\\nAs well, the challenge must be targeted to the correct audience. If you are not specifying information on the advocate in question, the challenge must be targeted at \\\"Nominees\\\".\"\n}\n[/block]\nThe data returned from this endpoint contains general information about the advocate in question, your advocate program, and the challenges that you requested:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"challenges\",\n    \"0-1\": \"Contains information on the challenges requested (details below)\",\n    \"1-0\": \"contact\",\n    \"1-1\": \"Information on the contact who requested these challenges. If information on an advocate was not specified, or the advocate was not found, this will return `null`.\",\n    \"2-0\": \"X-CSRF-Token\",\n    \"2-1\": \"A CSRF token to be supplied with any challenge completion information. If you plan to submit challenge completions using AdvocateAnywhere, please contact Influitive for assistance (this is not currently a documented or supported operation).\",\n    \"3-0\": \"X-Community\",\n    \"3-1\": \"The name of your advocate program\",\n    \"4-0\": \"X-Color\",\n    \"4-1\": \"The \\\"primary color\\\" of your advocate program.\",\n    \"5-0\": \"X-Logo\",\n    \"5-1\": \"The logo of your advocate program.\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]","editedParams":true,"isReference":true,"order":0,"sync_unique":"","category":"5640b20f2b14f70d0039b8b4","githubsync":"","hidden":false,"childrenPages":[]}

getCalling AdvocateAnywhere Directly

Utilize AdvocateAnywhere APIs directly to customimze the experience for your advocates.

Query Params

challenge_ids:
string
Comma-delimited list of challenge IDs. Setting this will return the specified challenges.
url:
string
The URL that the request originated from. Setting this will look up challenges that have been targeted to this URL.
You can use the AdvocateAnywhere API directly to retrieve information on challenges that are targeted to advocates using AdvocateAnywhere. There are two ways to retrieve challenges targeted to AdvocateAnywhere: - **Specifying a URL** - If you pass a `url` parameter to the API, Influitive will locate challenges associated with that URL (configured by editing the challenge) - **Specifying challenge ids** - If you pass a comma-delimited list of challenge ids through the `challenge_ids` parameter, Influitive will directly fetch those challenges, ignoring any URL targeting rules specified on those challenges. [block:callout] { "type": "warning", "title": "Targeting Gotchas", "body": "Regardless of the method you use to retrieve challenges from the AdvocateAnywhere API, the challenge **must** be targeted to \"AdvocateAnywhere\".\n\nAs well, the challenge must be targeted to the correct audience. If you are not specifying information on the advocate in question, the challenge must be targeted at \"Nominees\"." } [/block] The data returned from this endpoint contains general information about the advocate in question, your advocate program, and the challenges that you requested: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "challenges", "0-1": "Contains information on the challenges requested (details below)", "1-0": "contact", "1-1": "Information on the contact who requested these challenges. If information on an advocate was not specified, or the advocate was not found, this will return `null`.", "2-0": "X-CSRF-Token", "2-1": "A CSRF token to be supplied with any challenge completion information. If you plan to submit challenge completions using AdvocateAnywhere, please contact Influitive for assistance (this is not currently a documented or supported operation).", "3-0": "X-Community", "3-1": "The name of your advocate program", "4-0": "X-Color", "4-1": "The \"primary color\" of your advocate program.", "5-0": "X-Logo", "5-1": "The logo of your advocate program." }, "cols": 2, "rows": 6 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can use the AdvocateAnywhere API directly to retrieve information on challenges that are targeted to advocates using AdvocateAnywhere. There are two ways to retrieve challenges targeted to AdvocateAnywhere: - **Specifying a URL** - If you pass a `url` parameter to the API, Influitive will locate challenges associated with that URL (configured by editing the challenge) - **Specifying challenge ids** - If you pass a comma-delimited list of challenge ids through the `challenge_ids` parameter, Influitive will directly fetch those challenges, ignoring any URL targeting rules specified on those challenges. [block:callout] { "type": "warning", "title": "Targeting Gotchas", "body": "Regardless of the method you use to retrieve challenges from the AdvocateAnywhere API, the challenge **must** be targeted to \"AdvocateAnywhere\".\n\nAs well, the challenge must be targeted to the correct audience. If you are not specifying information on the advocate in question, the challenge must be targeted at \"Nominees\"." } [/block] The data returned from this endpoint contains general information about the advocate in question, your advocate program, and the challenges that you requested: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "challenges", "0-1": "Contains information on the challenges requested (details below)", "1-0": "contact", "1-1": "Information on the contact who requested these challenges. If information on an advocate was not specified, or the advocate was not found, this will return `null`.", "2-0": "X-CSRF-Token", "2-1": "A CSRF token to be supplied with any challenge completion information. If you plan to submit challenge completions using AdvocateAnywhere, please contact Influitive for assistance (this is not currently a documented or supported operation).", "3-0": "X-Community", "3-1": "The name of your advocate program", "4-0": "X-Color", "4-1": "The \"primary color\" of your advocate program.", "5-0": "X-Logo", "5-1": "The logo of your advocate program." }, "cols": 2, "rows": 6 } [/block]
{"_id":"564217d59417b40d00c0fc6b","__v":1,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/embedded/contacts/identify","auth":"required","method":"get","params":[{"required":true,"desc":"The e-mail address of the contact. We will attempt to locate an existing contact with that e-mail address, or initialize a new contact otherwise.","default":"","type":"string","name":"contact[email]","in":"query","_id":"56421a848c503f17002d697b"}]},"category":"5640b20f2b14f70d0039b8b4","githubsync":"","isReference":true,"link_external":false,"link_url":"","user":"54afec2fed9ada1400afbf85","editedParams2":true,"sync_unique":"","body":"Call this endpoint to locate an existing contact, or create a new contact. You should make this call prior to retrieving challenges in order to supply the information returned with this request when submitting a challenge (see \"Submitting a Challenge\")\n\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"What happens when you don't identify advocates?\",\n  \"body\": \"If you don't identify your advocates prior to completing challenges with AdvocateAnywhere, we will attempt to locate the advocate using a **guest cookie** that we associate with the advocate.\\n\\nIf you are calling AdvocateAnywhere from within a browser, this will normally work. If you are calling it from a backend service, it almost certainly won't. Wherever possible, if you have the information, it's good practice to identify advocates.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint.\",\n  \"title\": \"Here be Dragons!\"\n}\n[/block]","editedParams":true,"title":"Identifying an Advocate","type":"get","createdAt":"2015-11-10T16:14:13.785Z","excerpt":"When integrating with an existing application, you may already know some information on the advocates completing those challenges. Identify those advocates to associate completions with the correct user.","hidden":false,"order":1,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","slug":"identifying-an-advocate","updates":[],"version":"5640b1fe2b14f70d0039b8b0","childrenPages":[]}

getIdentifying an Advocate

When integrating with an existing application, you may already know some information on the advocates completing those challenges. Identify those advocates to associate completions with the correct user.

Query Params

contact[email]:
required
string
The e-mail address of the contact. We will attempt to locate an existing contact with that e-mail address, or initialize a new contact otherwise.
Call this endpoint to locate an existing contact, or create a new contact. You should make this call prior to retrieving challenges in order to supply the information returned with this request when submitting a challenge (see "Submitting a Challenge") [block:callout] { "type": "warning", "title": "What happens when you don't identify advocates?", "body": "If you don't identify your advocates prior to completing challenges with AdvocateAnywhere, we will attempt to locate the advocate using a **guest cookie** that we associate with the advocate.\n\nIf you are calling AdvocateAnywhere from within a browser, this will normally work. If you are calling it from a backend service, it almost certainly won't. Wherever possible, if you have the information, it's good practice to identify advocates." } [/block] [block:callout] { "type": "danger", "body": "This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint.", "title": "Here be Dragons!" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Call this endpoint to locate an existing contact, or create a new contact. You should make this call prior to retrieving challenges in order to supply the information returned with this request when submitting a challenge (see "Submitting a Challenge") [block:callout] { "type": "warning", "title": "What happens when you don't identify advocates?", "body": "If you don't identify your advocates prior to completing challenges with AdvocateAnywhere, we will attempt to locate the advocate using a **guest cookie** that we associate with the advocate.\n\nIf you are calling AdvocateAnywhere from within a browser, this will normally work. If you are calling it from a backend service, it almost certainly won't. Wherever possible, if you have the information, it's good practice to identify advocates." } [/block] [block:callout] { "type": "danger", "body": "This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint.", "title": "Here be Dragons!" } [/block]
{"_id":"5641fc738c503f17002d6949","link_url":"","title":"Submitting Challenges","type":"get","version":"5640b1fe2b14f70d0039b8b0","__v":3,"githubsync":"","isReference":true,"project":"5640b1fd2b14f70d0039b8ad","api":{"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5640b2e22b14f70d0039b8b6","url":"/embedded/challenges","auth":"required","method":"get","params":[]},"body":"You can use AdvocateAnywhere to submit challenges on behalf of an advocate. In order to submit these challenges, you will first need to retrieve those challenges through the AdvocateAnywhere API (in order to get details about the activity as well as a CSRF token to submit alongside your request.)\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"A note about submitting challenges\",\n  \"body\": \"Note that the payloads required to be sent for challenges differs depending on the stage type in question. In order to ensure that requests are submitted successfully, it's important to carefully review this document and ensure that you're sending the correct information for the challenge you're trying to complete for the advocate.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Here be dragons!\",\n  \"body\": \"This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint.\"\n}\n[/block]","category":"5640b20f2b14f70d0039b8b4","excerpt":"","sync_unique":"","updates":[],"createdAt":"2015-11-10T14:17:23.662Z","hidden":false,"link_external":false,"order":2,"parentDoc":null,"slug":"submitting-challenges","user":"54afec2fed9ada1400afbf85","childrenPages":[]}

getSubmitting Challenges


You can use AdvocateAnywhere to submit challenges on behalf of an advocate. In order to submit these challenges, you will first need to retrieve those challenges through the AdvocateAnywhere API (in order to get details about the activity as well as a CSRF token to submit alongside your request.) [block:callout] { "type": "warning", "title": "A note about submitting challenges", "body": "Note that the payloads required to be sent for challenges differs depending on the stage type in question. In order to ensure that requests are submitted successfully, it's important to carefully review this document and ensure that you're sending the correct information for the challenge you're trying to complete for the advocate." } [/block] [block:callout] { "type": "danger", "title": "Here be dragons!", "body": "This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



You can use AdvocateAnywhere to submit challenges on behalf of an advocate. In order to submit these challenges, you will first need to retrieve those challenges through the AdvocateAnywhere API (in order to get details about the activity as well as a CSRF token to submit alongside your request.) [block:callout] { "type": "warning", "title": "A note about submitting challenges", "body": "Note that the payloads required to be sent for challenges differs depending on the stage type in question. In order to ensure that requests are submitted successfully, it's important to carefully review this document and ensure that you're sending the correct information for the challenge you're trying to complete for the advocate." } [/block] [block:callout] { "type": "danger", "title": "Here be dragons!", "body": "This API endpoint is currently undocumented, although we plan to fully support this in the future. Please contact Influitive Support if you wish to utilize this endpoint." } [/block]
{"_id":"5782e17ea9e63b0e00e5adf9","excerpt":"","parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","api":{"settings":"","url":"/approvals","auth":"required","examples":{"codes":[{"code":"GET /approvals HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3","language":"json"}]},"method":"get","params":[],"results":{"codes":[{"name":"","code":"{\n\"approvals\": [\n    {\n      \"id\": 778,\n      \"challenge_id\": 218,\n      \"contact_id\": 73,\n      \"responses\": [\n        {\n          \"question_id\": 1117,\n          \"body\": \"It was great!\",\n          \"subject\": \"Tell us about your experience!\"\n        }\n      ],\n      \"prospects\": [],\n      \"links\": {\n        \"approve\": {\n          \"href\": \"/approvals/778/decision/approve\"\n        },\n        \"reject\": {\n          \"href\": \"/approvals/778/decision/reject\"\n        },\n        \"feedback_only\": {\n          \"href\": \"/approvals/778/decision/feedback_only\"\n        },\n        \"redo-1\": {\n          \"href\": \"/approvals/778/decision/redo/2092\",\n          \"meta\": {\n            \"description\": \"Send the advocate back 1 stage\",\n            \"stage_type\": \"Corporate Confirmation\"\n          }\n        },\n        \"redo-2\": {\n          \"href\": \"/approvals/778/decision/redo/2091\",\n          \"meta\": {\n            \"description\": \"Send the advocate back 2 stages\",\n            \"stage_type\": \"Questions\"\n          }\n        }\n      }\n    },\n    {\n      \"id\": 862,\n      \"challenge_id\": 143,\n      \"contact_id\": 73,\n      \"responses\": [\n        {\n          \"question_id\": 976,\n          \"body\": \"Advocate in this challenge\",\n          \"subject\": \"This is an awesome challenge.\"\n        }\n      ],\n      \"prospects\": [],\n      \"links\": {\n        \"approve\": {\n          \"href\": \"/approvals/862/decision/approve\"\n        },\n        \"reject\": {\n          \"href\": \"/approvals/862/decision/reject\"\n        },\n        \"feedback_only\": {\n          \"href\": \"/approvals/862/decision/feedback_only\"\n        },\n        \"redo-1\": {\n          \"href\": \"/approvals/862/decision/redo/1564\",\n          \"meta\": {\n            \"description\": \"Send the advocate back 1 stage\",\n            \"stage_type\": \"Questions\"\n          }\n        },\n        \"redo-2\": {\n          \"href\": \"/approvals/862/decision/redo/1563\",\n          \"meta\": {\n            \"description\": \"Send the advocate back 2 stages\",\n            \"stage_type\": \"Advocate Acceptance\"\n          }\n        }\n      }\n    },\n    {\n      \"id\": 1387,\n      \"challenge_id\": 466,\n      \"contact_id\": 584,\n      \"responses\": [],\n      \"prospects\": [],\n      \"links\": {\n        \"approve\": {\n          \"href\": \"/approvals/1387/decision/approve\"\n        },\n        \"reject\": {\n          \"href\": \"/approvals/1387/decision/reject\"\n        },\n        \"feedback_only\": {\n          \"href\": \"/approvals/1387/decision/feedback_only\"\n        },\n        \"redo-1\": {\n          \"href\": \"/approvals/1387/decision/redo/2452\",\n          \"meta\": {\n            \"description\": \"Send the advocate back 1 stage\",\n            \"stage_type\": \"Advocate Acceptance\"\n          }\n        }\n      }\n    }\n  ],\n  \"contacts\": [\n    {\n      \"id\": 73,\n      \"name\": \"Influitive AdminWaldo\",\n      \"first_name\": \"Influitive\",\n      \"last_name\": \"AdminWaldo\",\n      \"email\": \"admin+xx@influitive.com\",\n      \"title\": \"VP of Product\",\n      \"company\": \"Canipsole\",\n      \"uuid\": \"c0649445-9c3c-42da-b5d5-e7ce9c3a8393\",\n      \"type\": \"Corporate\",\n      \"created_at\": \"2011-08-28T17:53:50.159Z\",\n      \"joined_at\": \"2011-08-28T00:09:29.172Z\",\n      \"nps_score\": 7,\n      \"current_points\": 81041,\n      \"lifetime_points\": 83493,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 2,\n        \"name\": \"Advocate\"\n      }\n    },\n    {\n      \"id\": 584,\n      \"name\": \"Patrick Priestley\",\n      \"first_name\": \"Patrick\",\n      \"last_name\": \"Priestley\",\n      \"email\": \"patrick+ceo@influitive.com\",\n      \"title\": \"CEO\",\n      \"company\": \"\",\n      \"uuid\": \"3c09423e-8ecc-4c26-851f-73d5ff2dc6dc\",\n      \"type\": \"Advocate\",\n      \"created_at\": \"2015-07-29T07:00:50.686Z\",\n      \"joined_at\": \"2015-08-12T17:33:28.310Z\",\n      \"nps_score\": null,\n      \"current_points\": 500,\n      \"lifetime_points\": 500,\n      \"crm_contact_id\": \"003i000002MOPXlAAP\",\n      \"level\": {\n        \"id\": 2,\n        \"name\": \"Advocate\"\n      }\n    }\n  ],\n  \"challenges\": [\n    {\n      \"id\": 218,\n      \"name\": \"Testimonials\",\n      \"headline\": \"Be a superstar!\",\n      \"description\": \"You're fantastic and we want to feature you! Let us know how our product helps you get your job done, and your quote may be featured on our website or newsletter!\"\n    },\n    {\n      \"id\": 143,\n      \"name\": \"Testing the Chosen Selects not working\",\n      \"headline\": \"Testing the Chosen Selects not working\",\n      \"description\": null\n    },\n    {\n      \"id\": 466,\n      \"name\": \"chia\",\n      \"headline\": \"chia\",\n      \"description\": \"\"\n    }\n  ]\n}","language":"json","status":200},{"language":"json","status":400,"name":"","code":"{}"}]}},"isReference":true,"link_url":"","order":0,"user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","githubsync":"","body":"Retrieve all the challenges that need to be approved:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /approvals HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response.  Responses to questions on previous stages will be returned inside the response.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\\"approvals\\\": [\\n    {\\n      \\\"id\\\": 778,\\n      \\\"challenge_id\\\": 218,\\n      \\\"contact_id\\\": 73,\\n      \\\"responses\\\": [\\n        {\\n          \\\"question_id\\\": 1117,\\n          \\\"body\\\": \\\"It was great!\\\",\\n          \\\"subject\\\": \\\"Tell us about your experience!\\\"\\n        }\\n      ],\\n      \\\"prospects\\\": [],\\n      \\\"links\\\": {\\n        \\\"approve\\\": {\\n          \\\"href\\\": \\\"/approvals/778/decision/approve\\\"\\n        },\\n        \\\"reject\\\": {\\n          \\\"href\\\": \\\"/approvals/778/decision/reject\\\"\\n        },\\n        \\\"feedback_only\\\": {\\n          \\\"href\\\": \\\"/approvals/778/decision/feedback_only\\\"\\n        },\\n        \\\"redo-1\\\": {\\n          \\\"href\\\": \\\"/approvals/778/decision/redo/2092\\\",\\n          \\\"meta\\\": {\\n            \\\"description\\\": \\\"Send the advocate back 1 stage\\\",\\n            \\\"stage_type\\\": \\\"Corporate Confirmation\\\"\\n          }\\n        },\\n        \\\"redo-2\\\": {\\n          \\\"href\\\": \\\"/approvals/778/decision/redo/2091\\\",\\n          \\\"meta\\\": {\\n            \\\"description\\\": \\\"Send the advocate back 2 stages\\\",\\n            \\\"stage_type\\\": \\\"Questions\\\"\\n          }\\n        }\\n      }\\n    },\\n    {\\n      \\\"id\\\": 862,\\n      \\\"challenge_id\\\": 143,\\n      \\\"contact_id\\\": 73,\\n      \\\"responses\\\": [\\n        {\\n          \\\"question_id\\\": 976,\\n          \\\"body\\\": \\\"Advocate in this challenge\\\",\\n          \\\"subject\\\": \\\"This is an awesome challenge.\\\"\\n        }\\n      ],\\n      \\\"prospects\\\": [],\\n      \\\"links\\\": {\\n        \\\"approve\\\": {\\n          \\\"href\\\": \\\"/approvals/862/decision/approve\\\"\\n        },\\n        \\\"reject\\\": {\\n          \\\"href\\\": \\\"/approvals/862/decision/reject\\\"\\n        },\\n        \\\"feedback_only\\\": {\\n          \\\"href\\\": \\\"/approvals/862/decision/feedback_only\\\"\\n        },\\n        \\\"redo-1\\\": {\\n          \\\"href\\\": \\\"/approvals/862/decision/redo/1564\\\",\\n          \\\"meta\\\": {\\n            \\\"description\\\": \\\"Send the advocate back 1 stage\\\",\\n            \\\"stage_type\\\": \\\"Questions\\\"\\n          }\\n        },\\n        \\\"redo-2\\\": {\\n          \\\"href\\\": \\\"/approvals/862/decision/redo/1563\\\",\\n          \\\"meta\\\": {\\n            \\\"description\\\": \\\"Send the advocate back 2 stages\\\",\\n            \\\"stage_type\\\": \\\"Advocate Acceptance\\\"\\n          }\\n        }\\n      }\\n    },\\n    {\\n      \\\"id\\\": 1387,\\n      \\\"challenge_id\\\": 466,\\n      \\\"contact_id\\\": 584,\\n      \\\"responses\\\": [],\\n      \\\"prospects\\\": [],\\n      \\\"links\\\": {\\n        \\\"approve\\\": {\\n          \\\"href\\\": \\\"/approvals/1387/decision/approve\\\"\\n        },\\n        \\\"reject\\\": {\\n          \\\"href\\\": \\\"/approvals/1387/decision/reject\\\"\\n        },\\n        \\\"feedback_only\\\": {\\n          \\\"href\\\": \\\"/approvals/1387/decision/feedback_only\\\"\\n        },\\n        \\\"redo-1\\\": {\\n          \\\"href\\\": \\\"/approvals/1387/decision/redo/2452\\\",\\n          \\\"meta\\\": {\\n            \\\"description\\\": \\\"Send the advocate back 1 stage\\\",\\n            \\\"stage_type\\\": \\\"Advocate Acceptance\\\"\\n          }\\n        }\\n      }\\n    }\\n  ],\\n  \\\"contacts\\\": [\\n    {\\n      \\\"id\\\": 73,\\n      \\\"name\\\": \\\"Influitive AdminWaldo\\\",\\n      \\\"first_name\\\": \\\"Influitive\\\",\\n      \\\"last_name\\\": \\\"AdminWaldo\\\",\\n      \\\"email\\\": \\\"admin+xx@influitive.com\\\",\\n      \\\"title\\\": \\\"VP of Product\\\",\\n      \\\"company\\\": \\\"Canipsole\\\",\\n      \\\"uuid\\\": \\\"c0649445-9c3c-42da-b5d5-e7ce9c3a8393\\\",\\n      \\\"type\\\": \\\"Corporate\\\",\\n      \\\"created_at\\\": \\\"2011-08-28T17:53:50.159Z\\\",\\n      \\\"joined_at\\\": \\\"2011-08-28T00:09:29.172Z\\\",\\n      \\\"nps_score\\\": 7,\\n      \\\"current_points\\\": 81041,\\n      \\\"lifetime_points\\\": 83493,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 2,\\n        \\\"name\\\": \\\"Advocate\\\"\\n      }\\n    },\\n    {\\n      \\\"id\\\": 584,\\n      \\\"name\\\": \\\"Patrick Priestley\\\",\\n      \\\"first_name\\\": \\\"Patrick\\\",\\n      \\\"last_name\\\": \\\"Priestley\\\",\\n      \\\"email\\\": \\\"patrick+ceo@influitive.com\\\",\\n      \\\"title\\\": \\\"CEO\\\",\\n      \\\"company\\\": \\\"\\\",\\n      \\\"uuid\\\": \\\"3c09423e-8ecc-4c26-851f-73d5ff2dc6dc\\\",\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"created_at\\\": \\\"2015-07-29T07:00:50.686Z\\\",\\n      \\\"joined_at\\\": \\\"2015-08-12T17:33:28.310Z\\\",\\n      \\\"nps_score\\\": null,\\n      \\\"current_points\\\": 500,\\n      \\\"lifetime_points\\\": 500,\\n      \\\"crm_contact_id\\\": \\\"003i000002MOPXlAAP\\\",\\n      \\\"level\\\": {\\n        \\\"id\\\": 2,\\n        \\\"name\\\": \\\"Advocate\\\"\\n      }\\n    }\\n  ],\\n  \\\"challenges\\\": [\\n    {\\n      \\\"id\\\": 218,\\n      \\\"name\\\": \\\"Testimonials\\\",\\n      \\\"headline\\\": \\\"Be a superstar!\\\",\\n      \\\"description\\\": \\\"You're fantastic and we want to feature you! Let us know how our product helps you get your job done, and your quote may be featured on our website or newsletter!\\\"\\n    },\\n    {\\n      \\\"id\\\": 143,\\n      \\\"name\\\": \\\"Testing the Chosen Selects not working\\\",\\n      \\\"headline\\\": \\\"Testing the Chosen Selects not working\\\",\\n      \\\"description\\\": null\\n    },\\n    {\\n      \\\"id\\\": 466,\\n      \\\"name\\\": \\\"chia\\\",\\n      \\\"headline\\\": \\\"chia\\\",\\n      \\\"description\\\": \\\"\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"5782e140a9e63b0e00e5adf7","createdAt":"2016-07-10T23:59:58.732Z","slug":"retrieve-challenges-needed-to-be-approved","sync_unique":"","title":"Get challenges to approve","__v":9,"link_external":false,"type":"get","updates":[],"hidden":false,"childrenPages":[]}

getGet challenges to approve


Retrieve all the challenges that need to be approved: [block:code] { "codes": [ { "code": "GET /approvals HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response. Responses to questions on previous stages will be returned inside the response. [block:code] { "codes": [ { "code": "{\n\"approvals\": [\n {\n \"id\": 778,\n \"challenge_id\": 218,\n \"contact_id\": 73,\n \"responses\": [\n {\n \"question_id\": 1117,\n \"body\": \"It was great!\",\n \"subject\": \"Tell us about your experience!\"\n }\n ],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/778/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/778/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/778/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/778/decision/redo/2092\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Corporate Confirmation\"\n }\n },\n \"redo-2\": {\n \"href\": \"/approvals/778/decision/redo/2091\",\n \"meta\": {\n \"description\": \"Send the advocate back 2 stages\",\n \"stage_type\": \"Questions\"\n }\n }\n }\n },\n {\n \"id\": 862,\n \"challenge_id\": 143,\n \"contact_id\": 73,\n \"responses\": [\n {\n \"question_id\": 976,\n \"body\": \"Advocate in this challenge\",\n \"subject\": \"This is an awesome challenge.\"\n }\n ],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/862/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/862/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/862/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/862/decision/redo/1564\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Questions\"\n }\n },\n \"redo-2\": {\n \"href\": \"/approvals/862/decision/redo/1563\",\n \"meta\": {\n \"description\": \"Send the advocate back 2 stages\",\n \"stage_type\": \"Advocate Acceptance\"\n }\n }\n }\n },\n {\n \"id\": 1387,\n \"challenge_id\": 466,\n \"contact_id\": 584,\n \"responses\": [],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/1387/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/1387/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/1387/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/1387/decision/redo/2452\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Advocate Acceptance\"\n }\n }\n }\n }\n ],\n \"contacts\": [\n {\n \"id\": 73,\n \"name\": \"Influitive AdminWaldo\",\n \"first_name\": \"Influitive\",\n \"last_name\": \"AdminWaldo\",\n \"email\": \"admin+xx@influitive.com\",\n \"title\": \"VP of Product\",\n \"company\": \"Canipsole\",\n \"uuid\": \"c0649445-9c3c-42da-b5d5-e7ce9c3a8393\",\n \"type\": \"Corporate\",\n \"created_at\": \"2011-08-28T17:53:50.159Z\",\n \"joined_at\": \"2011-08-28T00:09:29.172Z\",\n \"nps_score\": 7,\n \"current_points\": 81041,\n \"lifetime_points\": 83493,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n {\n \"id\": 584,\n \"name\": \"Patrick Priestley\",\n \"first_name\": \"Patrick\",\n \"last_name\": \"Priestley\",\n \"email\": \"patrick+ceo@influitive.com\",\n \"title\": \"CEO\",\n \"company\": \"\",\n \"uuid\": \"3c09423e-8ecc-4c26-851f-73d5ff2dc6dc\",\n \"type\": \"Advocate\",\n \"created_at\": \"2015-07-29T07:00:50.686Z\",\n \"joined_at\": \"2015-08-12T17:33:28.310Z\",\n \"nps_score\": null,\n \"current_points\": 500,\n \"lifetime_points\": 500,\n \"crm_contact_id\": \"003i000002MOPXlAAP\",\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n }\n ],\n \"challenges\": [\n {\n \"id\": 218,\n \"name\": \"Testimonials\",\n \"headline\": \"Be a superstar!\",\n \"description\": \"You're fantastic and we want to feature you! Let us know how our product helps you get your job done, and your quote may be featured on our website or newsletter!\"\n },\n {\n \"id\": 143,\n \"name\": \"Testing the Chosen Selects not working\",\n \"headline\": \"Testing the Chosen Selects not working\",\n \"description\": null\n },\n {\n \"id\": 466,\n \"name\": \"chia\",\n \"headline\": \"chia\",\n \"description\": \"\"\n }\n ]\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Retrieve all the challenges that need to be approved: [block:code] { "codes": [ { "code": "GET /approvals HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response. Responses to questions on previous stages will be returned inside the response. [block:code] { "codes": [ { "code": "{\n\"approvals\": [\n {\n \"id\": 778,\n \"challenge_id\": 218,\n \"contact_id\": 73,\n \"responses\": [\n {\n \"question_id\": 1117,\n \"body\": \"It was great!\",\n \"subject\": \"Tell us about your experience!\"\n }\n ],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/778/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/778/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/778/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/778/decision/redo/2092\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Corporate Confirmation\"\n }\n },\n \"redo-2\": {\n \"href\": \"/approvals/778/decision/redo/2091\",\n \"meta\": {\n \"description\": \"Send the advocate back 2 stages\",\n \"stage_type\": \"Questions\"\n }\n }\n }\n },\n {\n \"id\": 862,\n \"challenge_id\": 143,\n \"contact_id\": 73,\n \"responses\": [\n {\n \"question_id\": 976,\n \"body\": \"Advocate in this challenge\",\n \"subject\": \"This is an awesome challenge.\"\n }\n ],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/862/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/862/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/862/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/862/decision/redo/1564\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Questions\"\n }\n },\n \"redo-2\": {\n \"href\": \"/approvals/862/decision/redo/1563\",\n \"meta\": {\n \"description\": \"Send the advocate back 2 stages\",\n \"stage_type\": \"Advocate Acceptance\"\n }\n }\n }\n },\n {\n \"id\": 1387,\n \"challenge_id\": 466,\n \"contact_id\": 584,\n \"responses\": [],\n \"prospects\": [],\n \"links\": {\n \"approve\": {\n \"href\": \"/approvals/1387/decision/approve\"\n },\n \"reject\": {\n \"href\": \"/approvals/1387/decision/reject\"\n },\n \"feedback_only\": {\n \"href\": \"/approvals/1387/decision/feedback_only\"\n },\n \"redo-1\": {\n \"href\": \"/approvals/1387/decision/redo/2452\",\n \"meta\": {\n \"description\": \"Send the advocate back 1 stage\",\n \"stage_type\": \"Advocate Acceptance\"\n }\n }\n }\n }\n ],\n \"contacts\": [\n {\n \"id\": 73,\n \"name\": \"Influitive AdminWaldo\",\n \"first_name\": \"Influitive\",\n \"last_name\": \"AdminWaldo\",\n \"email\": \"admin+xx@influitive.com\",\n \"title\": \"VP of Product\",\n \"company\": \"Canipsole\",\n \"uuid\": \"c0649445-9c3c-42da-b5d5-e7ce9c3a8393\",\n \"type\": \"Corporate\",\n \"created_at\": \"2011-08-28T17:53:50.159Z\",\n \"joined_at\": \"2011-08-28T00:09:29.172Z\",\n \"nps_score\": 7,\n \"current_points\": 81041,\n \"lifetime_points\": 83493,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n {\n \"id\": 584,\n \"name\": \"Patrick Priestley\",\n \"first_name\": \"Patrick\",\n \"last_name\": \"Priestley\",\n \"email\": \"patrick+ceo@influitive.com\",\n \"title\": \"CEO\",\n \"company\": \"\",\n \"uuid\": \"3c09423e-8ecc-4c26-851f-73d5ff2dc6dc\",\n \"type\": \"Advocate\",\n \"created_at\": \"2015-07-29T07:00:50.686Z\",\n \"joined_at\": \"2015-08-12T17:33:28.310Z\",\n \"nps_score\": null,\n \"current_points\": 500,\n \"lifetime_points\": 500,\n \"crm_contact_id\": \"003i000002MOPXlAAP\",\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n }\n ],\n \"challenges\": [\n {\n \"id\": 218,\n \"name\": \"Testimonials\",\n \"headline\": \"Be a superstar!\",\n \"description\": \"You're fantastic and we want to feature you! Let us know how our product helps you get your job done, and your quote may be featured on our website or newsletter!\"\n },\n {\n \"id\": 143,\n \"name\": \"Testing the Chosen Selects not working\",\n \"headline\": \"Testing the Chosen Selects not working\",\n \"description\": null\n },\n {\n \"id\": 466,\n \"name\": \"chia\",\n \"headline\": \"chia\",\n \"description\": \"\"\n }\n ]\n}", "language": "json" } ] } [/block]
{"_id":"5782e1a60d51ec0e00c64693","editedParams2":true,"excerpt":"","isReference":true,"link_url":"","parentDoc":null,"slug":"approvereject-challenge-activities","category":"5782e140a9e63b0e00e5adf7","editedParams":true,"order":1,"updates":[],"user":"54afec2fed9ada1400afbf85","api":{"url":"/approvals/:id/decision/:action","auth":"required","examples":{"codes":[{"language":"json","code":"POST /approvals/123/decision/approve HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"post","params":[{"_id":"5782e6079ba6ea0e0078740a","ref":"","in":"path","required":true,"desc":"id of the challenge approval request","default":"","type":"int","name":"id"},{"_id":"5782e6079ba6ea0e00787409","ref":"","in":"path","required":true,"desc":"approve, reject, or feedback_only","default":"","type":"string","name":"action"},{"_id":"5782e6079ba6ea0e00787408","ref":"","in":"body","required":false,"desc":"optional feedback for the advocate","default":"","type":"string","name":"feedback"}],"results":{"codes":[{"status":200,"language":"json","code":"200","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"createdAt":"2016-07-11T00:00:38.441Z","title":"Approve/Reject challenge activities","type":"post","version":"5640b1fe2b14f70d0039b8b0","sync_unique":"","__v":2,"body":"Give an action on an existing challenge activity requiring your approval:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /approvals/123/decision/approve HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/vnd.infl-v3+json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"200\",\n      \"language\": \"json\",\n      \"name\": \"200\"\n    }\n  ]\n}\n[/block]","githubsync":"","hidden":false,"link_external":false,"project":"5640b1fd2b14f70d0039b8ad","next":{"description":"","pages":[]},"childrenPages":[]}

postApprove/Reject challenge activities


Path Params

id:
required
integer
id of the challenge approval request
action:
required
string
approve, reject, or feedback_only

Body Params

feedback:
string
optional feedback for the advocate
Give an action on an existing challenge activity requiring your approval: [block:code] { "codes": [ { "code": "POST /approvals/123/decision/approve HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "200", "language": "json", "name": "200" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Give an action on an existing challenge activity requiring your approval: [block:code] { "codes": [ { "code": "POST /approvals/123/decision/approve HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "200", "language": "json", "name": "200" } ] } [/block]
{"_id":"5782e1c29ba6ea0e007873fe","order":2,"parentDoc":null,"version":"5640b1fe2b14f70d0039b8b0","isReference":true,"link_url":"","type":"post","createdAt":"2016-07-11T00:01:06.097Z","editedParams":true,"editedParams2":true,"hidden":false,"slug":"undo-a-challenge-activity","title":"Redo a previous stage","user":"54afec2fed9ada1400afbf85","category":"5782e140a9e63b0e00e5adf7","githubsync":"","excerpt":"","link_external":false,"project":"5640b1fd2b14f70d0039b8ad","sync_unique":"","updates":[],"__v":3,"api":{"url":"/approvals/:id/decision/redo/:redo_stage_id","auth":"required","examples":{"codes":[{"language":"json","code":"POST /approvals/123/decision/redo/12341 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"post","params":[{"_id":"5782e8d70d51ec0e00c646a2","ref":"","in":"path","required":true,"desc":"id for the challenge activity that is requiring your approval","default":"","type":"int","name":"id"},{"_id":"5782e8d70d51ec0e00c646a1","ref":"","in":"path","required":true,"desc":"stage that the member is to be moved back to","default":"","type":"int","name":"redo_stage_id"},{"_id":"5782e8d70d51ec0e00c646a0","ref":"","in":"body","required":false,"desc":"optional feedback given to the member","default":"","type":"string","name":"feedback"}],"results":{"codes":[{"language":"json","code":"200","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":""},"body":"Ask a member to retry a particular stage within a challenge\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /approvals/123/decision/redo/12341 HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/vnd.infl-v3+json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"200\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","next":{"description":"","pages":[]},"childrenPages":[]}

postRedo a previous stage


Path Params

id:
required
integer
id for the challenge activity that is requiring your approval
redo_stage_id:
required
integer
stage that the member is to be moved back to

Body Params

feedback:
string
optional feedback given to the member
Ask a member to retry a particular stage within a challenge [block:code] { "codes": [ { "code": "POST /approvals/123/decision/redo/12341 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "200", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Ask a member to retry a particular stage within a challenge [block:code] { "codes": [ { "code": "POST /approvals/123/decision/redo/12341 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "200", "language": "json" } ] } [/block]
{"_id":"5782e2169ba6ea0e00787400","hidden":false,"order":0,"title":"Retrieve rewards redeemed by members","updates":[],"excerpt":"","body":"Retrieve reward redemptions that require fulfillment:\n\nAlternatively, you may want to use a webhook to post `redeemed_reward` and `reward_redemption_requested` events to address fulfillment in real time.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /reward_redemptions HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nReturns the following response.  Responses to embedded questions on the reward and shipping address would be returned inside the response.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"reward_redemptions\\\": [\\n    {\\n      \\\"id\\\": 22,\\n      \\\"reward_id\\\": 5,\\n      \\\"contact_id\\\": 261,\\n      \\\"responses\\\": [],\\n      \\\"address\\\": null\\n    },\\n    {...}\\n  ],\\n  \\\"contacts\\\": [\\n    {\\n      \\\"id\\\": 261,\\n      \\\"name\\\": \\\"Alice Advocate\\\",\\n      \\\"first_name\\\": \\\"Alice\\\",\\n      \\\"last_name\\\": \\\"Advocate\\\",\\n      \\\"email\\\": \\\"alice.advocate@gmail.com\\\",\\n      \\\"title\\\": \\\"VP of snoring\\\",\\n      \\\"company\\\": \\\"Company Co\\\",\\n      \\\"uuid\\\": \\\"7901d702-3710-441c-bc70-6df78049ff3b\\\",\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"created_at\\\": \\\"2013-08-20T15:20:40.072Z\\\",\\n      \\\"joined_at\\\": \\\"2013-08-20T15:20:40.117Z\\\",\\n      \\\"nps_score\\\": 9,\\n      \\\"current_points\\\": 43126,\\n      \\\"lifetime_points\\\": 44728,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 2,\\n        \\\"name\\\": \\\"Advocate\\\"\\n      }\\n    },\\n    \\n    {...}\\n  ],\\n  \\\"rewards\\\": [\\n    {\\n      \\\"id\\\": 5,\\n      \\\"description\\\": \\\"TEst\\\"\\n    },\\n    {\\n      \\\"id\\\": 10,\\n      \\\"description\\\": \\\"blah\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"5782e16389ad100e00ab3e5c","isReference":true,"parentDoc":null,"slug":"retrieve-rewards-redeemed-by-members","type":"get","user":"54afec2fed9ada1400afbf85","__v":15,"githubsync":"","link_external":false,"project":"5640b1fd2b14f70d0039b8ad","sync_unique":"","createdAt":"2016-07-11T00:02:30.014Z","api":{"auth":"required","examples":{"codes":[{"language":"json","code":"GET /reward_redemptions HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"reward_redemptions\": [\n    {\n            \"id\": 259,\n            \"reward_id\": 80,\n            \"contact_id\": 261,\n            \"responses\": [\n                {\n                    \"question_id\": 210,\n                    \"body\": \"Advocamp Hoodie (size: S)\",\n                    \"subject\": \"Options\"\n                }\n            ],\n            \"address\": {\n                \"address\": \"736 DeRoscher Avenue\",\n                \"address_2\": \"Suite 507\",\n                \"city\": \"Toronto\",\n                \"state\": \"ON\",\n                \"country\": \"Canada\",\n                \"zip\": \"M5X 2R6\"\n            }\n        },\n    {...}\n    ],\n  \"contacts\": [\n    {\n      \"id\": 261,\n      \"name\": \"Alice Advocate\",\n      \"first_name\": \"Alice\",\n      \"last_name\": \"Advocate\",\n      \"email\": \"alice.advocate@gmail.com\",\n      \"title\": \"VP of snoring\",\n      \"company\": \"Company Co\",\n      \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n      \"type\": \"Advocate\",\n      \"created_at\": \"2013-08-20T15:20:40.072Z\",\n      \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n      \"nps_score\": 9,\n      \"current_points\": 43126,\n      \"lifetime_points\": 44728,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 2,\n        \"name\": \"Advocate\"\n      }\n    },\n    \n    {...}\n  ],\n  \"rewards\": [\n    {\n      \"id\": 80,\n      \"description\": \"Happy Influitive Anniversary!  Thanks for staying with us over the years.\"\n        },\n    {...}\n  ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/reward_redemptions"},"link_url":"","version":"5640b1fe2b14f70d0039b8b0","next":{"description":"","pages":[]},"childrenPages":[]}

getRetrieve rewards redeemed by members


Retrieve reward redemptions that require fulfillment: Alternatively, you may want to use a webhook to post `redeemed_reward` and `reward_redemption_requested` events to address fulfillment in real time. [block:code] { "codes": [ { "code": "GET /reward_redemptions HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns the following response. Responses to embedded questions on the reward and shipping address would be returned inside the response. [block:code] { "codes": [ { "code": "{\n \"reward_redemptions\": [\n {\n \"id\": 22,\n \"reward_id\": 5,\n \"contact_id\": 261,\n \"responses\": [],\n \"address\": null\n },\n {...}\n ],\n \"contacts\": [\n {\n \"id\": 261,\n \"name\": \"Alice Advocate\",\n \"first_name\": \"Alice\",\n \"last_name\": \"Advocate\",\n \"email\": \"alice.advocate@gmail.com\",\n \"title\": \"VP of snoring\",\n \"company\": \"Company Co\",\n \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n \"type\": \"Advocate\",\n \"created_at\": \"2013-08-20T15:20:40.072Z\",\n \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n \"nps_score\": 9,\n \"current_points\": 43126,\n \"lifetime_points\": 44728,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n \n {...}\n ],\n \"rewards\": [\n {\n \"id\": 5,\n \"description\": \"TEst\"\n },\n {\n \"id\": 10,\n \"description\": \"blah\"\n }\n ]\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Retrieve reward redemptions that require fulfillment: Alternatively, you may want to use a webhook to post `redeemed_reward` and `reward_redemption_requested` events to address fulfillment in real time. [block:code] { "codes": [ { "code": "GET /reward_redemptions HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns the following response. Responses to embedded questions on the reward and shipping address would be returned inside the response. [block:code] { "codes": [ { "code": "{\n \"reward_redemptions\": [\n {\n \"id\": 22,\n \"reward_id\": 5,\n \"contact_id\": 261,\n \"responses\": [],\n \"address\": null\n },\n {...}\n ],\n \"contacts\": [\n {\n \"id\": 261,\n \"name\": \"Alice Advocate\",\n \"first_name\": \"Alice\",\n \"last_name\": \"Advocate\",\n \"email\": \"alice.advocate@gmail.com\",\n \"title\": \"VP of snoring\",\n \"company\": \"Company Co\",\n \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n \"type\": \"Advocate\",\n \"created_at\": \"2013-08-20T15:20:40.072Z\",\n \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n \"nps_score\": 9,\n \"current_points\": 43126,\n \"lifetime_points\": 44728,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n \n {...}\n ],\n \"rewards\": [\n {\n \"id\": 5,\n \"description\": \"TEst\"\n },\n {\n \"id\": 10,\n \"description\": \"blah\"\n }\n ]\n}", "language": "json" } ] } [/block]
{"_id":"5782e22c6f3e0e0e004768eb","hidden":false,"__v":5,"api":{"settings":"","url":"/reward_redemptions/:id/decision/:action","auth":"required","examples":{"codes":[{"language":"json","code":"POST /reward_redemptions/123/decision/fulfill HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n  \"message\": \"Your reward has been shipped\"\n}"}]},"method":"post","params":[{"desc":"","default":"","type":"int","name":"id","in":"path","_id":"5782eb960d51ec0e00c646a6","ref":"","required":true},{"name":"action","in":"path","_id":"5782eb960d51ec0e00c646a5","ref":"","required":true,"desc":"fulfill or refuse","default":"","type":"string"},{"desc":"optionally add a message to the member for this transaction","default":"","type":"string","name":"message","in":"body","_id":"5782ebc789ad100e00ab3e6c","ref":"","required":false}],"results":{"codes":[{"status":200,"language":"json","code":"200\n   ","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /reward_redemptions/123/decision/fulfill HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n  \\\"message\\\": \\\"Your reward has been shipped\\\"\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"200\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"title":"Fulfill or Refuse a reward redemptions","updates":[],"category":"5782e16389ad100e00ab3e5c","excerpt":"","githubsync":"","link_external":false,"sync_unique":"","user":"54afec2fed9ada1400afbf85","createdAt":"2016-07-11T00:02:52.754Z","link_url":"","parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","slug":"approvereject-reward","type":"post","version":"5640b1fe2b14f70d0039b8b0","editedParams":true,"isReference":true,"order":1,"childrenPages":[]}

postFulfill or Refuse a reward redemptions


Path Params

id:
required
integer
action:
required
string
fulfill or refuse

Body Params

message:
string
optionally add a message to the member for this transaction
Lorem ipsum dolor sit amet, consectetur adipiscing elit. [block:code] { "codes": [ { "code": "POST /reward_redemptions/123/decision/fulfill HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"message\": \"Your reward has been shipped\"\n}", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "200", "language": "json", "name": "200 OK" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Lorem ipsum dolor sit amet, consectetur adipiscing elit. [block:code] { "codes": [ { "code": "POST /reward_redemptions/123/decision/fulfill HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"message\": \"Your reward has been shipped\"\n}", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "200", "language": "json", "name": "200 OK" } ] } [/block]
{"_id":"56e84ae2c59c4a0e00d5d016","createdAt":"2016-03-15T17:48:18.958Z","githubsync":"","link_url":"","title":"Logging a topic reply","version":"5640b1fe2b14f70d0039b8b0","__v":9,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating a \\\"Reply to topic\\\" stage\"\n}\n[/block]\nTo log a reply on a discussion on an external community and complete the challenge through the API, first you must create a challenge using a \"Reply to a community Topic\" stage:\n\n1. In the list of stages of a challenge, choose \"Reply to a community topic\"\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fnyEUoKqR8C4Oihuy0lB_Screen%20Shot%202016-03-16%20at%204.44.33%20PM.png\",\n        \"Screen Shot 2016-03-16 at 4.44.33 PM.png\",\n        \"1842\",\n        \"950\",\n        \"#efefef\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n2. Specify the URL of the topic that is in need of response.  Note that the URL of the topic needs to be the same URL as specified in the API call back to Influitive to automatically complete the challenge.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/m7PIXsgeTW0NjxzsAz9R_Screen%20Shot%202016-03-16%20at%203.35.07%20PM.png\",\n        \"Screen Shot 2016-03-16 at 3.35.07 PM.png\",\n        \"1612\",\n        \"1298\",\n        \"#356a8b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Logging a topic reply through the API\"\n}\n[/block]\nHere is a format of an API call in order to complete a \"Reply to a topic\" stage within the AdvocateHub.  Please note that the Discussion[url] needs to match the URL of the discussion added to the stage.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /community/discussion/reply HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/vnd.infl-v3+json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n\\n{   \\\"provider\\\":\\\"External Community\\\" ,\\n    \\\"external_id\\\": \\\"\\\" ,\\n    \\\"url\\\": \\\"\\\",\\n    \\\"content\\\": \\\"I love your product\\\",\\n    \\\"body\\\": \\\"\\\",\\n    \\\"advocate\\\": \\n        {\\n            \\\"id\\\":\\\"\\\" ,\\n            \\\"email\\\": \\\"steveadvocate@acme.com\\\"\\n        },\\n    \\\"notification\\\":\\n        {\\n            \\\"advocates\\\":\\n                {\\n                    \\\"ids\\\":[\\\"\\\",\\\"\\\",],\\n                    \\\"emails\\\": [\\\"\\\",\\\"\\\"]\\n                }\\n        },\\n    \\\"discussion\\\":\\n        {\\n            \\\"external_id\\\": \\\"1348\\\",\\n            \\\"url\\\": \\\"http://customercommunity.com/discussion/1348\\\",\\n            \\\"content\\\": \\\"\\\"\\n        }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Gotchas\",\n  \"body\": \"The email address for the author of the community reply must match with the existing advocate in the AdvocateHub to progress the challenge.\"\n}\n[/block]","slug":"logging-a-topic-reply","user":"54afec2fed9ada1400afbf85","excerpt":"","isReference":true,"editedParams":true,"project":"5640b1fd2b14f70d0039b8ad","updates":[],"api":{"results":{"codes":[{"language":"json","code":"\n\"1dc6c0fd4a02cd4f30023d1e\"\n","name":"","status":201},{"status":401,"language":"json","code":"{}","name":""}]},"settings":"56410453a6a9e90d008d8120","url":"/community/discussion/reply","auth":"required","examples":{"codes":[{"code":"POST /community/discussion/reply HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{   \"provider\":\"External Community\" ,\n    \"external_id\": \"\" ,\n    \"url\": \"\",\n    \"content\": \"I love your product\",\n    \"body\": \"\",\n    \"advocate\": \n        {\n            \"id\":\"\" ,\n            \"email\": \"steveadvocate@acme.com\"\n        },\n    \"notification\":\n        {\n            \"advocates\":\n                {\n                    \"ids\":[\"\",\"\"],\n                    \"emails\": [\"\",\"\"]\n                }\n        },\n    \"discussion\":\n        {\n            \"external_id\": \"1348\",\n            \"url\": \"http://customercommunity.com/discussion/1348\",\n            \"content\": \"\"\n        }\n}","language":"json"}]},"method":"post","params":[{"in":"body","_id":"56e84d12c59c4a0e00d5d029","default":"Ie. \"External Community\"","desc":"Indicates the source of the community discussion.","name":"provider","ref":"","required":true,"type":"string"},{"type":"object","in":"body","_id":"56e84d12c59c4a0e00d5d024","default":"","desc":"One of id or email is required.","name":"advocate","ref":"","required":true},{"ref":"","required":true,"type":"object","in":"body","_id":"56e84d12c59c4a0e00d5d022","default":"","desc":"Details around the discussion.  url, and external_id is required.","name":"discussion"},{"_id":"56e84d12c59c4a0e00d5d026","default":"","desc":"","name":"content","ref":"","required":true,"type":"string","in":"body"},{"in":"body","_id":"56e84d12c59c4a0e00d5d028","ref":"","required":false,"desc":"","default":"","type":"string","name":"external_id"},{"ref":"","required":false,"desc":"","default":"","type":"string","name":"url","in":"body","_id":"56e84d12c59c4a0e00d5d027"},{"type":"string","name":"body","in":"body","_id":"56e84d12c59c4a0e00d5d025","ref":"","required":false,"desc":"","default":""},{"type":"object","name":"notification","in":"body","_id":"56e84d12c59c4a0e00d5d023","ref":"","required":false,"desc":"","default":""}]},"category":"56e849b7efde930e0040789c","hidden":false,"link_external":false,"order":0,"parentDoc":null,"sync_unique":"","type":"post","editedParams2":true,"childrenPages":[]}

postLogging a topic reply


Body Params

provider:
required
stringIe. "External Community"
Indicates the source of the community discussion.
advocate:
required
object
One of id or email is required.
discussion:
required
object
Details around the discussion. url, and external_id is required.
content:
required
string
external_id:
string
url:
string
body:
string
notification:
object
[block:api-header] { "type": "basic", "title": "Creating a \"Reply to topic\" stage" } [/block] To log a reply on a discussion on an external community and complete the challenge through the API, first you must create a challenge using a "Reply to a community Topic" stage: 1. In the list of stages of a challenge, choose "Reply to a community topic" [block:image] { "images": [ { "image": [ "https://files.readme.io/fnyEUoKqR8C4Oihuy0lB_Screen%20Shot%202016-03-16%20at%204.44.33%20PM.png", "Screen Shot 2016-03-16 at 4.44.33 PM.png", "1842", "950", "#efefef", "" ] } ] } [/block] 2. Specify the URL of the topic that is in need of response. Note that the URL of the topic needs to be the same URL as specified in the API call back to Influitive to automatically complete the challenge. [block:image] { "images": [ { "image": [ "https://files.readme.io/m7PIXsgeTW0NjxzsAz9R_Screen%20Shot%202016-03-16%20at%203.35.07%20PM.png", "Screen Shot 2016-03-16 at 3.35.07 PM.png", "1612", "1298", "#356a8b", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Logging a topic reply through the API" } [/block] Here is a format of an API call in order to complete a "Reply to a topic" stage within the AdvocateHub. Please note that the Discussion[url] needs to match the URL of the discussion added to the stage. [block:code] { "codes": [ { "code": "POST /community/discussion/reply HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{ \"provider\":\"External Community\" ,\n \"external_id\": \"\" ,\n \"url\": \"\",\n \"content\": \"I love your product\",\n \"body\": \"\",\n \"advocate\": \n {\n \"id\":\"\" ,\n \"email\": \"steveadvocate@acme.com\"\n },\n \"notification\":\n {\n \"advocates\":\n {\n \"ids\":[\"\",\"\",],\n \"emails\": [\"\",\"\"]\n }\n },\n \"discussion\":\n {\n \"external_id\": \"1348\",\n \"url\": \"http://customercommunity.com/discussion/1348\",\n \"content\": \"\"\n }\n}", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "title": "Gotchas", "body": "The email address for the author of the community reply must match with the existing advocate in the AdvocateHub to progress the challenge." } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "Creating a \"Reply to topic\" stage" } [/block] To log a reply on a discussion on an external community and complete the challenge through the API, first you must create a challenge using a "Reply to a community Topic" stage: 1. In the list of stages of a challenge, choose "Reply to a community topic" [block:image] { "images": [ { "image": [ "https://files.readme.io/fnyEUoKqR8C4Oihuy0lB_Screen%20Shot%202016-03-16%20at%204.44.33%20PM.png", "Screen Shot 2016-03-16 at 4.44.33 PM.png", "1842", "950", "#efefef", "" ] } ] } [/block] 2. Specify the URL of the topic that is in need of response. Note that the URL of the topic needs to be the same URL as specified in the API call back to Influitive to automatically complete the challenge. [block:image] { "images": [ { "image": [ "https://files.readme.io/m7PIXsgeTW0NjxzsAz9R_Screen%20Shot%202016-03-16%20at%203.35.07%20PM.png", "Screen Shot 2016-03-16 at 3.35.07 PM.png", "1612", "1298", "#356a8b", "" ] } ] } [/block] [block:api-header] { "type": "basic", "title": "Logging a topic reply through the API" } [/block] Here is a format of an API call in order to complete a "Reply to a topic" stage within the AdvocateHub. Please note that the Discussion[url] needs to match the URL of the discussion added to the stage. [block:code] { "codes": [ { "code": "POST /community/discussion/reply HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{ \"provider\":\"External Community\" ,\n \"external_id\": \"\" ,\n \"url\": \"\",\n \"content\": \"I love your product\",\n \"body\": \"\",\n \"advocate\": \n {\n \"id\":\"\" ,\n \"email\": \"steveadvocate@acme.com\"\n },\n \"notification\":\n {\n \"advocates\":\n {\n \"ids\":[\"\",\"\",],\n \"emails\": [\"\",\"\"]\n }\n },\n \"discussion\":\n {\n \"external_id\": \"1348\",\n \"url\": \"http://customercommunity.com/discussion/1348\",\n \"content\": \"\"\n }\n}", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "title": "Gotchas", "body": "The email address for the author of the community reply must match with the existing advocate in the AdvocateHub to progress the challenge." } [/block]
{"_id":"56e47b99b3e1142b00b4c960","title":"Logging custom events","api":{"params":[{"_id":"56e47b99b3e1142b00b4c965","ref":"","in":"body","required":true,"desc":"the API code for the custom event created in the AdvocateHub.","default":"","type":"string","name":"type"},{"_id":"56e47b99b3e1142b00b4c964","ref":"","in":"body","required":true,"desc":"One of id, email, or crm_contact_id is required","default":"","type":"object","name":"contact"},{"_id":"56e47b99b3e1142b00b4c962","ref":"","in":"body","required":false,"desc":"Points that are to be awarded to the advocate.  If a stage code is provided, advocates will earn the number of points configured into the challenge.","default":"","type":"string","name":"points"},{"_id":"56e47b99b3e1142b00b4c961","ref":"","in":"body","required":false,"desc":"The \"stage code\" for an api integrated stage in a challenge.  The advocate must be able to perform the stage for the challenge to progress.  The stage code is optional as events and points can be recognized without having a corresponding stage within a challenge.","default":"","type":"object","name":"stage"}],"results":{"codes":[{"status":201,"code":"{\n  \"id\": 536,\n  \"event_type_code\": \"custom_event_api_code\",\n  \"points\": 10,\n  \"contact\": {\n    \"id\": 1,\n    \"email\": \"steveadvocate@acme.com\",\n    \"first_name\": \"Steve\",\n    \"last_name\": \"Advocate\",\n    \"lifetime_points\": 1605,\n    \"current_points\": 1505,\n    \"type\": \"Advocate\",\n    \"salesforce_id\": null,\n    \"source\": \"Referrals\",\n    \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/influitiveimagesqa/gilmour/contacts/thumb/1.jpg?1417104506\",\n    \"name\": \"Steve Advocate\"\n  },\n  \"parameters\": {}\n}","language":"text"},{"code":"{\n  \"Date\": \"Sun, 18 Mar 2016 15:07:31 GMT\",\n  \"Www-Authenticate\": \"Token realm=Api\",\n  \"P3p\": \"CP=\\\"Influitive does not support P3P, as it is an outdated standard. Please view our privacy policy here: http://www.influitive.com/privacy\\\"\",\n  \"Status\": \"401 Unauthorized\",\n  \"Connection\": \"keep-alive\",\n  \"Vary\": \"Origin\",\n  \"Content-Length\": \"0\",\n  \"X-Request-Id\": \"bcd05be1-db19-47ec-84ef-3cf3a1f1298c\",\n  \"X-Runtime\": \"0.060843\",\n  \"Server\": \"nginx\",\n  \"Access-Control-Max-Age\": \"1728000\",\n  \"Access-Control-Allow-Methods\": \"GET, POST, OPTIONS, PATCH, DELETE, PUT\",\n  \"Content-Type\": \"text/plain\",\n  \"Access-Control-Allow-Origin\": \"https://yourhub.influitive.com\",\n  \"Access-Control-Expose-Headers\": \"\",\n  \"Cache-Control\": \"no-cache\",\n  \"Access-Control-Allow-Credentials\": \"true\",\n  \"X-Rack-Cache\": \"invalidate, pass\"\n}","language":"text","status":401}]},"settings":"56410453a6a9e90d008d8120","url":"/events","auth":"required","examples":{"codes":[{"language":"json","code":"POST /events HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n    \"type\":\"custom_event_api_code\",\n    \"points\":\"10\",\n    \"contact\":\n        {\n            \"id\": \"\",\n            \"email\": \"steveadvocate@acme.com\"\n        },\n    \"stage\":\n        {\n            \"code\": \"stagecode\"\n        }\n}"}]},"method":"post"},"editedParams":true,"isReference":true,"link_external":false,"order":0,"editedParams2":true,"githubsync":"","sync_unique":"","updates":[],"user":"54afec2fed9ada1400afbf85","__v":2,"project":"5640b1fd2b14f70d0039b8ad","slug":"events","link_url":"","parentDoc":null,"type":"post","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating a Custom Event in the AdvocateHub\"\n}\n[/block]\nYou can log custom events to award points, advance challenges, and provide recognition to your advocates from external systems.\n\n\nTo create your first custom event:\n\n1) navigate to \"Event Types\" in the administrator settings panel:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/VD7F2GV8TTexXQamD44k_Screen%20Shot%202016-03-12%20at%203.45.03%20PM.png\",\n        \"Screen Shot 2016-03-12 at 3.45.03 PM.png\",\n        \"322\",\n        \"316\",\n        \"#2584c4\",\n        \"\"\n      ],\n      \"caption\": \"Under \\\"Settings\\\" select \\\"event types\\\" under Scoring & Achievements\",\n      \"sizing\": \"original\",\n      \"border\": true\n    }\n  ]\n}\n[/block]\n2) Click on the add an Event Type button\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/EGDX1AizSoKp3UtDqlQm_Screen%20Shot%202016-03-12%20at%203.45.19%20PM%20copy.png\",\n        \"Screen Shot 2016-03-12 at 3.45.19 PM copy.png\",\n        \"1204\",\n        \"490\",\n        \"#763333\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n3) Define the Custom Event Name, API Code, and display settings for both administrators and advocates.  Your set!   You can trigger this event for existing or new advocates through the Influitive API.  \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9CuZtLLSiSIxFF5e9B3a_Screen%20Shot%202016-03-12%20at%203.47.06%20PM.png\",\n        \"Screen Shot 2016-03-12 at 3.47.06 PM.png\",\n        \"704\",\n        \"1052\",\n        \"#267db8\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Both Title and Description is required if \\\"show on advocate profile\\\" is enabled.  \\n\\nIf the advocate has their email preferences for notifications enabled, they will receive an email notification detailing the event and the points awarded.\",\n  \"title\": \"Gotchas\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configuring an API integrated stage into a challenge (optional)\"\n}\n[/block]\nFind the API Integration stage when adding new stages into your challenges.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/swaryfDuTVaj5Tz4UExj_Screen%20Shot%202016-03-12%20at%204.47.09%20PM.png\",\n        \"Screen Shot 2016-03-12 at 4.47.09 PM.png\",\n        \"814\",\n        \"894\",\n        \"#8494e4\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you can't find the API integration stage amongst the available stage types, contact your Advocacy coach who can enable this functionality for your hub.\"\n}\n[/block]\nDefine the Custom Event Type and Stage Code that would be called upon when triggering this stage through the Influitive API.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Cn2a9MTa26quJIAjJkCQ_Screen%20Shot%202016-03-12%20at%204.49.07%20PM.png\",\n        \"Screen Shot 2016-03-12 at 4.49.07 PM.png\",\n        \"1548\",\n        \"1258\",\n        \"#415a6b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The API integrated stage would not progress and award points if the advocate cannot perform the stage currently and if the challenge is archived or unpublished..\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Logging a custom event from the API\"\n}\n[/block]\n[![Run in Postman](https://run.pstmn.io/button.png)](https://www.getpostman.com/run-collection/f91a846e70cc35887f39)\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /events HTTP/1.1\\nHost: yourhubname.influitive.com\\nContent-Type: application/json\\nAccept: application/vnd.infl-v3+json\\nAuthorization: Token token=\\\"6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\\"\\n\\n\\n\\n{\\n    \\\"type\\\":\\\"custom_event_api_code\\\",\\n    \\\"points\\\":\\\"10\\\",\\n    \\\"contact\\\":\\n        {\\n            \\\"id\\\": \\\"\\\",\\n            \\\"email\\\": \\\"steveadvocate@acme.com\\\"\\n        },\\n    \\\"stage\\\":\\n        {\\n            \\\"code\\\": \\\"stagecode\\\"\\n        }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nResponse Body\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 536,\\n  \\\"event_type_code\\\": \\\"custom_event_api_code\\\",\\n  \\\"points\\\": 10,\\n  \\\"contact\\\": {\\n    \\\"id\\\": 1,\\n    \\\"email\\\": \\\"steveadvocate@acme.com\\\",\\n    \\\"first_name\\\": \\\"Steve\\\",\\n    \\\"last_name\\\": \\\"Advocate\\\",\\n    \\\"lifetime_points\\\": 1605,\\n    \\\"current_points\\\": 1505,\\n    \\\"type\\\": \\\"Advocate\\\",\\n    \\\"salesforce_id\\\": null,\\n    \\\"source\\\": \\\"Referrals\\\",\\n    \\\"thumb\\\": \\\"https://d35d6oa6cn0nzo.cloudfront.net/influitiveimagesqa/gilmour/contacts/thumb/1.jpg?1417104506\\\",\\n    \\\"name\\\": \\\"Steve Advocate\\\"\\n  },\\n  \\\"parameters\\\": {}\\n}\\n\\n\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"56e477027e2c02200003130a","createdAt":"2016-03-12T20:27:05.403Z","excerpt":"","hidden":false,"version":"5640b1fe2b14f70d0039b8b0","next":{"description":"","pages":[]},"childrenPages":[]}

postLogging custom events


Body Params

type:
required
string
the API code for the custom event created in the AdvocateHub.
contact:
required
object
One of id, email, or crm_contact_id is required
points:
string
Points that are to be awarded to the advocate. If a stage code is provided, advocates will earn the number of points configured into the challenge.
stage:
object
The "stage code" for an api integrated stage in a challenge. The advocate must be able to perform the stage for the challenge to progress. The stage code is optional as events and points can be recognized without having a corresponding stage within a challenge.
[block:api-header] { "type": "basic", "title": "Creating a Custom Event in the AdvocateHub" } [/block] You can log custom events to award points, advance challenges, and provide recognition to your advocates from external systems. To create your first custom event: 1) navigate to "Event Types" in the administrator settings panel: [block:image] { "images": [ { "image": [ "https://files.readme.io/VD7F2GV8TTexXQamD44k_Screen%20Shot%202016-03-12%20at%203.45.03%20PM.png", "Screen Shot 2016-03-12 at 3.45.03 PM.png", "322", "316", "#2584c4", "" ], "caption": "Under \"Settings\" select \"event types\" under Scoring & Achievements", "sizing": "original", "border": true } ] } [/block] 2) Click on the add an Event Type button [block:image] { "images": [ { "image": [ "https://files.readme.io/EGDX1AizSoKp3UtDqlQm_Screen%20Shot%202016-03-12%20at%203.45.19%20PM%20copy.png", "Screen Shot 2016-03-12 at 3.45.19 PM copy.png", "1204", "490", "#763333", "" ], "caption": "" } ] } [/block] 3) Define the Custom Event Name, API Code, and display settings for both administrators and advocates. Your set! You can trigger this event for existing or new advocates through the Influitive API. [block:image] { "images": [ { "image": [ "https://files.readme.io/9CuZtLLSiSIxFF5e9B3a_Screen%20Shot%202016-03-12%20at%203.47.06%20PM.png", "Screen Shot 2016-03-12 at 3.47.06 PM.png", "704", "1052", "#267db8", "" ], "caption": "" } ] } [/block] [block:callout] { "type": "warning", "body": "Both Title and Description is required if \"show on advocate profile\" is enabled. \n\nIf the advocate has their email preferences for notifications enabled, they will receive an email notification detailing the event and the points awarded.", "title": "Gotchas" } [/block] [block:api-header] { "type": "basic", "title": "Configuring an API integrated stage into a challenge (optional)" } [/block] Find the API Integration stage when adding new stages into your challenges. [block:image] { "images": [ { "image": [ "https://files.readme.io/swaryfDuTVaj5Tz4UExj_Screen%20Shot%202016-03-12%20at%204.47.09%20PM.png", "Screen Shot 2016-03-12 at 4.47.09 PM.png", "814", "894", "#8494e4", "" ] } ] } [/block] [block:callout] { "type": "info", "body": "If you can't find the API integration stage amongst the available stage types, contact your Advocacy coach who can enable this functionality for your hub." } [/block] Define the Custom Event Type and Stage Code that would be called upon when triggering this stage through the Influitive API. [block:image] { "images": [ { "image": [ "https://files.readme.io/Cn2a9MTa26quJIAjJkCQ_Screen%20Shot%202016-03-12%20at%204.49.07%20PM.png", "Screen Shot 2016-03-12 at 4.49.07 PM.png", "1548", "1258", "#415a6b", "" ] } ] } [/block] [block:callout] { "type": "warning", "body": "The API integrated stage would not progress and award points if the advocate cannot perform the stage currently and if the challenge is archived or unpublished.." } [/block] [block:api-header] { "type": "basic", "title": "Logging a custom event from the API" } [/block] [![Run in Postman](https://run.pstmn.io/button.png)](https://www.getpostman.com/run-collection/f91a846e70cc35887f39) [block:code] { "codes": [ { "code": "POST /events HTTP/1.1\nHost: yourhubname.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token token=\"6bfa3b6256add25b71159d56ffa9ad4e629f7a30\"\n\n\n\n{\n \"type\":\"custom_event_api_code\",\n \"points\":\"10\",\n \"contact\":\n {\n \"id\": \"\",\n \"email\": \"steveadvocate@acme.com\"\n },\n \"stage\":\n {\n \"code\": \"stagecode\"\n }\n}", "language": "json" } ] } [/block] Response Body [block:code] { "codes": [ { "code": "{\n \"id\": 536,\n \"event_type_code\": \"custom_event_api_code\",\n \"points\": 10,\n \"contact\": {\n \"id\": 1,\n \"email\": \"steveadvocate@acme.com\",\n \"first_name\": \"Steve\",\n \"last_name\": \"Advocate\",\n \"lifetime_points\": 1605,\n \"current_points\": 1505,\n \"type\": \"Advocate\",\n \"salesforce_id\": null,\n \"source\": \"Referrals\",\n \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/influitiveimagesqa/gilmour/contacts/thumb/1.jpg?1417104506\",\n \"name\": \"Steve Advocate\"\n },\n \"parameters\": {}\n}\n\n\n", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "Creating a Custom Event in the AdvocateHub" } [/block] You can log custom events to award points, advance challenges, and provide recognition to your advocates from external systems. To create your first custom event: 1) navigate to "Event Types" in the administrator settings panel: [block:image] { "images": [ { "image": [ "https://files.readme.io/VD7F2GV8TTexXQamD44k_Screen%20Shot%202016-03-12%20at%203.45.03%20PM.png", "Screen Shot 2016-03-12 at 3.45.03 PM.png", "322", "316", "#2584c4", "" ], "caption": "Under \"Settings\" select \"event types\" under Scoring & Achievements", "sizing": "original", "border": true } ] } [/block] 2) Click on the add an Event Type button [block:image] { "images": [ { "image": [ "https://files.readme.io/EGDX1AizSoKp3UtDqlQm_Screen%20Shot%202016-03-12%20at%203.45.19%20PM%20copy.png", "Screen Shot 2016-03-12 at 3.45.19 PM copy.png", "1204", "490", "#763333", "" ], "caption": "" } ] } [/block] 3) Define the Custom Event Name, API Code, and display settings for both administrators and advocates. Your set! You can trigger this event for existing or new advocates through the Influitive API. [block:image] { "images": [ { "image": [ "https://files.readme.io/9CuZtLLSiSIxFF5e9B3a_Screen%20Shot%202016-03-12%20at%203.47.06%20PM.png", "Screen Shot 2016-03-12 at 3.47.06 PM.png", "704", "1052", "#267db8", "" ], "caption": "" } ] } [/block] [block:callout] { "type": "warning", "body": "Both Title and Description is required if \"show on advocate profile\" is enabled. \n\nIf the advocate has their email preferences for notifications enabled, they will receive an email notification detailing the event and the points awarded.", "title": "Gotchas" } [/block] [block:api-header] { "type": "basic", "title": "Configuring an API integrated stage into a challenge (optional)" } [/block] Find the API Integration stage when adding new stages into your challenges. [block:image] { "images": [ { "image": [ "https://files.readme.io/swaryfDuTVaj5Tz4UExj_Screen%20Shot%202016-03-12%20at%204.47.09%20PM.png", "Screen Shot 2016-03-12 at 4.47.09 PM.png", "814", "894", "#8494e4", "" ] } ] } [/block] [block:callout] { "type": "info", "body": "If you can't find the API integration stage amongst the available stage types, contact your Advocacy coach who can enable this functionality for your hub." } [/block] Define the Custom Event Type and Stage Code that would be called upon when triggering this stage through the Influitive API. [block:image] { "images": [ { "image": [ "https://files.readme.io/Cn2a9MTa26quJIAjJkCQ_Screen%20Shot%202016-03-12%20at%204.49.07%20PM.png", "Screen Shot 2016-03-12 at 4.49.07 PM.png", "1548", "1258", "#415a6b", "" ] } ] } [/block] [block:callout] { "type": "warning", "body": "The API integrated stage would not progress and award points if the advocate cannot perform the stage currently and if the challenge is archived or unpublished.." } [/block] [block:api-header] { "type": "basic", "title": "Logging a custom event from the API" } [/block] [![Run in Postman](https://run.pstmn.io/button.png)](https://www.getpostman.com/run-collection/f91a846e70cc35887f39) [block:code] { "codes": [ { "code": "POST /events HTTP/1.1\nHost: yourhubname.influitive.com\nContent-Type: application/json\nAccept: application/vnd.infl-v3+json\nAuthorization: Token token=\"6bfa3b6256add25b71159d56ffa9ad4e629f7a30\"\n\n\n\n{\n \"type\":\"custom_event_api_code\",\n \"points\":\"10\",\n \"contact\":\n {\n \"id\": \"\",\n \"email\": \"steveadvocate@acme.com\"\n },\n \"stage\":\n {\n \"code\": \"stagecode\"\n }\n}", "language": "json" } ] } [/block] Response Body [block:code] { "codes": [ { "code": "{\n \"id\": 536,\n \"event_type_code\": \"custom_event_api_code\",\n \"points\": 10,\n \"contact\": {\n \"id\": 1,\n \"email\": \"steveadvocate@acme.com\",\n \"first_name\": \"Steve\",\n \"last_name\": \"Advocate\",\n \"lifetime_points\": 1605,\n \"current_points\": 1505,\n \"type\": \"Advocate\",\n \"salesforce_id\": null,\n \"source\": \"Referrals\",\n \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/influitiveimagesqa/gilmour/contacts/thumb/1.jpg?1417104506\",\n \"name\": \"Steve Advocate\"\n },\n \"parameters\": {}\n}\n\n\n", "language": "json" } ] } [/block]
{"_id":"576f1a485a8c72170082b7ab","editedParams2":true,"isReference":true,"__v":4,"api":{"url":"/events","auth":"required","examples":{"codes":[{"code":"GET /events HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3","language":"json"}]},"method":"get","params":[{"_id":"576f1a485a8c72170082b7b0","ref":"","in":"query","required":false,"desc":"Comma separated list of event_type codes","default":"","type":"string","name":"types"},{"_id":"576f1a485a8c72170082b7af","ref":"","in":"query","required":false,"desc":"Cursor to paginate from","default":"","type":"string","name":"cursor"},{"_id":"576f1a485a8c72170082b7ae","ref":"","in":"query","required":false,"desc":"Associated contact id to an advocate","default":"","type":"int","name":"contact_id"},{"_id":"576f1a485a8c72170082b7ad","ref":"","in":"query","required":false,"desc":"iso8601 formatted timestamp ie. 2016-07-01T14:13:21Z","default":"","type":"yyyy-mm-dd","name":"start_at"},{"_id":"576f1a485a8c72170082b7ac","ref":"","in":"query","required":false,"desc":"iso8601 formatted timestamp ie. 2016-07-07T14:13:21Z","default":"","type":"yyyy-mm-dd","name":"end_at"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  \"events\": [\n    {\n      \n      \"id\": 19166,\n      \"type\": \"community_topic_replied\",\n      \"created_at\": \"2016-07-07T14:13:46Z\",\n      \"contact_id\": 261,\n      \"points\": 0,\n      \"params\": {\n        \"topic\": {\n          \"id\": 19311\n        },\n        \"reply\": {\n          \"id\": 93334,\n          \"url\": \"https://app.influitive.com/discussions/topics/19311/reply/93334?track-name=notifications\",\n          \"body\": \"Community content here\"\n        }\n      }\n    },\n    {\n      \"id\": 19165,\n      \"type\": \"community_topic_posted\",\n      \"created_at\": \"2016-07-07T14:13:21Z\",\n      \"contact_id\": 261,\n      \"points\": 0,\n      \"params\": {\n        \"topic\": {\n          \"id\": 19311,\n          \"url\": \"https://app.influitive.com/discussions/topics/19311?track-name=notifications\",\n          \"title\": \"STUFFS\",\n          \"body\": \"<p>hello</p>\"\n        }\n      }\n    },\n    {\n      \"id\": 19164,\n      \"type\": \"influitive_group_join\",\n      \"created_at\": \"2016-07-05T16:56:48Z\",\n      \"contact_id\": 1583,\n      \"points\": 0,\n      \"params\": {\n        \"group\": {\n          \"id\": 830,\n          \"name\": \"people\"\n        }\n      }\n    },\n    {\n      \"id\": 18643,\n      \"type\": \"influitive_group_join\",\n      \"created_at\": \"2016-04-04T14:15:21Z\",\n      \"contact_id\": 94,\n      \"points\": 0,\n      \"params\": {\n        \"group\": {\n          \"id\": 323,\n          \"name\": \"N/E\"\n        }\n      }\n    }\n  ],\n  \"contacts\": [\n    {\n      \"id\": 1583,\n      \"name\": \"Emma Watson\",\n      \"first_name\": \"Emma\",\n      \"last_name\": \"Watson\",\n      \"email\": \"emmaw@influitive.za\",\n      \"title\": \"\",\n      \"company\": \"\",\n      \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n      \"type\": \"Advocate\",\n      \"created_at\": \"2016-07-05T16:56:46.251Z\",\n      \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n      \"nps_score\": null,\n      \"current_points\": 0,\n      \"lifetime_points\": 0,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 1,\n        \"name\": \"Fan\"\n      }\n    },\n    {\n      \"id\": 261,\n      \"name\": \"Alice Advocate\",\n      \"first_name\": \"Alice\",\n      \"last_name\": \"Advocate\",\n      \"email\": \"alice.advocate@gmail.com\",\n      \"title\": \"VP of snoring\",\n      \"company\": \"Company Co\",\n      \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n      \"type\": \"Advocate\",\n      \"created_at\": \"2013-08-20T15:20:40.072Z\",\n      \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n      \"nps_score\": 9,\n      \"current_points\": 43126,\n      \"lifetime_points\": 44728,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 2,\n        \"name\": \"Advocate\"\n      }\n     }\n  ],\n  \"links\": {\n    \"self\": \"https://app.influitive.com/api/events\",\n    \"next\": \"https://app.influitive.com/api/events?cursor=18643\"\n  }\n}","language":"json"}]},"settings":"56410453a6a9e90d008d8120"},"body":"Retrieve all the advocacy events across advocates in the AdvocateHub.  The following API request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /events HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following example response*:\n\n*note that these results are paginated at 500 events per page.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"events\\\": [\\n    {\\n      \\n      \\\"id\\\": 19166,\\n      \\\"type\\\": \\\"community_topic_replied\\\",\\n      \\\"created_at\\\": \\\"2016-07-07T14:13:46Z\\\",\\n      \\\"contact_id\\\": 261,\\n      \\\"points\\\": 0,\\n      \\\"params\\\": {\\n        \\\"topic\\\": {\\n          \\\"id\\\": 19311\\n        },\\n        \\\"reply\\\": {\\n          \\\"id\\\": 93334,\\n          \\\"url\\\": \\\"https://app.influitive.com/discussions/topics/19311/reply/93334?track-name=notifications\\\",\\n          \\\"body\\\": \\\"Community content here\\\"\\n        }\\n      }\\n    },\\n    {\\n      \\\"id\\\": 19165,\\n      \\\"type\\\": \\\"community_topic_posted\\\",\\n      \\\"created_at\\\": \\\"2016-07-07T14:13:21Z\\\",\\n      \\\"contact_id\\\": 261,\\n      \\\"points\\\": 0,\\n      \\\"params\\\": {\\n        \\\"topic\\\": {\\n          \\\"id\\\": 19311,\\n          \\\"url\\\": \\\"https://app.influitive.com/discussions/topics/19311?track-name=notifications\\\",\\n          \\\"title\\\": \\\"STUFFS\\\",\\n          \\\"body\\\": \\\"<p>hello</p>\\\"\\n        }\\n      }\\n    },\\n    {\\n      \\\"id\\\": 19164,\\n      \\\"type\\\": \\\"influitive_group_join\\\",\\n      \\\"created_at\\\": \\\"2016-07-05T16:56:48Z\\\",\\n      \\\"contact_id\\\": 1583,\\n      \\\"points\\\": 0,\\n      \\\"params\\\": {\\n        \\\"group\\\": {\\n          \\\"id\\\": 830,\\n          \\\"name\\\": \\\"people\\\"\\n        }\\n      }\\n    },\\n    {\\n      \\\"id\\\": 18643,\\n      \\\"type\\\": \\\"influitive_group_join\\\",\\n      \\\"created_at\\\": \\\"2016-04-04T14:15:21Z\\\",\\n      \\\"contact_id\\\": 94,\\n      \\\"points\\\": 0,\\n      \\\"params\\\": {\\n        \\\"group\\\": {\\n          \\\"id\\\": 323,\\n          \\\"name\\\": \\\"N/E\\\"\\n        }\\n      }\\n    }\\n  ],\\n  \\\"contacts\\\": [\\n    {\\n      \\\"id\\\": 1583,\\n      \\\"name\\\": \\\"Emma Watson\\\",\\n      \\\"first_name\\\": \\\"Emma\\\",\\n      \\\"last_name\\\": \\\"Watson\\\",\\n      \\\"email\\\": \\\"emmaw@influitive.za\\\",\\n      \\\"title\\\": \\\"\\\",\\n      \\\"company\\\": \\\"\\\",\\n      \\\"uuid\\\": \\\"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\\\",\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"created_at\\\": \\\"2016-07-05T16:56:46.251Z\\\",\\n      \\\"joined_at\\\": \\\"2016-07-05T16:56:46.352Z\\\",\\n      \\\"nps_score\\\": null,\\n      \\\"current_points\\\": 0,\\n      \\\"lifetime_points\\\": 0,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 1,\\n        \\\"name\\\": \\\"Fan\\\"\\n      }\\n    },\\n    {\\n      \\\"id\\\": 261,\\n      \\\"name\\\": \\\"Alice Advocate\\\",\\n      \\\"first_name\\\": \\\"Alice\\\",\\n      \\\"last_name\\\": \\\"Advocate\\\",\\n      \\\"email\\\": \\\"alice.advocate@gmail.com\\\",\\n      \\\"title\\\": \\\"VP of snoring\\\",\\n      \\\"company\\\": \\\"Company Co\\\",\\n      \\\"uuid\\\": \\\"7901d702-3710-441c-bc70-6df78049ff3b\\\",\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"created_at\\\": \\\"2013-08-20T15:20:40.072Z\\\",\\n      \\\"joined_at\\\": \\\"2013-08-20T15:20:40.117Z\\\",\\n      \\\"nps_score\\\": 9,\\n      \\\"current_points\\\": 43126,\\n      \\\"lifetime_points\\\": 44728,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 2,\\n        \\\"name\\\": \\\"Advocate\\\"\\n      }\\n     }\\n  ],\\n  \\\"links\\\": {\\n    \\\"self\\\": \\\"https://api.influitive.com/events\\\",\\n    \\\"next\\\": \\\"https://api.influitive.com/events?cursor=18643\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Filter events by Event Type\"\n}\n[/block]\nYou can filter the GET /Events results for specific events by adding a `types` parameter.  Event type codes reflect all the activity an advocate can do within the AdvocateHub.  Below are all the event type codes in Influitive. This list can be added to via Custom Events.  Multiple events can be included in the filter by separating the values by comma (,).\n[block:parameters]\n{\n  \"data\": {\n    \"3-0\": \"Advocate checked in to location\\nAdvocate Suggest Url\\nAdvocate Workflow\\nAnswered Correctly\\nAnswered Incorrectly\\nAuto Complete Redo\\nBlog Comment\\nBlog Comment (Disqus)\\nBlog Comment (Manual)\\nCompleted Online Action\\nCompleted Review\\nCorporate Workflow\\nCorporate Workflow Redo\\nFollowed on Twitter\\nPost on Twitter\\nGetApp Review\\nImage Uploaded\\nIntro Questions Answered\\nJoined AdvocateHub Group\\nLike on Facebook\\nLinkedIn Product Recommended\\nLink Shared\\nLink Shared on Facebook\\nLink Shared on LinkedIn\\nManually Logged Activity\\nOpportunity Lost (Referrals 1.0)\\nOpportunity Won (Referrals 1.0)\\nPoints Adjusted\\nPosted a topic\\nProfile Updated\\nProspect Accepted\\nProspect Form Submitted (Referrals 1.0)\\nProspect Referred (Referrals 1.0)\\nProvided Net Promoter Score (NPS)\\nQuestions Answered\\nQuiz Answered\\nQuiz Answer Correct\\nQuiz Answer Incorrect\\nReferral Milestone Reached\\nReferred Prospect Rejected (Referrals 1.0)\\nReplied to a topic\\nReplied on tweet\\nSalesforce AppExchange Review\\nTweeted\",\n    \"h-0\": \"Event Type Names\",\n    \"h-1\": \"Event Type Codes\",\n    \"0-0\": \"## **Events without point transactions**\",\n    \"5-0\": \"Posted a community Topic\\nReplied to a community Topic\\nCommented on a Reply\\nReceived a Mention\\nReceived a Reply Like\\nReceived a Topic Like\",\n    \"7-0\": \"Redeemed Reward\\nReward Fulfilled\\nReward Redemption Declined\\nReward Redemption Requested\\nReward Rejected\",\n    \"9-0\": \"Completed Challenge\\nStage Completed\",\n    \"0-1\": \"\",\n    \"3-1\": \"check_in\\nadvocate_suggest_url\\nadvocate_acceptance\\nanswered_correctly\\nanswered_incorrectly\\nauto_complete_redo\\nblog_post\\ndisqus\\nmanual_blog_post\\nonline_action\\nreview\\ncorporate_confirmation\\ncorporate_redo\\ntwitter_follow\\ntwitter_post\\nget_app\\nquestion_with_image\\nintro_questions\\ninfluitive_group_join\\nlike_on_facebook\\nlinkedin_product_recommended\\nshare_link\\nshare_link_facebook\\nshare_link_linkedin\\nlogged_activity\\nreferred_prospect_lost\\nreferred_prospect_won\\npoints_adjusted\\nposted_a_topic\\nupdate_profile\\nreferred_prospect_accepted\\nprospect_form_submitted\\nreferred_prospect_submitted\\nnps\\nquestions\\nquiz\\nquiz_correct\\nquiz_incorrect\\nreferral_milestone_reached\\nreferred_prospect_rejected\\nreplied_to_a_topic\\nreplied_on_tweet\\napp_exchange\\ntweeted\",\n    \"5-1\": \"community_topic_posted\\ncommunity_topic_replied\\ncommunity_reply_commented\\ncommunity_mention\\ncommunity_reply_liked\\ncommunity_topic_liked\",\n    \"7-1\": \"redeemed_reward\\nreward_fulfilled\\nredemption_refused\\nredemption_requested\\nreward_rejected\",\n    \"9-1\": \"completed_challenge\\nstage_completed\",\n    \"1-1\": \"advanced_level\\nadvocate_joined\\nadvocate_activity_goal_reached\\nchallenge_dismissed\\nchallenge_rejected\\ndaily_points_record\\ndonations_refunded\\ndonation_submitted\\nearned_badge\\ncomment\\nlike\\nlink_clicked\\nlost_level\\nnominee_discovered\\nnominee_joined\\npeer_invitations_enabled\\npeer_invite_accepted\\nreward_available\\nreceived_feedback\\nreferral_link_clicked\\nlink_clicked\\ninfluitive_group_remove\\nretweeted\\nupgraded_to_advocate\",\n    \"1-0\": \"Advanced Level\\nAdvocate Joined\\nAdvocate Goal Reached\\nChallenge was dismissed (by advocate)\\nChallenge was rejected (by admin)\\nDaily Points Record\\nDonations Refunded\\nDonation Submitted\\nEarned Badge\\nLeft a Comment\\nLiked\\nLink Clicked\\nLost Level\\nNominee Discovered\\nNominee Joined\\nPeer Invitations Enabled\\nPeer Invite Accepted\\nPerk Available\\nReceived Feedback\\nReferral Link Clicked\\nLink Clicked\\nRemoved From AdvocateHub Group\\nRetweeted\\nUpgraded To Advocate\",\n    \"2-0\": \"## **Events with point transactions**\",\n    \"4-0\": \"## **Community Activities**\",\n    \"6-0\": \"## **Reward redemption/fulfillment activities**\",\n    \"8-0\": \"## **Misc**\"\n  },\n  \"cols\": 2,\n  \"rows\": 10\n}\n[/block]","category":"56e477027e2c02200003130a","createdAt":"2016-06-25T23:56:56.935Z","link_url":"","project":"5640b1fd2b14f70d0039b8ad","slug":"query-events-from-your-advocatehub","sync_unique":"","user":"54afec2fed9ada1400afbf85","excerpt":"","link_external":false,"title":"Query events from your AdvocateHub","updates":[],"editedParams":true,"parentDoc":null,"type":"get","githubsync":"","hidden":false,"order":1,"version":"5640b1fe2b14f70d0039b8b0","next":{"description":"","pages":[]},"childrenPages":[]}

getQuery events from your AdvocateHub


Query Params

types:
string
Comma separated list of event_type codes
cursor:
string
Cursor to paginate from
contact_id:
integer
Associated contact id to an advocate
start_at:
yyyy-mm-dd
iso8601 formatted timestamp ie. 2016-07-01T14:13:21Z
end_at:
yyyy-mm-dd
iso8601 formatted timestamp ie. 2016-07-07T14:13:21Z
Retrieve all the advocacy events across advocates in the AdvocateHub. The following API request: [block:code] { "codes": [ { "code": "GET /events HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following example response*: *note that these results are paginated at 500 events per page. [block:code] { "codes": [ { "code": "{\n \"events\": [\n {\n \n \"id\": 19166,\n \"type\": \"community_topic_replied\",\n \"created_at\": \"2016-07-07T14:13:46Z\",\n \"contact_id\": 261,\n \"points\": 0,\n \"params\": {\n \"topic\": {\n \"id\": 19311\n },\n \"reply\": {\n \"id\": 93334,\n \"url\": \"https://app.influitive.com/discussions/topics/19311/reply/93334?track-name=notifications\",\n \"body\": \"Community content here\"\n }\n }\n },\n {\n \"id\": 19165,\n \"type\": \"community_topic_posted\",\n \"created_at\": \"2016-07-07T14:13:21Z\",\n \"contact_id\": 261,\n \"points\": 0,\n \"params\": {\n \"topic\": {\n \"id\": 19311,\n \"url\": \"https://app.influitive.com/discussions/topics/19311?track-name=notifications\",\n \"title\": \"STUFFS\",\n \"body\": \"<p>hello</p>\"\n }\n }\n },\n {\n \"id\": 19164,\n \"type\": \"influitive_group_join\",\n \"created_at\": \"2016-07-05T16:56:48Z\",\n \"contact_id\": 1583,\n \"points\": 0,\n \"params\": {\n \"group\": {\n \"id\": 830,\n \"name\": \"people\"\n }\n }\n },\n {\n \"id\": 18643,\n \"type\": \"influitive_group_join\",\n \"created_at\": \"2016-04-04T14:15:21Z\",\n \"contact_id\": 94,\n \"points\": 0,\n \"params\": {\n \"group\": {\n \"id\": 323,\n \"name\": \"N/E\"\n }\n }\n }\n ],\n \"contacts\": [\n {\n \"id\": 1583,\n \"name\": \"Emma Watson\",\n \"first_name\": \"Emma\",\n \"last_name\": \"Watson\",\n \"email\": \"emmaw@influitive.za\",\n \"title\": \"\",\n \"company\": \"\",\n \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n \"type\": \"Advocate\",\n \"created_at\": \"2016-07-05T16:56:46.251Z\",\n \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n \"nps_score\": null,\n \"current_points\": 0,\n \"lifetime_points\": 0,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 1,\n \"name\": \"Fan\"\n }\n },\n {\n \"id\": 261,\n \"name\": \"Alice Advocate\",\n \"first_name\": \"Alice\",\n \"last_name\": \"Advocate\",\n \"email\": \"alice.advocate@gmail.com\",\n \"title\": \"VP of snoring\",\n \"company\": \"Company Co\",\n \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n \"type\": \"Advocate\",\n \"created_at\": \"2013-08-20T15:20:40.072Z\",\n \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n \"nps_score\": 9,\n \"current_points\": 43126,\n \"lifetime_points\": 44728,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n }\n ],\n \"links\": {\n \"self\": \"https://api.influitive.com/events\",\n \"next\": \"https://api.influitive.com/events?cursor=18643\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Filter events by Event Type" } [/block] You can filter the GET /Events results for specific events by adding a `types` parameter. Event type codes reflect all the activity an advocate can do within the AdvocateHub. Below are all the event type codes in Influitive. This list can be added to via Custom Events. Multiple events can be included in the filter by separating the values by comma (,). [block:parameters] { "data": { "3-0": "Advocate checked in to location\nAdvocate Suggest Url\nAdvocate Workflow\nAnswered Correctly\nAnswered Incorrectly\nAuto Complete Redo\nBlog Comment\nBlog Comment (Disqus)\nBlog Comment (Manual)\nCompleted Online Action\nCompleted Review\nCorporate Workflow\nCorporate Workflow Redo\nFollowed on Twitter\nPost on Twitter\nGetApp Review\nImage Uploaded\nIntro Questions Answered\nJoined AdvocateHub Group\nLike on Facebook\nLinkedIn Product Recommended\nLink Shared\nLink Shared on Facebook\nLink Shared on LinkedIn\nManually Logged Activity\nOpportunity Lost (Referrals 1.0)\nOpportunity Won (Referrals 1.0)\nPoints Adjusted\nPosted a topic\nProfile Updated\nProspect Accepted\nProspect Form Submitted (Referrals 1.0)\nProspect Referred (Referrals 1.0)\nProvided Net Promoter Score (NPS)\nQuestions Answered\nQuiz Answered\nQuiz Answer Correct\nQuiz Answer Incorrect\nReferral Milestone Reached\nReferred Prospect Rejected (Referrals 1.0)\nReplied to a topic\nReplied on tweet\nSalesforce AppExchange Review\nTweeted", "h-0": "Event Type Names", "h-1": "Event Type Codes", "0-0": "## **Events without point transactions**", "5-0": "Posted a community Topic\nReplied to a community Topic\nCommented on a Reply\nReceived a Mention\nReceived a Reply Like\nReceived a Topic Like", "7-0": "Redeemed Reward\nReward Fulfilled\nReward Redemption Declined\nReward Redemption Requested\nReward Rejected", "9-0": "Completed Challenge\nStage Completed", "0-1": "", "3-1": "check_in\nadvocate_suggest_url\nadvocate_acceptance\nanswered_correctly\nanswered_incorrectly\nauto_complete_redo\nblog_post\ndisqus\nmanual_blog_post\nonline_action\nreview\ncorporate_confirmation\ncorporate_redo\ntwitter_follow\ntwitter_post\nget_app\nquestion_with_image\nintro_questions\ninfluitive_group_join\nlike_on_facebook\nlinkedin_product_recommended\nshare_link\nshare_link_facebook\nshare_link_linkedin\nlogged_activity\nreferred_prospect_lost\nreferred_prospect_won\npoints_adjusted\nposted_a_topic\nupdate_profile\nreferred_prospect_accepted\nprospect_form_submitted\nreferred_prospect_submitted\nnps\nquestions\nquiz\nquiz_correct\nquiz_incorrect\nreferral_milestone_reached\nreferred_prospect_rejected\nreplied_to_a_topic\nreplied_on_tweet\napp_exchange\ntweeted", "5-1": "community_topic_posted\ncommunity_topic_replied\ncommunity_reply_commented\ncommunity_mention\ncommunity_reply_liked\ncommunity_topic_liked", "7-1": "redeemed_reward\nreward_fulfilled\nredemption_refused\nredemption_requested\nreward_rejected", "9-1": "completed_challenge\nstage_completed", "1-1": "advanced_level\nadvocate_joined\nadvocate_activity_goal_reached\nchallenge_dismissed\nchallenge_rejected\ndaily_points_record\ndonations_refunded\ndonation_submitted\nearned_badge\ncomment\nlike\nlink_clicked\nlost_level\nnominee_discovered\nnominee_joined\npeer_invitations_enabled\npeer_invite_accepted\nreward_available\nreceived_feedback\nreferral_link_clicked\nlink_clicked\ninfluitive_group_remove\nretweeted\nupgraded_to_advocate", "1-0": "Advanced Level\nAdvocate Joined\nAdvocate Goal Reached\nChallenge was dismissed (by advocate)\nChallenge was rejected (by admin)\nDaily Points Record\nDonations Refunded\nDonation Submitted\nEarned Badge\nLeft a Comment\nLiked\nLink Clicked\nLost Level\nNominee Discovered\nNominee Joined\nPeer Invitations Enabled\nPeer Invite Accepted\nPerk Available\nReceived Feedback\nReferral Link Clicked\nLink Clicked\nRemoved From AdvocateHub Group\nRetweeted\nUpgraded To Advocate", "2-0": "## **Events with point transactions**", "4-0": "## **Community Activities**", "6-0": "## **Reward redemption/fulfillment activities**", "8-0": "## **Misc**" }, "cols": 2, "rows": 10 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Retrieve all the advocacy events across advocates in the AdvocateHub. The following API request: [block:code] { "codes": [ { "code": "GET /events HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following example response*: *note that these results are paginated at 500 events per page. [block:code] { "codes": [ { "code": "{\n \"events\": [\n {\n \n \"id\": 19166,\n \"type\": \"community_topic_replied\",\n \"created_at\": \"2016-07-07T14:13:46Z\",\n \"contact_id\": 261,\n \"points\": 0,\n \"params\": {\n \"topic\": {\n \"id\": 19311\n },\n \"reply\": {\n \"id\": 93334,\n \"url\": \"https://app.influitive.com/discussions/topics/19311/reply/93334?track-name=notifications\",\n \"body\": \"Community content here\"\n }\n }\n },\n {\n \"id\": 19165,\n \"type\": \"community_topic_posted\",\n \"created_at\": \"2016-07-07T14:13:21Z\",\n \"contact_id\": 261,\n \"points\": 0,\n \"params\": {\n \"topic\": {\n \"id\": 19311,\n \"url\": \"https://app.influitive.com/discussions/topics/19311?track-name=notifications\",\n \"title\": \"STUFFS\",\n \"body\": \"<p>hello</p>\"\n }\n }\n },\n {\n \"id\": 19164,\n \"type\": \"influitive_group_join\",\n \"created_at\": \"2016-07-05T16:56:48Z\",\n \"contact_id\": 1583,\n \"points\": 0,\n \"params\": {\n \"group\": {\n \"id\": 830,\n \"name\": \"people\"\n }\n }\n },\n {\n \"id\": 18643,\n \"type\": \"influitive_group_join\",\n \"created_at\": \"2016-04-04T14:15:21Z\",\n \"contact_id\": 94,\n \"points\": 0,\n \"params\": {\n \"group\": {\n \"id\": 323,\n \"name\": \"N/E\"\n }\n }\n }\n ],\n \"contacts\": [\n {\n \"id\": 1583,\n \"name\": \"Emma Watson\",\n \"first_name\": \"Emma\",\n \"last_name\": \"Watson\",\n \"email\": \"emmaw@influitive.za\",\n \"title\": \"\",\n \"company\": \"\",\n \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n \"type\": \"Advocate\",\n \"created_at\": \"2016-07-05T16:56:46.251Z\",\n \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n \"nps_score\": null,\n \"current_points\": 0,\n \"lifetime_points\": 0,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 1,\n \"name\": \"Fan\"\n }\n },\n {\n \"id\": 261,\n \"name\": \"Alice Advocate\",\n \"first_name\": \"Alice\",\n \"last_name\": \"Advocate\",\n \"email\": \"alice.advocate@gmail.com\",\n \"title\": \"VP of snoring\",\n \"company\": \"Company Co\",\n \"uuid\": \"7901d702-3710-441c-bc70-6df78049ff3b\",\n \"type\": \"Advocate\",\n \"created_at\": \"2013-08-20T15:20:40.072Z\",\n \"joined_at\": \"2013-08-20T15:20:40.117Z\",\n \"nps_score\": 9,\n \"current_points\": 43126,\n \"lifetime_points\": 44728,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n }\n ],\n \"links\": {\n \"self\": \"https://api.influitive.com/events\",\n \"next\": \"https://api.influitive.com/events?cursor=18643\"\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Filter events by Event Type" } [/block] You can filter the GET /Events results for specific events by adding a `types` parameter. Event type codes reflect all the activity an advocate can do within the AdvocateHub. Below are all the event type codes in Influitive. This list can be added to via Custom Events. Multiple events can be included in the filter by separating the values by comma (,). [block:parameters] { "data": { "3-0": "Advocate checked in to location\nAdvocate Suggest Url\nAdvocate Workflow\nAnswered Correctly\nAnswered Incorrectly\nAuto Complete Redo\nBlog Comment\nBlog Comment (Disqus)\nBlog Comment (Manual)\nCompleted Online Action\nCompleted Review\nCorporate Workflow\nCorporate Workflow Redo\nFollowed on Twitter\nPost on Twitter\nGetApp Review\nImage Uploaded\nIntro Questions Answered\nJoined AdvocateHub Group\nLike on Facebook\nLinkedIn Product Recommended\nLink Shared\nLink Shared on Facebook\nLink Shared on LinkedIn\nManually Logged Activity\nOpportunity Lost (Referrals 1.0)\nOpportunity Won (Referrals 1.0)\nPoints Adjusted\nPosted a topic\nProfile Updated\nProspect Accepted\nProspect Form Submitted (Referrals 1.0)\nProspect Referred (Referrals 1.0)\nProvided Net Promoter Score (NPS)\nQuestions Answered\nQuiz Answered\nQuiz Answer Correct\nQuiz Answer Incorrect\nReferral Milestone Reached\nReferred Prospect Rejected (Referrals 1.0)\nReplied to a topic\nReplied on tweet\nSalesforce AppExchange Review\nTweeted", "h-0": "Event Type Names", "h-1": "Event Type Codes", "0-0": "## **Events without point transactions**", "5-0": "Posted a community Topic\nReplied to a community Topic\nCommented on a Reply\nReceived a Mention\nReceived a Reply Like\nReceived a Topic Like", "7-0": "Redeemed Reward\nReward Fulfilled\nReward Redemption Declined\nReward Redemption Requested\nReward Rejected", "9-0": "Completed Challenge\nStage Completed", "0-1": "", "3-1": "check_in\nadvocate_suggest_url\nadvocate_acceptance\nanswered_correctly\nanswered_incorrectly\nauto_complete_redo\nblog_post\ndisqus\nmanual_blog_post\nonline_action\nreview\ncorporate_confirmation\ncorporate_redo\ntwitter_follow\ntwitter_post\nget_app\nquestion_with_image\nintro_questions\ninfluitive_group_join\nlike_on_facebook\nlinkedin_product_recommended\nshare_link\nshare_link_facebook\nshare_link_linkedin\nlogged_activity\nreferred_prospect_lost\nreferred_prospect_won\npoints_adjusted\nposted_a_topic\nupdate_profile\nreferred_prospect_accepted\nprospect_form_submitted\nreferred_prospect_submitted\nnps\nquestions\nquiz\nquiz_correct\nquiz_incorrect\nreferral_milestone_reached\nreferred_prospect_rejected\nreplied_to_a_topic\nreplied_on_tweet\napp_exchange\ntweeted", "5-1": "community_topic_posted\ncommunity_topic_replied\ncommunity_reply_commented\ncommunity_mention\ncommunity_reply_liked\ncommunity_topic_liked", "7-1": "redeemed_reward\nreward_fulfilled\nredemption_refused\nredemption_requested\nreward_rejected", "9-1": "completed_challenge\nstage_completed", "1-1": "advanced_level\nadvocate_joined\nadvocate_activity_goal_reached\nchallenge_dismissed\nchallenge_rejected\ndaily_points_record\ndonations_refunded\ndonation_submitted\nearned_badge\ncomment\nlike\nlink_clicked\nlost_level\nnominee_discovered\nnominee_joined\npeer_invitations_enabled\npeer_invite_accepted\nreward_available\nreceived_feedback\nreferral_link_clicked\nlink_clicked\ninfluitive_group_remove\nretweeted\nupgraded_to_advocate", "1-0": "Advanced Level\nAdvocate Joined\nAdvocate Goal Reached\nChallenge was dismissed (by advocate)\nChallenge was rejected (by admin)\nDaily Points Record\nDonations Refunded\nDonation Submitted\nEarned Badge\nLeft a Comment\nLiked\nLink Clicked\nLost Level\nNominee Discovered\nNominee Joined\nPeer Invitations Enabled\nPeer Invite Accepted\nPerk Available\nReceived Feedback\nReferral Link Clicked\nLink Clicked\nRemoved From AdvocateHub Group\nRetweeted\nUpgraded To Advocate", "2-0": "## **Events with point transactions**", "4-0": "## **Community Activities**", "6-0": "## **Reward redemption/fulfillment activities**", "8-0": "## **Misc**" }, "cols": 2, "rows": 10 } [/block]
{"_id":"57830d699ba6ea0e0078742a","hidden":false,"link_external":false,"__v":2,"api":{"examples":{"codes":[{"language":"json","code":"GET /groups HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[{"_id":"57830d699ba6ea0e0078742e","ref":"","in":"query","required":false,"desc":"Unique Identifier of the group","default":"","type":"string","name":"id"},{"_id":"57830d699ba6ea0e0078742d","ref":"","in":"query","required":false,"desc":"Group Name","default":"","type":"string","name":"name"},{"_id":"57830d699ba6ea0e0078742b","ref":"","in":"query","required":false,"desc":"Universal unique identifier","default":"","type":"string","name":"uuid"}],"results":{"codes":[{"code":"{\n    \"groups\": [\n        {\n            \"uuid\": \"446c9f90-7696-4d68-92fa-930e1414e7d6\",\n            \"id\": 322,\n            \"name\": \"Tron\"\n        },\n        {\n            \"uuid\": \"336e2237-2340-426c-b782-8779c0a3c20b\",\n            \"id\": 150,\n            \"name\": \"Landing Page\"\n        },\n      \t{...}\n  ]\n}\n","language":"json","status":200,"name":""},{"name":"","code":"{}","language":"json","status":400}]},"settings":"56410453a6a9e90d008d8120","url":"/groups","auth":"required"},"body":"Retrieve all groups and all their member counts:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /groups HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\ngroups: \\n  [\\n   { id: 1, name: 'Group A', uuid: 'AB0-23-23' },\\n   { id: 2, name: 'Group B', uuid: 'CD0-44-66' },\\n  ]\\n}\\n\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","sync_unique":"","type":"get","isReference":true,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"57830c479ba6ea0e00787429","editedParams":true,"title":"Retrieve all groups","excerpt":"","githubsync":"","link_url":"","order":0,"slug":"retrieve-all-groups","createdAt":"2016-07-11T03:07:21.181Z","editedParams2":true,"updates":[],"user":"54afec2fed9ada1400afbf85","next":{"description":"","pages":[]},"childrenPages":[]}

getRetrieve all groups


Query Params

id:
string
Unique Identifier of the group
name:
string
Group Name
uuid:
string
Universal unique identifier
Retrieve all groups and all their member counts: [block:code] { "codes": [ { "code": "GET /groups HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{ \ngroups: \n [\n { id: 1, name: 'Group A', uuid: 'AB0-23-23' },\n { id: 2, name: 'Group B', uuid: 'CD0-44-66' },\n ]\n}\n", "language": "javascript" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Retrieve all groups and all their member counts: [block:code] { "codes": [ { "code": "GET /groups HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{ \ngroups: \n [\n { id: 1, name: 'Group A', uuid: 'AB0-23-23' },\n { id: 2, name: 'Group B', uuid: 'CD0-44-66' },\n ]\n}\n", "language": "javascript" } ] } [/block]
{"_id":"57830f389ba6ea0e0078742f","title":"Get group members","type":"get","version":"5640b1fe2b14f70d0039b8b0","editedParams":true,"editedParams2":true,"link_url":"","sync_unique":"","githubsync":"","hidden":false,"project":"5640b1fd2b14f70d0039b8ad","updates":[],"order":1,"__v":1,"api":{"settings":"56410453a6a9e90d008d8120","url":"/groups/:group_uuid/members","auth":"required","examples":{"codes":[{"language":"json","code":"GET /groups/gff4649d-5e6c-49f0-b559-jjkb3f9c78im/members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[{"_id":"57830f389ba6ea0e00787431","ref":"","in":"query","required":false,"desc":"Universal unique group idenitifer - Note this is not as same as id","default":"","type":"string","name":":group_uuid"},{"_id":"57830f389ba6ea0e00787430","ref":"","in":"query","required":false,"desc":"Cursor to paginate from","default":"","type":"string","name":"cursor"}],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{\n    \"links\": {\n        \"self\": \"https://api.influitiveqa.com/api/groups/gff4649d-5e6c-49f0-b559-jjkb3f9c78im/members\",\n        \"next\": null\n    },\n    \"contacts\": [\n        {\n            \"id\": 175,\n            \"name\": \"Tron\",\n            \"title\": \"Uzos Friend\",\n            \"company\": \"Influitive\",\n            \"image\": {\n                \"small\": \"https://static.influitive.com/influitiveimagesqa/bears/contacts/small/175.jpg?1442861838\",\n                \"thumb\": \"https://static.influitive.com/influitiveimagesqa/bears/contacts/thumb/175.jpg?1442861838\",\n                \"large\": \"https://static.influitive.com/influitiveimagesqa/bears/contacts/large/175.jpg?1442861838\",\n                \"original\": \"https://static.influitive.com/influitiveimagesqa/bears/contacts/original/175.jpg?1442861838\"\n            },\n            \"uuid\": \"c02afbaa-db73-4fa9-a94d-beae06627c30\"\n        }\n    ]\n}"},{"language":"json","code":"{}","name":"","status":400}]}},"category":"57830c479ba6ea0e00787429","excerpt":"","isReference":true,"user":"54afec2fed9ada1400afbf85","body":"Get all members for this specific group:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /groups/gff4649d-5e6c-49f0-b559-jjkb3f9c78im/members HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  links: {\\n    self: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=0',\\n    next: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=500'\\n  },\\n  \\ncontacts: [\\n  { \\n     id: 101, name: 'Mr Advocate', title: 'Engineer', company: 'Influitive', uuid: 'TT-01-00', \\n     image: { \\n        thumb: 'https://example.com/images/thumb/abc.jpg', \\n        small: 'https://example.com/images/small/abc.jpg',\\n        large: 'https://example.com/images/large/abc.jpg',\\n        original: 'https://example.com/images/original/abc.jpg',\\n  },\\n  { \\n     id: 201, name: 'Second Advocate', title: 'Marketer', company: 'Influitive', uuid: 'AA-01-00', \\n     image: { \\n        thumb: 'https://example.com/images/thumb/ddd.jpg', \\n        small: 'https://example.com/images/small/ddd.jpg',\\n        large: 'https://example.com/images/large/ddd.jpg',\\n        original: 'https://example.com/images/original/ddd.jpg',\\n  }\\n ]\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","createdAt":"2016-07-11T03:15:04.877Z","link_external":false,"parentDoc":null,"slug":"get-group-members","next":{"description":"","pages":[]},"childrenPages":[]}

getGet group members


Query Params

group_uuid:
string
Universal unique group idenitifer - Note this is not as same as id
cursor:
string
Cursor to paginate from
Get all members for this specific group: [block:code] { "codes": [ { "code": "GET /groups/gff4649d-5e6c-49f0-b559-jjkb3f9c78im/members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n links: {\n self: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=0',\n next: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=500'\n },\n \ncontacts: [\n { \n id: 101, name: 'Mr Advocate', title: 'Engineer', company: 'Influitive', uuid: 'TT-01-00', \n image: { \n thumb: 'https://example.com/images/thumb/abc.jpg', \n small: 'https://example.com/images/small/abc.jpg',\n large: 'https://example.com/images/large/abc.jpg',\n original: 'https://example.com/images/original/abc.jpg',\n },\n { \n id: 201, name: 'Second Advocate', title: 'Marketer', company: 'Influitive', uuid: 'AA-01-00', \n image: { \n thumb: 'https://example.com/images/thumb/ddd.jpg', \n small: 'https://example.com/images/small/ddd.jpg',\n large: 'https://example.com/images/large/ddd.jpg',\n original: 'https://example.com/images/original/ddd.jpg',\n }\n ]\n}", "language": "javascript" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get all members for this specific group: [block:code] { "codes": [ { "code": "GET /groups/gff4649d-5e6c-49f0-b559-jjkb3f9c78im/members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n links: {\n self: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=0',\n next: 'http://app.api.influitiveqa.com/groups/AB0-23-23/members?cursor=500'\n },\n \ncontacts: [\n { \n id: 101, name: 'Mr Advocate', title: 'Engineer', company: 'Influitive', uuid: 'TT-01-00', \n image: { \n thumb: 'https://example.com/images/thumb/abc.jpg', \n small: 'https://example.com/images/small/abc.jpg',\n large: 'https://example.com/images/large/abc.jpg',\n original: 'https://example.com/images/original/abc.jpg',\n },\n { \n id: 201, name: 'Second Advocate', title: 'Marketer', company: 'Influitive', uuid: 'AA-01-00', \n image: { \n thumb: 'https://example.com/images/thumb/ddd.jpg', \n small: 'https://example.com/images/small/ddd.jpg',\n large: 'https://example.com/images/large/ddd.jpg',\n original: 'https://example.com/images/original/ddd.jpg',\n }\n ]\n}", "language": "javascript" } ] } [/block]
{"_id":"5782bfcda9e63b0e00e5adde","createdAt":"2016-07-10T21:36:13.577Z","order":0,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","title":"Query all members in your AdvocateHub","type":"get","api":{"results":{"codes":[{"code":"{\n  \"contacts\": [\n    {\n      \"id\": 1583,\n      \"name\": \"Emma Watson\",\n      \"first_name\": \"Emma\",\n      \"last_name\": \"Watson\",\n      \"email\": \"emmaw@mgmstudios.za\",\n      \"title\": \"\",\n      \"company\": \"\",\n      \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n      \"type\": \"Advocate\",\n      \"created_at\": \"2016-07-05T16:56:46.251Z\",\n      \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n      \"nps_score\": null,\n      \"current_points\": 0,\n      \"lifetime_points\": 0,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 1,\n        \"name\": \"Fan\"\n      }\n    },\n    {\n      \"id\": 1582,\n      \"name\": \"Grace Hulen\",\n      \"first_name\": \"Grace\",\n      \"last_name\": \"Hulen\",\n      \"email\": \"gracehulen@outlook.com\",\n      \"title\": null,\n      \"company\": null,\n      \"uuid\": \"000f9366-6aea-4501-b1f6-7d7d962b05e7\",\n      \"type\": \"Nominee\",\n      \"created_at\": \"2016-07-05T13:01:17.662Z\",\n      \"joined_at\": \"2016-07-05T13:01:18.296Z\",\n      \"nps_score\": 10,\n      \"current_points\": 905,\n      \"lifetime_points\": 905,\n      \"crm_contact_id\": null,\n      \"level\": {\n        \"id\": 2,\n        \"name\": \"Advocate\"\n        }\n     },\n     {...}\n      ],\n  \"links\": {\n    \"self\": \"https://api.influitive.com/contacts\",\n    \"next\": \"https://api.influitive.com/contacts?cursor=\"\n  }\n}","language":"json","status":200,"name":""}]},"settings":"","url":"/contacts","auth":"required","examples":{"codes":[{"language":"json","code":"GET /contacts HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[]},"excerpt":"","githubsync":"","link_url":"","sync_unique":"","updates":[],"user":"54afec2fed9ada1400afbf85","body":"Use the following call to retrieve all advocates in your AdvcateHub:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /contacts HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nHere is a sample response being returned:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"contacts\\\": [\\n    {\\n      \\\"id\\\": 1583,\\n      \\\"name\\\": \\\"Emma Watson\\\",\\n      \\\"first_name\\\": \\\"Emma\\\",\\n      \\\"last_name\\\": \\\"Watson\\\",\\n      \\\"email\\\": \\\"emmaw@mgmstudios.za\\\",\\n      \\\"title\\\": \\\"\\\",\\n      \\\"company\\\": \\\"\\\",\\n      \\\"uuid\\\": \\\"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\\\",\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"created_at\\\": \\\"2016-07-05T16:56:46.251Z\\\",\\n      \\\"joined_at\\\": \\\"2016-07-05T16:56:46.352Z\\\",\\n      \\\"nps_score\\\": null,\\n      \\\"current_points\\\": 0,\\n      \\\"lifetime_points\\\": 0,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 1,\\n        \\\"name\\\": \\\"Fan\\\"\\n      }\\n    },\\n    {\\n      \\\"id\\\": 1582,\\n      \\\"name\\\": \\\"Grace Hulen\\\",\\n      \\\"first_name\\\": \\\"Grace\\\",\\n      \\\"last_name\\\": \\\"Hulen\\\",\\n      \\\"email\\\": \\\"gracehulen@outlook.com\\\",\\n      \\\"title\\\": null,\\n      \\\"company\\\": null,\\n      \\\"uuid\\\": \\\"000f9366-6aea-4501-b1f6-7d7d962b05e7\\\",\\n      \\\"type\\\": \\\"Nominee\\\",\\n      \\\"created_at\\\": \\\"2016-07-05T13:01:17.662Z\\\",\\n      \\\"joined_at\\\": \\\"2016-07-05T13:01:18.296Z\\\",\\n      \\\"nps_score\\\": 10,\\n      \\\"current_points\\\": 905,\\n      \\\"lifetime_points\\\": 905,\\n      \\\"crm_contact_id\\\": null,\\n      \\\"level\\\": {\\n        \\\"id\\\": 2,\\n        \\\"name\\\": \\\"Advocate\\\"\\n        }\\n     },\\n      {...}\\n      ],\\n  \\\"links\\\": {\\n    \\\"self\\\": \\\"https://api.influitive.com/contacts\\\",\\n    \\\"next\\\": \\\"https://api.influitive.com/contacts?cursor=\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","isReference":true,"link_external":false,"slug":"query-for-contacts-from-your-advocatehub","version":"5640b1fe2b14f70d0039b8b0","__v":11,"category":"5782bde06f3e0e0e004768da","hidden":false,"childrenPages":[]}

getQuery all members in your AdvocateHub


Use the following call to retrieve all advocates in your AdvcateHub: [block:code] { "codes": [ { "code": "GET /contacts HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Here is a sample response being returned: [block:code] { "codes": [ { "code": "{\n \"contacts\": [\n {\n \"id\": 1583,\n \"name\": \"Emma Watson\",\n \"first_name\": \"Emma\",\n \"last_name\": \"Watson\",\n \"email\": \"emmaw@mgmstudios.za\",\n \"title\": \"\",\n \"company\": \"\",\n \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n \"type\": \"Advocate\",\n \"created_at\": \"2016-07-05T16:56:46.251Z\",\n \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n \"nps_score\": null,\n \"current_points\": 0,\n \"lifetime_points\": 0,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 1,\n \"name\": \"Fan\"\n }\n },\n {\n \"id\": 1582,\n \"name\": \"Grace Hulen\",\n \"first_name\": \"Grace\",\n \"last_name\": \"Hulen\",\n \"email\": \"gracehulen@outlook.com\",\n \"title\": null,\n \"company\": null,\n \"uuid\": \"000f9366-6aea-4501-b1f6-7d7d962b05e7\",\n \"type\": \"Nominee\",\n \"created_at\": \"2016-07-05T13:01:17.662Z\",\n \"joined_at\": \"2016-07-05T13:01:18.296Z\",\n \"nps_score\": 10,\n \"current_points\": 905,\n \"lifetime_points\": 905,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n {...}\n ],\n \"links\": {\n \"self\": \"https://api.influitive.com/contacts\",\n \"next\": \"https://api.influitive.com/contacts?cursor=\"\n }\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Use the following call to retrieve all advocates in your AdvcateHub: [block:code] { "codes": [ { "code": "GET /contacts HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Here is a sample response being returned: [block:code] { "codes": [ { "code": "{\n \"contacts\": [\n {\n \"id\": 1583,\n \"name\": \"Emma Watson\",\n \"first_name\": \"Emma\",\n \"last_name\": \"Watson\",\n \"email\": \"emmaw@mgmstudios.za\",\n \"title\": \"\",\n \"company\": \"\",\n \"uuid\": \"bbff5a90-2e0b-4bc0-af71-dc46f21c096f\",\n \"type\": \"Advocate\",\n \"created_at\": \"2016-07-05T16:56:46.251Z\",\n \"joined_at\": \"2016-07-05T16:56:46.352Z\",\n \"nps_score\": null,\n \"current_points\": 0,\n \"lifetime_points\": 0,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 1,\n \"name\": \"Fan\"\n }\n },\n {\n \"id\": 1582,\n \"name\": \"Grace Hulen\",\n \"first_name\": \"Grace\",\n \"last_name\": \"Hulen\",\n \"email\": \"gracehulen@outlook.com\",\n \"title\": null,\n \"company\": null,\n \"uuid\": \"000f9366-6aea-4501-b1f6-7d7d962b05e7\",\n \"type\": \"Nominee\",\n \"created_at\": \"2016-07-05T13:01:17.662Z\",\n \"joined_at\": \"2016-07-05T13:01:18.296Z\",\n \"nps_score\": 10,\n \"current_points\": 905,\n \"lifetime_points\": 905,\n \"crm_contact_id\": null,\n \"level\": {\n \"id\": 2,\n \"name\": \"Advocate\"\n }\n },\n {...}\n ],\n \"links\": {\n \"self\": \"https://api.influitive.com/contacts\",\n \"next\": \"https://api.influitive.com/contacts?cursor=\"\n }\n}", "language": "json" } ] } [/block]
{"_id":"5782be0d89ad100e00ab3e42","api":{"url":"/members/me","auth":"required","examples":{"codes":[{"language":"json","code":"GET /contacts/me HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 13,\n    \"email\": \"infl+bears@integrations.influitive.com\",\n    \"first_name\": \"Infl\",\n    \"last_name\": \"Integration User\",\n    \"lifetime_points\": 0,\n    \"current_points\": 0,\n    \"type\": \"Corporate\",\n    \"salesforce_id\": null,\n    \"external_ids\": {},\n    \"match_categories\": {},\n    \"source\": \"unknown\",\n    \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n    \"name\": \"Infl Integration User\",\n    \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}","name":"","status":200}]},"settings":""},"hidden":false,"parentDoc":null,"title":"Get details about your own member record","user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","createdAt":"2016-07-10T21:28:45.487Z","isReference":true,"slug":"get-information-about-your-own-member-record","sync_unique":"","type":"get","project":"5640b1fd2b14f70d0039b8ad","updates":[],"__v":5,"body":"Get for information about your api user\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /contacts/me HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": 13,\\n    \\\"email\\\": \\\"infl+bears@integrations.influitive.com\\\",\\n    \\\"first_name\\\": \\\"Infl\\\",\\n    \\\"last_name\\\": \\\"Integration User\\\",\\n    \\\"lifetime_points\\\": 0,\\n    \\\"current_points\\\": 0,\\n    \\\"type\\\": \\\"Corporate\\\",\\n    \\\"salesforce_id\\\": null,\\n    \\\"external_ids\\\": {},\\n    \\\"match_categories\\\": {},\\n    \\\"source\\\": \\\"unknown\\\",\\n    \\\"thumb\\\": \\\"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\\\",\\n    \\\"name\\\": \\\"Infl Integration User\\\",\\n    \\\"uuid\\\": \\\"ab308080-d9bf-4a74-98a8-46ba7aebb59d\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"5782bde06f3e0e0e004768da","githubsync":"","link_external":false,"link_url":"","excerpt":"","order":1,"next":{"description":"","pages":[]},"childrenPages":[]}

getGet details about your own member record


Get for information about your api user [block:code] { "codes": [ { "code": "GET /contacts/me HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response [block:code] { "codes": [ { "code": "{\n \"id\": 13,\n \"email\": \"infl+bears@integrations.influitive.com\",\n \"first_name\": \"Infl\",\n \"last_name\": \"Integration User\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Corporate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"unknown\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Infl Integration User\",\n \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get for information about your api user [block:code] { "codes": [ { "code": "GET /contacts/me HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response [block:code] { "codes": [ { "code": "{\n \"id\": 13,\n \"email\": \"infl+bears@integrations.influitive.com\",\n \"first_name\": \"Infl\",\n \"last_name\": \"Integration User\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Corporate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"unknown\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Infl Integration User\",\n \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}", "language": "json" } ] } [/block]
{"_id":"5782be2aa9e63b0e00e5addc","api":{"method":"get","params":[{"_id":"5782c183a9e63b0e00e5ade2","ref":"","in":"query","required":true,"desc":"Member Email","default":"","type":"string","name":"email"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"id\": 532,\n        \"email\": \"3434@sldkrj.dlkj\",\n        \"first_name\": \"3l4kj\",\n        \"last_name\": \"\",\n        \"lifetime_points\": 940,\n        \"current_points\": 940,\n        \"type\": \"Advocate\",\n        \"salesforce_id\": null,\n        \"external_ids\": {},\n        \"match_categories\": {},\n        \"source\": \"Open Signup\",\n        \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n        \"name\": \"3l4kj\",\n        \"uuid\": \"64a80abc-74b5-4105-979b-84504a81e410\"\n    }\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/members","auth":"required","examples":{"codes":[{"code":"GET /members?email=3434@sldkrj.dlkj HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3","language":"text"}]}},"category":"5782bde06f3e0e0e004768da","createdAt":"2016-07-10T21:29:14.486Z","githubsync":"","project":"5640b1fd2b14f70d0039b8ad","title":"Get details about a member identified by email","version":"5640b1fe2b14f70d0039b8b0","hidden":false,"link_external":false,"slug":"get-details-about-a-member-identified-by-email","type":"get","updates":[],"editedParams":true,"excerpt":"","link_url":"","parentDoc":null,"sync_unique":"","__v":4,"body":"Lookup a current member by email:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /members?email=3434@sldkrj.dlkj HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n    {\\n        \\\"id\\\": 532,\\n        \\\"email\\\": \\\"3434@sldkrj.dlkj\\\",\\n        \\\"first_name\\\": \\\"3l4kj\\\",\\n        \\\"last_name\\\": \\\"\\\",\\n        \\\"lifetime_points\\\": 940,\\n        \\\"current_points\\\": 940,\\n        \\\"type\\\": \\\"Advocate\\\",\\n        \\\"salesforce_id\\\": null,\\n        \\\"external_ids\\\": {},\\n        \\\"match_categories\\\": {},\\n        \\\"source\\\": \\\"Open Signup\\\",\\n        \\\"thumb\\\": \\\"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\\\",\\n        \\\"name\\\": \\\"3l4kj\\\",\\n        \\\"uuid\\\": \\\"64a80abc-74b5-4105-979b-84504a81e410\\\"\\n    }\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"isReference":true,"order":2,"user":"54afec2fed9ada1400afbf85","next":{"description":"","pages":[]},"childrenPages":[]}

getGet details about a member identified by email


Query Params

email:
required
string
Member Email
Lookup a current member by email: [block:code] { "codes": [ { "code": "GET /members?email=3434@sldkrj.dlkj HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "[\n {\n \"id\": 532,\n \"email\": \"3434@sldkrj.dlkj\",\n \"first_name\": \"3l4kj\",\n \"last_name\": \"\",\n \"lifetime_points\": 940,\n \"current_points\": 940,\n \"type\": \"Advocate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"Open Signup\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"3l4kj\",\n \"uuid\": \"64a80abc-74b5-4105-979b-84504a81e410\"\n }\n]", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Lookup a current member by email: [block:code] { "codes": [ { "code": "GET /members?email=3434@sldkrj.dlkj HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "[\n {\n \"id\": 532,\n \"email\": \"3434@sldkrj.dlkj\",\n \"first_name\": \"3l4kj\",\n \"last_name\": \"\",\n \"lifetime_points\": 940,\n \"current_points\": 940,\n \"type\": \"Advocate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"Open Signup\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"3l4kj\",\n \"uuid\": \"64a80abc-74b5-4105-979b-84504a81e410\"\n }\n]", "language": "json" } ] } [/block]
{"_id":"5782bf456f3e0e0e004768db","__v":2,"category":"5782bde06f3e0e0e004768da","editedParams":true,"isReference":true,"sync_unique":"","user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","api":{"url":"/members/:id","auth":"required","examples":{"codes":[{"language":"text","code":"GET /members/190 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[{"_id":"5782c1a989ad100e00ab3e4a","ref":"","in":"path","required":false,"desc":"","default":"","type":"int","name":"id"}],"results":{"codes":[{"code":"{\n    \"id\": 190,\n    \"email\": \"infl+bears@integrations.influitive.com\",\n    \"first_name\": \"Infl\",\n    \"last_name\": \"Integration User\",\n    \"lifetime_points\": 0,\n    \"current_points\": 0,\n    \"type\": \"Corporate\",\n    \"salesforce_id\": null,\n    \"external_ids\": {},\n    \"match_categories\": {},\n    \"source\": \"unknown\",\n    \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n    \"name\": \"Infl Integration User\",\n    \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}","name":"","status":200,"language":"json"}]},"settings":""},"body":"Lookup an advocate via their member id\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /members/190 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": 190,\\n    \\\"email\\\": \\\"infl+bears@integrations.influitive.com\\\",\\n    \\\"first_name\\\": \\\"Infl\\\",\\n    \\\"last_name\\\": \\\"Integration User\\\",\\n    \\\"lifetime_points\\\": 0,\\n    \\\"current_points\\\": 0,\\n    \\\"type\\\": \\\"Corporate\\\",\\n    \\\"salesforce_id\\\": null,\\n    \\\"external_ids\\\": {},\\n    \\\"match_categories\\\": {},\\n    \\\"source\\\": \\\"unknown\\\",\\n    \\\"thumb\\\": \\\"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\\\",\\n    \\\"name\\\": \\\"Infl Integration User\\\",\\n    \\\"uuid\\\": \\\"ab308080-d9bf-4a74-98a8-46ba7aebb59d\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","githubsync":"","link_external":false,"slug":"get-details-about-a-member-identified-by-id","title":"Get details about a member identified by id","createdAt":"2016-07-10T21:33:57.427Z","editedParams2":true,"type":"get","excerpt":"","hidden":false,"link_url":"","order":3,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","updates":[],"next":{"description":"","pages":[]},"childrenPages":[]}

getGet details about a member identified by id


Path Params

id:
integer
Lookup an advocate via their member id [block:code] { "codes": [ { "code": "GET /members/190 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 190,\n \"email\": \"infl+bears@integrations.influitive.com\",\n \"first_name\": \"Infl\",\n \"last_name\": \"Integration User\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Corporate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"unknown\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Infl Integration User\",\n \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Lookup an advocate via their member id [block:code] { "codes": [ { "code": "GET /members/190 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 190,\n \"email\": \"infl+bears@integrations.influitive.com\",\n \"first_name\": \"Infl\",\n \"last_name\": \"Integration User\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Corporate\",\n \"salesforce_id\": null,\n \"external_ids\": {},\n \"match_categories\": {},\n \"source\": \"unknown\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Infl Integration User\",\n \"uuid\": \"ab308080-d9bf-4a74-98a8-46ba7aebb59d\"\n}", "language": "json" } ] } [/block]
{"_id":"5b3e05da8b6a810003c4805b","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782bde06f3e0e0e004768da","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-05T11:49:46.191Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"GET /updated_contacts?past_hours=4 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3","language":"json"}]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"[\n\t\"6dd6afb4-85f4-4bf1-aef0-3678aa957594\"\n]","name":""}]},"settings":"56410453a6a9e90d008d8120","auth":"required","params":[{"_id":"57962437769c3a0e001cd42d","ref":"","in":"body","required":true,"desc":"Offset in hours from current time","default":"","type":"string","name":"past_hours"}],"url":"/updated_contacts"},"isReference":true,"order":4,"body":"Get list of updated advocate UUIDs:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /updated_contacts?past_hours=4 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]\nThe above call would return the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n\\t\\\"6dd6afb4-85f4-4bf1-aef0-3678aa957594\\\"\\n]\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    }\n  ]\n}\n[/block]","excerpt":"This endpoint will return list of UUIDs of advocates that update their profiles within last hours","slug":"updated-advocates","type":"get","title":"Get list of updated advocates","__v":3,"parentDoc":null,"childrenPages":[]}

getGet list of updated advocates

This endpoint will return list of UUIDs of advocates that update their profiles within last hours

Body Params

past_hours:
required
string
Offset in hours from current time
Get list of updated advocate UUIDs: [block:code] { "codes": [ { "code": "GET /updated_contacts?past_hours=4 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json", "name": "JSON" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "[\n\t\"6dd6afb4-85f4-4bf1-aef0-3678aa957594\"\n]", "language": "json", "name": "200 OK" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Get list of updated advocate UUIDs: [block:code] { "codes": [ { "code": "GET /updated_contacts?past_hours=4 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json", "name": "JSON" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "[\n\t\"6dd6afb4-85f4-4bf1-aef0-3678aa957594\"\n]", "language": "json", "name": "200 OK" } ] } [/block]
{"_id":"5782be680d51ec0e00c6467a","editedParams":true,"hidden":false,"isReference":true,"link_external":false,"link_url":"","project":"5640b1fd2b14f70d0039b8ad","__v":10,"parentDoc":null,"slug":"create-a-member-identified-by-email","type":"post","updates":[],"body":"Create a new nominee into the AdvocateHub.  They aren't an advocate until they receive an invite to the AdvocateHub or join the program via a join code.  \n\n(Or, create a new advocate with type field set to \"Advocate\". If type field is left empty, by default it will be set to the value under Settings -> System -> Login/Security -> Open Signup -> Create new members as.)\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /members HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n\\\"email\\\": \\\"test+create@influitive.com\\\",\\n\\\"name\\\" : \\\"Bobby Mac\\\",\\n\\\"source\\\": \\\"External Provider\\\",\\n\\\"title\\\": \\\"Product Manager\\\",\\n\\\"company\\\": \\\"Influitive\\\",\\n\\\"salesforce_id\\\": \\\"00300N0ef032r323\\\",\\n\\\"match_criteria\\\": {\\n},\\n\\\"type\\\": \\\"Nominee\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": 7624,\\n    \\\"email\\\": \\\"test+create@influitive.com\\\",\\n    \\\"first_name\\\": \\\"Bobby\\\",\\n    \\\"last_name\\\": \\\"Mac\\\",\\n    \\\"lifetime_points\\\": 0,\\n    \\\"current_points\\\": 0,\\n    \\\"type\\\": \\\"Nominee\\\",\\n    \\\"salesforce_id\\\": null,\\n    \\\"external_ids\\\": {\\n        \\\"salesforce_contact_id\\\": null\\n    },\\n    \\\"match_categories\\\": {},\\n    \\\"source\\\": \\\"External Provider\\\",\\n    \\\"thumb\\\": \\\"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\\\",\\n    \\\"name\\\": \\\"Bobby Mac\\\",\\n    \\\"uuid\\\": \\\"4e87a374-f8df-4c18-b2c4-3494947c28bd\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","order":5,"sync_unique":"","title":"Create a member identified by email","version":"5640b1fe2b14f70d0039b8b0","editedParams2":true,"excerpt":"","createdAt":"2016-07-10T21:30:16.975Z","githubsync":"","user":"54afec2fed9ada1400afbf85","api":{"method":"post","params":[{"_id":"5782d17e3dce7e2000023295","ref":"","in":"body","required":true,"desc":"","default":"","type":"string","name":"email"},{"_id":"5782d17e3dce7e2000023296","ref":"","in":"body","required":true,"desc":"","default":"","type":"string","name":"name"},{"_id":"5782d17e3dce7e2000023294","ref":"","in":"body","required":true,"desc":"Application Identifier (who is creating this member)","default":"","type":"string","name":"source"},{"_id":"5782d17e3dce7e2000023293","ref":"","in":"body","required":false,"desc":"the member's company","default":"","type":"string","name":"company"},{"_id":"5782d17e3dce7e2000023292","ref":"","in":"body","required":false,"desc":"the member's job title","default":"","type":"string","name":"title"},{"_id":"5782d17e3dce7e2000023291","ref":"","in":"body","required":false,"desc":"salesforce contactID for the member","default":"","type":"string","name":"salesforce_id"},{"_id":"59baeb9aea2db7003aceb452","ref":"","in":"body","required":false,"desc":"{\"category\" => \"[value1]\"}            (Note: may not work at /api/docs#!/members/POST_members_format, use Postman)","default":"","type":"object","name":"match_criteria"},{"_id":"59baeb9aea2db7003aceb451","ref":"","in":"body","required":false,"desc":"Advocate or Nominee or default","default":"","type":"string","name":"type"},{"_id":"59baeb9aea2db7003aceb450","ref":"","in":"header","required":true,"desc":"Validates your identity","default":"","type":"string","name":"Authorization"},{"_id":"59baeb9aea2db7003aceb44f","ref":"","in":"header","required":true,"desc":"The format of data being submitted (only json is supported)","default":"","type":"string","name":"Content-Type"},{"_id":"59baeb9aea2db7003aceb44e","ref":"","in":"header","required":true,"desc":"If version is not specified, latest will be used. Default format is JSON","default":"","type":"string","name":"Accept"}],"results":{"codes":[{"language":"json","code":"{\n    \"id\": 7624,\n    \"email\": \"test+create@influitive.com\",\n    \"first_name\": \"Bobby\",\n    \"last_name\": \"Mac\",\n    \"lifetime_points\": 0,\n    \"current_points\": 0,\n    \"type\": \"Nominee\",\n    \"salesforce_id\": null,\n    \"external_ids\": {\n        \"salesforce_contact_id\": null\n    },\n    \"match_categories\": {},\n    \"source\": \"External Provider\",\n    \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n    \"name\": \"Bobby Mac\",\n    \"uuid\": \"4e87a374-f8df-4c18-b2c4-3494947c28bd\"\n}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/members","auth":"required","examples":{"codes":[{"language":"text","code":"POST /members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"email\": \"test+create@influitive.com\",\n\"name\" : \"Bobby Mac\",\n\"source\": \"External Provider\",\n\"title\": \"Product Manager\",\n\"company\": \"Influitive\",\n\"salesforce_id\": \"00300N0ef032r323\",\n\"match_criteria\": {\n},\n\"type\": \"Nominee\"\n}"}]}},"category":"5782bde06f3e0e0e004768da","next":{"description":"","pages":[]},"childrenPages":[]}

postCreate a member identified by email


Body Params

email:
required
string
name:
required
string
source:
required
string
Application Identifier (who is creating this member)
company:
string
the member's company
title:
string
the member's job title
salesforce_id:
string
salesforce contactID for the member
match_criteria:
object
{"category" => "[value1]"} (Note: may not work at /api/docs#!/members/POST_members_format, use Postman)
type:
string
Advocate or Nominee or default

Headers

Authorization:
required
string
Validates your identity
Content-Type:
required
string
The format of data being submitted (only json is supported)
Accept:
required
string
If version is not specified, latest will be used. Default format is JSON
Create a new nominee into the AdvocateHub. They aren't an advocate until they receive an invite to the AdvocateHub or join the program via a join code. (Or, create a new advocate with type field set to "Advocate". If type field is left empty, by default it will be set to the value under Settings -> System -> Login/Security -> Open Signup -> Create new members as.) [block:code] { "codes": [ { "code": "POST /members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"email\": \"test+create@influitive.com\",\n\"name\" : \"Bobby Mac\",\n\"source\": \"External Provider\",\n\"title\": \"Product Manager\",\n\"company\": \"Influitive\",\n\"salesforce_id\": \"00300N0ef032r323\",\n\"match_criteria\": {\n},\n\"type\": \"Nominee\"\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 7624,\n \"email\": \"test+create@influitive.com\",\n \"first_name\": \"Bobby\",\n \"last_name\": \"Mac\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Nominee\",\n \"salesforce_id\": null,\n \"external_ids\": {\n \"salesforce_contact_id\": null\n },\n \"match_categories\": {},\n \"source\": \"External Provider\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Bobby Mac\",\n \"uuid\": \"4e87a374-f8df-4c18-b2c4-3494947c28bd\"\n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Create a new nominee into the AdvocateHub. They aren't an advocate until they receive an invite to the AdvocateHub or join the program via a join code. (Or, create a new advocate with type field set to "Advocate". If type field is left empty, by default it will be set to the value under Settings -> System -> Login/Security -> Open Signup -> Create new members as.) [block:code] { "codes": [ { "code": "POST /members HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"email\": \"test+create@influitive.com\",\n\"name\" : \"Bobby Mac\",\n\"source\": \"External Provider\",\n\"title\": \"Product Manager\",\n\"company\": \"Influitive\",\n\"salesforce_id\": \"00300N0ef032r323\",\n\"match_criteria\": {\n},\n\"type\": \"Nominee\"\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 7624,\n \"email\": \"test+create@influitive.com\",\n \"first_name\": \"Bobby\",\n \"last_name\": \"Mac\",\n \"lifetime_points\": 0,\n \"current_points\": 0,\n \"type\": \"Nominee\",\n \"salesforce_id\": null,\n \"external_ids\": {\n \"salesforce_contact_id\": null\n },\n \"match_categories\": {},\n \"source\": \"External Provider\",\n \"thumb\": \"https://static.influitiveqa.com/assets/contacts/thumb/missing-307bd424fb0a747a937c2191fca5131f.png\",\n \"name\": \"Bobby Mac\",\n \"uuid\": \"4e87a374-f8df-4c18-b2c4-3494947c28bd\"\n}", "language": "json" } ] } [/block]
{"_id":"5782bf82371ac11700574f0b","project":"5640b1fd2b14f70d0039b8ad","sync_unique":"","api":{"url":"/members/:id/invitations","auth":"required","examples":{"codes":[{"language":"json","code":"POST /members/190/invitations HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"post","params":[{"default":"","type":"int","name":"id","in":"path","_id":"5782c59c9ba6ea0e007873f1","ref":"","required":false,"desc":"Member ID"}],"results":{"codes":[{"language":"json","code":"{\n  \"status\": \"Sent\"\n}","name":"","status":200},{"status":422,"language":"json","code":"{\n  \"error\": \"Invitation has already been sent, try resend\"\n}","name":""}]},"settings":""},"body":"Send an invitation to an uninvited nominee:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /members/190/invitations HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"Sent\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": \\\"Invitation has already been sent, try resend\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"422 Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","category":"5782bde06f3e0e0e004768da","link_external":false,"parentDoc":null,"createdAt":"2016-07-10T21:34:58.835Z","isReference":true,"order":6,"title":"Invite a member identified by id","__v":2,"editedParams":true,"editedParams2":true,"excerpt":"","hidden":false,"link_url":"","type":"post","version":"5640b1fe2b14f70d0039b8b0","githubsync":"","slug":"invite-a-member-identified-by-id","updates":[],"user":"54afec2fed9ada1400afbf85","childrenPages":[]}

postInvite a member identified by id


Path Params

id:
integer
Member ID
Send an invitation to an uninvited nominee: [block:code] { "codes": [ { "code": "POST /members/190/invitations HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"status\": \"Sent\"\n}", "language": "json", "name": "200 OK" }, { "code": "{\n \"error\": \"Invitation has already been sent, try resend\"\n}", "language": "json", "name": "422 Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Send an invitation to an uninvited nominee: [block:code] { "codes": [ { "code": "POST /members/190/invitations HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"status\": \"Sent\"\n}", "language": "json", "name": "200 OK" }, { "code": "{\n \"error\": \"Invitation has already been sent, try resend\"\n}", "language": "json", "name": "422 Unprocessed Entity" } ] } [/block]
{"_id":"5782bf986f3e0e0e004768dd","parentDoc":null,"type":"post","body":"Resend an invitation to an invited member:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /members/190/invitations/resend HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"Sent\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    },\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"You have to send an invitation before you can resend\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"422 Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","category":"5782bde06f3e0e0e004768da","hidden":false,"link_external":false,"order":7,"api":{"method":"post","params":[{"name":"id","ref":"","required":false,"type":"int","in":"path","_id":"5782c4a20d51ec0e00c64681","default":"","desc":"Member ID"}],"results":{"codes":[{"code":"{\n  \"status\": \"Sent\"\n}","name":"","status":200,"language":"json"},{"status":422,"language":"json","code":"{\n  \"status\": \"You have to send an invitation before you can resend\"\n}","name":""}]},"settings":"","url":"/members/:id/invitations/resend","auth":"required","examples":{"codes":[{"language":"json","code":"POST /members/190/invitations/resend HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]}},"user":"54afec2fed9ada1400afbf85","updates":[],"version":"5640b1fe2b14f70d0039b8b0","__v":2,"createdAt":"2016-07-10T21:35:20.046Z","slug":"resend-invite-to-a-member-identified-by-id","sync_unique":"","title":"Resend Invite to a member identified by id","isReference":true,"link_url":"","project":"5640b1fd2b14f70d0039b8ad","editedParams":true,"editedParams2":true,"excerpt":"","githubsync":"","childrenPages":[]}

postResend Invite to a member identified by id


Path Params

id:
integer
Member ID
Resend an invitation to an invited member: [block:code] { "codes": [ { "code": "POST /members/190/invitations/resend HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"status\": \"Sent\"\n}", "language": "json", "name": "200 OK" }, { "code": "{\n \"status\": \"You have to send an invitation before you can resend\"\n}", "language": "json", "name": "422 Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Resend an invitation to an invited member: [block:code] { "codes": [ { "code": "POST /members/190/invitations/resend HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "{\n \"status\": \"Sent\"\n}", "language": "json", "name": "200 OK" }, { "code": "{\n \"status\": \"You have to send an invitation before you can resend\"\n}", "language": "json", "name": "422 Unprocessed Entity" } ] } [/block]
{"_id":"57962437769c3a0e001cd42a","category":"5782bde06f3e0e0e004768da","sync_unique":"","title":"Update Member referenced by ID","isReference":true,"next":{"description":"","pages":[]},"order":8,"parentDoc":null,"createdAt":"2016-07-25T14:37:43.674Z","hidden":false,"link_external":false,"link_url":"","type":"patch","updates":[],"user":"54afec2fed9ada1400afbf85","__v":4,"api":{"examples":{"codes":[{"code":"PATCH /members/133 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n    \"title\": \"Dev\",\n    \"company\": \"Boo Yoo\",\n    \"salesforce_id\": \"00P0005hj87jd8k416\",\n    \"external_ids\": {\n      \"marketo_contact_id\": \"00P0005hj87jd8k416\"\n    }\n}","language":"json"}]},"method":"patch","params":[{"_id":"57962437769c3a0e001cd42d","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"title"},{"_id":"57962437769c3a0e001cd42c","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"company"},{"_id":"57962437769c3a0e001cd42b","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"salesforce_id"},{"_id":"5796249c769c3a0e001cd42e","ref":"","in":"query","required":false,"desc":"","default":"Member ID","type":"int","name":"id"},{"_id":"579624f0f7d5760e006ee5c9","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"name"},{"_id":"58ae08c35b6a7c19009b82fd","ref":"","in":"body","required":false,"desc":"Hash of crm fields. E.g. marketo_contact_id, salesforce_contact_id, roi_contact_id","default":"","type":"object","name":"external_ids"}],"results":{"codes":[{"name":"","code":"{\n  \"id\": 133,\n  \"email\": \"teresa+test@influitive.com\",\n  \"first_name\": \"Teresa\",\n  \"last_name\": \"Test\",\n  \"lifetime_points\": 1400,\n  \"current_points\": 1400,\n  \"type\": \"Advocate\",\n  \"salesforce_id\": \"00P0005hj87jd8k416\",\n  \"source\": \"Email Invite\",\n  \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/assets/contacts/thumb/missing-da866acd0b8134a491e3db5ee8f1cb8e.png\",\n  \"name\": \"Teresa Test\",\n  \"external_ids\": {\n    \"marketo_contact_id\": \"00P0005hj87jd8k416\"\n  }","language":"json","status":200}]},"settings":"56410453a6a9e90d008d8120","url":"/members/:id","auth":"required"},"githubsync":"","version":"5640b1fe2b14f70d0039b8b0","slug":"update-member-referenced-by-id","body":"Use the following call to update an existing member *:\n\n* Note that email address cannot be changed.  Only Name, Title, Company, and CRM Contact ID can be updated in this call.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PATCH /members/133 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n    \\\"title\\\": \\\"Dev\\\",\\n    \\\"company\\\": \\\"Boo Yoo\\\",\\n    \\\"salesforce_id\\\": \\\"00P0005hj87jd8k416\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe above call would return the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": 133,\\n  \\\"email\\\": \\\"teresa+test@influitive.com\\\",\\n  \\\"first_name\\\": \\\"Teresa\\\",\\n  \\\"last_name\\\": \\\"Test\\\",\\n  \\\"lifetime_points\\\": 1400,\\n  \\\"current_points\\\": 1400,\\n  \\\"type\\\": \\\"Advocate\\\",\\n  \\\"salesforce_id\\\": \\\"00P0005hj87jd8k416\\\",\\n  \\\"source\\\": \\\"Email Invite\\\",\\n  \\\"thumb\\\": \\\"https://d35d6oa6cn0nzo.cloudfront.net/assets/contacts/thumb/missing-da866acd0b8134a491e3db5ee8f1cb8e.png\\\",\\n  \\\"name\\\": \\\"Teresa Test\\\"\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","project":"5640b1fd2b14f70d0039b8ad","childrenPages":[]}

patchUpdate Member referenced by ID


Query Params

id:
integerMember ID

Body Params

title:
string
company:
string
salesforce_id:
string
name:
string
external_ids:
object
Hash of crm fields. E.g. marketo_contact_id, salesforce_contact_id, roi_contact_id
Use the following call to update an existing member *: * Note that email address cannot be changed. Only Name, Title, Company, and CRM Contact ID can be updated in this call. [block:code] { "codes": [ { "code": "PATCH /members/133 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"title\": \"Dev\",\n \"company\": \"Boo Yoo\",\n \"salesforce_id\": \"00P0005hj87jd8k416\"\n}", "language": "json" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 133,\n \"email\": \"teresa+test@influitive.com\",\n \"first_name\": \"Teresa\",\n \"last_name\": \"Test\",\n \"lifetime_points\": 1400,\n \"current_points\": 1400,\n \"type\": \"Advocate\",\n \"salesforce_id\": \"00P0005hj87jd8k416\",\n \"source\": \"Email Invite\",\n \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/assets/contacts/thumb/missing-da866acd0b8134a491e3db5ee8f1cb8e.png\",\n \"name\": \"Teresa Test\"", "language": "json" } ] } [/block]

User Information

Try It Out

patch
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Use the following call to update an existing member *: * Note that email address cannot be changed. Only Name, Title, Company, and CRM Contact ID can be updated in this call. [block:code] { "codes": [ { "code": "PATCH /members/133 HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"title\": \"Dev\",\n \"company\": \"Boo Yoo\",\n \"salesforce_id\": \"00P0005hj87jd8k416\"\n}", "language": "json" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "{\n \"id\": 133,\n \"email\": \"teresa+test@influitive.com\",\n \"first_name\": \"Teresa\",\n \"last_name\": \"Test\",\n \"lifetime_points\": 1400,\n \"current_points\": 1400,\n \"type\": \"Advocate\",\n \"salesforce_id\": \"00P0005hj87jd8k416\",\n \"source\": \"Email Invite\",\n \"thumb\": \"https://d35d6oa6cn0nzo.cloudfront.net/assets/contacts/thumb/missing-da866acd0b8134a491e3db5ee8f1cb8e.png\",\n \"name\": \"Teresa Test\"", "language": "json" } ] } [/block]
{"_id":"5afdb903763f590003f42076","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782bde06f3e0e0e004768da","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-17T17:16:51.423Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"56410453a6a9e90d008d8120","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\":null\n}","name":""}]},"method":"put","examples":{"codes":[{"code":"PUT /contacts/unsubscribe HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n    \"email\": \"test@example.com\"\n}","language":"json"}]},"auth":"required","params":[{"_id":"57962437769c3a0e001cd42d","ref":"","in":"body","required":true,"desc":"","default":"","type":"string","name":"email"}],"url":"/contacts/unsubscribe"},"isReference":true,"order":9,"body":"Unsubscribe an email address:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PUT /contacts/unsubscribe HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n    \\\"email\\\": \\\"test@example.com\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    }\n  ]\n}\n[/block]\nThe above call would return the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"data\\\":null\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    }\n  ]\n}\n[/block]","excerpt":"This endpoint will unsubscribe the contact from all email communications","slug":"unsubscribe-contact-email","type":"put","title":"Unsubscribe a contact by email","__v":10,"parentDoc":null,"childrenPages":[]}

putUnsubscribe a contact by email

This endpoint will unsubscribe the contact from all email communications

Body Params

email:
required
string
Unsubscribe an email address: [block:code] { "codes": [ { "code": "PUT /contacts/unsubscribe HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"email\": \"test@example.com\"\n}", "language": "json", "name": "JSON" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "{\n \"data\":null\n}", "language": "json", "name": "200 OK" } ] } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Unsubscribe an email address: [block:code] { "codes": [ { "code": "PUT /contacts/unsubscribe HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"email\": \"test@example.com\"\n}", "language": "json", "name": "JSON" } ] } [/block] The above call would return the following response: [block:code] { "codes": [ { "code": "{\n \"data\":null\n}", "language": "json", "name": "200 OK" } ] } [/block]
{"_id":"5782f30a89ad100e00ab3e71","editedParams":true,"isReference":true,"slug":"archive-a-challenge","type":"post","updates":[],"body":"Archive a challenge identified by challenge ID\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /challenges/123/archive HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"success\\\"\\n}\",\n      \"language\": \"text\",\n      \"name\": \"200 OK\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"message\\\": \\\"Cannot archive challenge\\\"\\n  }\\n}\",\n      \"language\": \"text\",\n      \"name\": \"422 - Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","excerpt":"","githubsync":"","parentDoc":null,"sync_unique":"","hidden":false,"title":"Archive a challenge","__v":2,"category":"5782f2e69ba6ea0e0078741d","createdAt":"2016-07-11T01:14:50.167Z","editedParams2":true,"user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","api":{"params":[{"default":"","desc":"Challenge ID","name":"id","ref":"","required":true,"type":"int","in":"path","_id":"5782f3db3dce7e20000232b6"}],"results":{"codes":[{"status":201,"language":"json","code":"{\n  \"status\": \"success\"\n}\n","name":""},{"status":422,"language":"json","code":"{\n  \"error\": {\n    \"message\": \"Cannot archive challenge\"\n  }\n}"}]},"settings":"56410453a6a9e90d008d8120","url":"/challenges/:id/archive","auth":"required","examples":{"codes":[{"language":"json","code":"POST /challenges/123/archive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n"}]},"method":"post"},"link_external":false,"link_url":"","order":0,"project":"5640b1fd2b14f70d0039b8ad","childrenPages":[]}

postArchive a challenge


Path Params

id:
required
integer
Challenge ID
Archive a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/archive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"success\"\n}", "language": "text", "name": "200 OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot archive challenge\"\n }\n}", "language": "text", "name": "422 - Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Archive a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/archive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"success\"\n}", "language": "text", "name": "200 OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot archive challenge\"\n }\n}", "language": "text", "name": "422 - Unprocessed Entity" } ] } [/block]
{"_id":"5782f34b0d51ec0e00c646b4","excerpt":"","hidden":false,"order":1,"parentDoc":null,"sync_unique":"","__v":1,"body":"Unarchive a challenge identified by challenge ID\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /challenges/123/unarchive HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"success\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 - OK\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"message\\\": \\\"Cannot unarchive challenge\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"422- Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","title":"Unarchive a Challenge","type":"post","user":"54afec2fed9ada1400afbf85","githubsync":"","isReference":true,"updates":[],"category":"5782f2e69ba6ea0e0078741d","editedParams":true,"editedParams2":true,"slug":"unarchive-a-challenge","version":"5640b1fe2b14f70d0039b8b0","api":{"results":{"codes":[{"status":201,"language":"json","code":"{\n  \"status\": \"success\"\n}","name":""},{"status":422,"language":"json","code":"{\n  \"error\": {\n    \"message\": \"Cannot unarchive challenge\"\n  }\n}","name":""}]},"settings":"56410453a6a9e90d008d8120","url":"/challenges/:id/unarchive","auth":"required","examples":{"codes":[{"code":"POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3","language":"json"}]},"method":"post","params":[{"desc":"Challenge ID","name":"id","ref":"","required":true,"type":"int","in":"path","_id":"5782f3f989ad100e00ab3e74","default":""}]},"link_external":false,"link_url":"","createdAt":"2016-07-11T01:15:55.410Z","project":"5640b1fd2b14f70d0039b8ad","childrenPages":[]}

postUnarchive a Challenge


Path Params

id:
required
integer
Challenge ID
Unarchive a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"success\"\n}", "language": "json", "name": "200 - OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot unarchive challenge\"\n }\n}", "language": "json", "name": "422- Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Unarchive a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "javascript" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"success\"\n}", "language": "json", "name": "200 - OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot unarchive challenge\"\n }\n}", "language": "json", "name": "422- Unprocessed Entity" } ] } [/block]
{"_id":"5782f35d9ba6ea0e0078741f","parentDoc":null,"title":"Publish a challenge","type":"post","isReference":true,"order":2,"githubsync":"","api":{"url":"/challenges/:id/publish","auth":"required","examples":{"codes":[{"language":"json","code":"POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n  \"start_at\": \"sdfsdf\",\n  \"end_at\": \"sdfsdf\",\n  \"participant_limit\": \"3\"\n)"}]},"method":"post","params":[{"in":"path","_id":"5782f41389ad100e00ab3e75","ref":"","required":true,"desc":"Challenge ID","default":"","type":"int","name":"id"},{"ref":"","required":false,"desc":"Challenge publish start (date time) - ISO8601 Format","default":"YYYY-MM-DDThh:mm:ss.sTZD","type":"datetime","name":"start_at","in":"body","_id":"5782fa2ca9e63b0e00e5ae0e"},{"type":"datetime","name":"end_at","in":"body","_id":"5782fa2ca9e63b0e00e5ae0d","ref":"","required":false,"desc":"Challenge publish end (date time) - ISO8601 Format","default":"YYYY-MM-DDThh:mm:ss.sTZD"},{"type":"int","name":"participant_limit","in":"body","_id":"5782fa2ca9e63b0e00e5ae0c","ref":"","required":false,"desc":"Number of advocates that can start this challenge","default":""}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"status\": \"ok\"\n}","name":""},{"status":422,"language":"json","code":"{\n  \"error\": {\n    \"message\": \"Cannot publish challenge\"\n  }\n}","name":""}]},"settings":"56410453a6a9e90d008d8120"},"editedParams2":true,"body":"Publish a challenge identified by challenge ID.  Optionally schedule the challenge to start and end with the `start_at` and `end_at` parameters.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /challenges/123/publish HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n  \\\"start_at\\\": \\\"sdfsdf\\\",\\n  \\\"end_at\\\": \\\"sdfsdf\\\",\\n  \\\"participant_limit\\\": \\\"3\\\"\\n)\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"OK\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 : OK\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"message\\\": \\\"Cannot publish challenge\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"422-Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","category":"5782f2e69ba6ea0e0078741d","createdAt":"2016-07-11T01:16:13.803Z","hidden":false,"link_external":false,"link_url":"","__v":2,"sync_unique":"","updates":[],"user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","project":"5640b1fd2b14f70d0039b8ad","slug":"publish-a-challenge","editedParams":true,"excerpt":"","childrenPages":[]}

postPublish a challenge


Path Params

id:
required
integer
Challenge ID

Body Params

start_at:
datetimeYYYY-MM-DDThh:mm:ss.sTZD
Challenge publish start (date time) - ISO8601 Format
end_at:
datetimeYYYY-MM-DDThh:mm:ss.sTZD
Challenge publish end (date time) - ISO8601 Format
participant_limit:
integer
Number of advocates that can start this challenge
Publish a challenge identified by challenge ID. Optionally schedule the challenge to start and end with the `start_at` and `end_at` parameters. [block:code] { "codes": [ { "code": "POST /challenges/123/publish HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"start_at\": \"sdfsdf\",\n \"end_at\": \"sdfsdf\",\n \"participant_limit\": \"3\"\n)", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"OK\"\n}", "language": "json", "name": "200 : OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot publish challenge\"\n }\n}", "language": "json", "name": "422-Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Publish a challenge identified by challenge ID. Optionally schedule the challenge to start and end with the `start_at` and `end_at` parameters. [block:code] { "codes": [ { "code": "POST /challenges/123/publish HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"start_at\": \"sdfsdf\",\n \"end_at\": \"sdfsdf\",\n \"participant_limit\": \"3\"\n)", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"OK\"\n}", "language": "json", "name": "200 : OK" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot publish challenge\"\n }\n}", "language": "json", "name": "422-Unprocessed Entity" } ] } [/block]
{"_id":"5782f3220d51ec0e00c646b2","createdAt":"2016-07-11T01:15:14.774Z","editedParams2":true,"isReference":true,"link_external":false,"title":"Unpublish a Challenge","updates":[],"category":"5782f2e69ba6ea0e0078741d","editedParams":true,"parentDoc":null,"type":"post","slug":"unpublish-a-challenge","sync_unique":"","api":{"auth":"required","examples":{"codes":[{"language":"json","code":"POST /challenges/123/unpublish HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"post","params":[{"name":"id","ref":"","required":true,"type":"string","in":"path","_id":"5782f43c89ad100e00ab3e76","default":"","desc":"Challenge ID"}],"results":{"codes":[{"name":"","code":"{\n  \"status\": \"ok\"\n}","language":"json","status":200},{"name":"","code":"{\n  \"error\": {\n    \"message\": \"Cannot unpublish challenge\"\n  }\n}","language":"json","status":422}]},"settings":"56410453a6a9e90d008d8120","url":"/challenges/:id/unpublish"},"body":"Unpublish a challenge identified by challenge ID\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /challenges/123/unarchive HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"status\\\": \\\"ok\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 - Created\"\n    },\n    {\n      \"code\": \"{\\n  \\\"error\\\": {\\n    \\\"message\\\": \\\"Cannot unpublish challenge\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"422-Unprocessed Entity\"\n    }\n  ]\n}\n[/block]","githubsync":"","hidden":false,"link_url":"","order":3,"version":"5640b1fe2b14f70d0039b8b0","__v":1,"excerpt":"","project":"5640b1fd2b14f70d0039b8ad","user":"54afec2fed9ada1400afbf85","childrenPages":[]}

postUnpublish a Challenge


Path Params

id:
required
string
Challenge ID
Unpublish a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"ok\"\n}", "language": "json", "name": "200 - Created" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot unpublish challenge\"\n }\n}", "language": "json", "name": "422-Unprocessed Entity" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Unpublish a challenge identified by challenge ID [block:code] { "codes": [ { "code": "POST /challenges/123/unarchive HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"status\": \"ok\"\n}", "language": "json", "name": "200 - Created" }, { "code": "{\n \"error\": {\n \"message\": \"Cannot unpublish challenge\"\n }\n}", "language": "json", "name": "422-Unprocessed Entity" } ] } [/block]
{"_id":"5a565ce13c9aab00124e3780","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782f2e69ba6ea0e0078741d","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-10T18:35:13.895Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 253,\n    \"name\": \"New Challenge with a cooooool image\",\n    \"headline\": \"Challenge Headline\",\n    \"description\": \"Challenge description\",\n  \t\"uuid\": \"c759e8f9-8b3z-4e16-8b7d-562d6c5d29d5\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5a565e50b50e460012555176","ref":"","in":"body","required":false,"desc":"the api code specified in a challenge template","default":"","type":"string","name":"template_code"},{"_id":"5a565e50b50e460012555175","ref":"","in":"body","required":false,"desc":"the headline for the challenge","default":"","type":"string","name":"headline"},{"_id":"5a565e50b50e460012555174","ref":"","in":"body","required":false,"desc":"the description for a challenge","default":"","type":"long","name":"description"},{"_id":"5a565e50b50e460012555173","ref":"","in":"body","required":false,"desc":"id, email, crm_contact_Id, first_name, last_name for the advocate","default":"","type":"array_object","name":"advocates"}],"url":"/challenges/create_by_template","examples":{"codes":[{"language":"json","code":"POST /challenges/create_by_template HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"template_code\": \"templatecode123\",\n\"headline\": \"Challenge Headline\",\n\"description\": \"Challenge description\",\n\"advocates\": [\n\t{\n\t\"id\":\"13\" ,\n\t\"email\":\"\",\n\t\"crm_contact_id\": \"\",\n\t\"first_name\": \"\",\n\t\"last_name\": \"\"\n\t}\n]\n}"}]},"method":"post"},"isReference":true,"order":4,"body":"This call allows an API user to create a new challenge off a template within the challenge template library.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /challenges/create_by_template HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n\\\"template_code\\\": \\\"templatecode123\\\",\\n\\\"headline\\\": \\\"Challenge Headline\\\",\\n\\\"description\\\": \\\"Challenge description\\\",\\n\\\"advocates\\\": [\\n\\t{\\n\\t\\\"id\\\":\\\"13\\\" ,\\n\\t\\\"email\\\":\\\"\\\",\\n\\t\\\"crm_contact_id\\\": \\\"\\\",\\n\\t\\\"first_name\\\": \\\"\\\",\\n\\t\\\"last_name\\\": \\\"\\\"\\n\\t}\\n]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThis call will yield a response of:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"id\\\": 253,\\n    \\\"name\\\": \\\"New Challenge with a cooooool image\\\",\\n    \\\"headline\\\": \\\"Challenge Headline\\\",\\n    \\\"description\\\": \\\"Challenge description\\\",\\n  \\t\\\"uuid\\\": \\\"c759e8f9-8b3z-4e16-8b7d-562d6c5d29d5\\\"\\n  \\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"create-a-challenge-off-a-template","type":"post","title":"Create a challenge off a template","__v":4,"parentDoc":null,"childrenPages":[]}

postCreate a challenge off a template


Body Params

template_code:
string
the api code specified in a challenge template
headline:
string
the headline for the challenge
description:
long
the description for a challenge
advocates:
array of objects
id, email, crm_contact_Id, first_name, last_name for the advocate
This call allows an API user to create a new challenge off a template within the challenge template library. [block:code] { "codes": [ { "code": "POST /challenges/create_by_template HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"template_code\": \"templatecode123\",\n\"headline\": \"Challenge Headline\",\n\"description\": \"Challenge description\",\n\"advocates\": [\n\t{\n\t\"id\":\"13\" ,\n\t\"email\":\"\",\n\t\"crm_contact_id\": \"\",\n\t\"first_name\": \"\",\n\t\"last_name\": \"\"\n\t}\n]\n}", "language": "json" } ] } [/block] This call will yield a response of: [block:code] { "codes": [ { "code": "{\n \"id\": 253,\n \"name\": \"New Challenge with a cooooool image\",\n \"headline\": \"Challenge Headline\",\n \"description\": \"Challenge description\",\n \t\"uuid\": \"c759e8f9-8b3z-4e16-8b7d-562d6c5d29d5\"\n \n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call allows an API user to create a new challenge off a template within the challenge template library. [block:code] { "codes": [ { "code": "POST /challenges/create_by_template HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n\"template_code\": \"templatecode123\",\n\"headline\": \"Challenge Headline\",\n\"description\": \"Challenge description\",\n\"advocates\": [\n\t{\n\t\"id\":\"13\" ,\n\t\"email\":\"\",\n\t\"crm_contact_id\": \"\",\n\t\"first_name\": \"\",\n\t\"last_name\": \"\"\n\t}\n]\n}", "language": "json" } ] } [/block] This call will yield a response of: [block:code] { "codes": [ { "code": "{\n \"id\": 253,\n \"name\": \"New Challenge with a cooooool image\",\n \"headline\": \"Challenge Headline\",\n \"description\": \"Challenge description\",\n \t\"uuid\": \"c759e8f9-8b3z-4e16-8b7d-562d6c5d29d5\"\n \n}", "language": "json" } ] } [/block]
{"_id":"5ae1b568fbbe7000034149e8","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782f2e69ba6ea0e0078741d","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-26T11:18:00.458Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  \"collection\": [1, 2, 3, 4],\n  \"limit\": 10,\n  \"offset\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"56410453a6a9e90d008d8120","auth":"required","params":[{"_id":"5ae1b6040c900b0003c239c4","ref":"","in":"path","required":true,"desc":"Challenge UUID","default":"","type":"string","name":"challenge_id"},{"_id":"5ae1b6040c900b0003c239c3","ref":"","in":"query","required":false,"desc":"Collection size limit","default":"","type":"int","name":"limit"},{"_id":"5ae1b6040c900b0003c239c2","ref":"","in":"query","required":false,"desc":"Collection offset","default":"","type":"int","name":"offset"}],"url":"/challenges/:challenge_id/questions","examples":{"codes":[{"language":"text","code":"GET /challenges/6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8/questions?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303"}]},"method":"get"},"isReference":true,"order":5,"body":"This call is used to retrieve list of question ids for given challenge. Limit is capped at 100.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /challenges/6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8/questions?limit=10&offset=0 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/vnd.infl-v3+json\\nContent-Type: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nResponds with object like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"collection\\\": [1, 2, 3, 4],\\n  \\\"limit\\\": 10,\\n  \\\"offset\\\": 0\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-challenges-question-ids","type":"get","title":"Get challenge's question ids","__v":11,"parentDoc":null,"childrenPages":[]}

getGet challenge's question ids


Path Params

challenge_id:
required
string
Challenge UUID

Query Params

limit:
integer
Collection size limit
offset:
integer
Collection offset
This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8/questions?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [1, 2, 3, 4],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8/questions?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [1, 2, 3, 4],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]
{"_id":"5ae1d82b4ee4da0003c98b1a","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782f2e69ba6ea0e0078741d","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-26T13:46:19.854Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"text","code":"GET /challenges/challenge_ids?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303"}]},"settings":"56410453a6a9e90d008d8120","results":{"codes":[{"name":"","code":"{\n  \"collection\": [\"6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8\", \"36060b1c-e700-4589-b945-accfd64460c8\"],\n  \"limit\": 10,\n  \"offset\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"auth":"required","params":[{"_id":"5ae1d82b4ee4da0003c98b1b","ref":"","in":"query","required":false,"desc":"Only challenges with questions","default":"","type":"boolean","name":"questions_only"},{"_id":"5ae1b6040c900b0003c239c3","ref":"","in":"query","required":false,"desc":"Collection size limit","default":"","type":"int","name":"limit"},{"_id":"5ae1b6040c900b0003c239c2","ref":"","in":"query","required":false,"desc":"Collection offset","default":"","type":"int","name":"offset"}],"url":"/challenges/challenge_ids"},"isReference":true,"order":6,"body":"This call is used to retrieve list of question ids for given challenge. Limit is capped at 100.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /challenges/challenge_ids?limit=10&offset=0 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/vnd.infl-v3+json\\nContent-Type: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nResponds with object like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"collection\\\": [\\\"6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8\\\", \\\"36060b1c-e700-4589-b945-accfd64460c8\\\"],\\n  \\\"limit\\\": 10,\\n  \\\"offset\\\": 0\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-list-of-challenge-ids","type":"get","title":"Get list of challenge IDs","__v":5,"parentDoc":null,"childrenPages":[]}

getGet list of challenge IDs


Query Params

questions_only:
boolean
Only challenges with questions
limit:
integer
Collection size limit
offset:
integer
Collection offset
This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/challenge_ids?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [\"6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8\", \"36060b1c-e700-4589-b945-accfd64460c8\"],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/challenge_ids?limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [\"6fde8516-1be7-47a8-9eb1-1a18eb7bb5b8\", \"36060b1c-e700-4589-b945-accfd64460c8\"],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]
{"_id":"5b2a926e65e9720003b4ff0e","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782f2e69ba6ea0e0078741d","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-20T17:44:14.120Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  \"collection\": [\"240272e8-ef1a-4285-b630-43345ca87742\"],\n  \"limit\": 10,\n  \"offset\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"56410453a6a9e90d008d8120","examples":{"codes":[{"language":"text","code":"GET challenges/questions/responses?question_ids%5B%5D=15&contact_ids%5B%5D=c707e4dd-8af3-411a-bd4b-dfbbae561428&limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303"}]},"method":"get","auth":"required","params":[{"_id":"5ae1d82b4ee4da0003c98b1b","ref":"","in":"query","required":true,"desc":"List of question IDs","default":"","type":"array_int","name":"question_ids"},{"_id":"5ae1b6040c900b0003c239c3","ref":"","in":"query","required":false,"desc":"List of contact UUIDs","default":"","type":"array_string","name":"contact_ids"},{"_id":"5b2a926e65e9720003b4ff0f","ref":"","in":"query","required":false,"desc":"Collection size limit","default":"","type":"int","name":"limit"},{"_id":"5ae1b6040c900b0003c239c2","ref":"","in":"query","required":false,"desc":"Collection offset","default":"","type":"int","name":"offset"}],"url":"/challenges/questions/responses"},"isReference":true,"order":7,"body":"This call is used to retrieve list of question ids for given challenge. Limit is capped at 100.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET challenges/questions/responses?question_ids%5B%5D=15&contact_ids%5B%5D=c707e4dd-8af3-411a-bd4b-dfbbae561428&limit=10&offset=0 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/vnd.infl-v3+json\\nContent-Type: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nResponds with object like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"collection\\\": [\\\"240272e8-ef1a-4285-b630-43345ca87742\\\"],\\n  \\\"limit\\\": 10,\\n  \\\"offset\\\": 0\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-challenge-question-responses","type":"get","title":"Get challenge question responses","__v":1,"parentDoc":null,"childrenPages":[]}

getGet challenge question responses


Query Params

question_ids:
required
array of integers
List of question IDs
contact_ids:
array of strings
List of contact UUIDs
limit:
integer
Collection size limit
offset:
integer
Collection offset
This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET challenges/questions/responses?question_ids%5B%5D=15&contact_ids%5B%5D=c707e4dd-8af3-411a-bd4b-dfbbae561428&limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [\"240272e8-ef1a-4285-b630-43345ca87742\"],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET challenges/questions/responses?question_ids%5B%5D=15&contact_ids%5B%5D=c707e4dd-8af3-411a-bd4b-dfbbae561428&limit=10&offset=0 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n \"collection\": [\"240272e8-ef1a-4285-b630-43345ca87742\"],\n \"limit\": 10,\n \"offset\": 0\n}", "language": "json" } ] } [/block]
{"_id":"5b2a9440de736b0003c079cd","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5782f2e69ba6ea0e0078741d","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-20T17:52:00.675Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"text","code":"GET /challenges/5fc9a663-d74f-4b48-bac5-da33249051f1/details HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303"}]},"settings":"56410453a6a9e90d008d8120","results":{"codes":[{"name":"","code":"{\n\t\"id\": 1,\n\t\"uuid\": \"5fc9a663-d74f-4b48-bac5-da33249051f1\",\n\t\"name\": \"Test\",\n\t\"headline\": \"Test\",\n\t\"description\": \"Test\",\n\t\"state\": \"active\",\n\t\"visibility\": {\n\t\t\"start_at\": \"2018-06-20T04:00:00.000Z\",\n\t\t\"end_at\": null,\n\t\t\"published\": true,\n\t\t\"participant_limit\": null\n\t}\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"auth":"required","params":[{"_id":"5ae1b6040c900b0003c239c4","ref":"","in":"path","required":true,"desc":"Challenge UUID","default":"","type":"string","name":"uuid"}],"url":"/challenges/:uuid/details"},"isReference":true,"order":8,"body":"This call is used to retrieve list of question ids for given challenge. Limit is capped at 100.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /challenges/5fc9a663-d74f-4b48-bac5-da33249051f1/details HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/vnd.infl-v3+json\\nContent-Type: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nResponds with object like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"id\\\": 1,\\n\\t\\\"uuid\\\": \\\"5fc9a663-d74f-4b48-bac5-da33249051f1\\\",\\n\\t\\\"name\\\": \\\"Test\\\",\\n\\t\\\"headline\\\": \\\"Test\\\",\\n\\t\\\"description\\\": \\\"Test\\\",\\n\\t\\\"state\\\": \\\"active\\\",\\n\\t\\\"visibility\\\": {\\n\\t\\t\\\"start_at\\\": \\\"2018-06-20T04:00:00.000Z\\\",\\n\\t\\t\\\"end_at\\\": null,\\n\\t\\t\\\"published\\\": true,\\n\\t\\t\\\"participant_limit\\\": null\\n\\t}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-challenge-details","type":"get","title":"Get challenge details","__v":1,"parentDoc":null,"childrenPages":[]}

getGet challenge details


Path Params

uuid:
required
string
Challenge UUID
This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/5fc9a663-d74f-4b48-bac5-da33249051f1/details HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n\t\"id\": 1,\n\t\"uuid\": \"5fc9a663-d74f-4b48-bac5-da33249051f1\",\n\t\"name\": \"Test\",\n\t\"headline\": \"Test\",\n\t\"description\": \"Test\",\n\t\"state\": \"active\",\n\t\"visibility\": {\n\t\t\"start_at\": \"2018-06-20T04:00:00.000Z\",\n\t\t\"end_at\": null,\n\t\t\"published\": true,\n\t\t\"participant_limit\": null\n\t}\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call is used to retrieve list of question ids for given challenge. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/5fc9a663-d74f-4b48-bac5-da33249051f1/details HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] Responds with object like: [block:code] { "codes": [ { "code": "{\n\t\"id\": 1,\n\t\"uuid\": \"5fc9a663-d74f-4b48-bac5-da33249051f1\",\n\t\"name\": \"Test\",\n\t\"headline\": \"Test\",\n\t\"description\": \"Test\",\n\t\"state\": \"active\",\n\t\"visibility\": {\n\t\t\"start_at\": \"2018-06-20T04:00:00.000Z\",\n\t\t\"end_at\": null,\n\t\t\"published\": true,\n\t\t\"participant_limit\": null\n\t}\n}", "language": "json" } ] } [/block]
{"_id":"5651cd1d03dd102b00df031f","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"parentDoc":null,"sync_unique":"","user":"54afec2fed9ada1400afbf85","type":"basic","__v":22,"category":"564103f2d4b2e00d00bb3dec","githubsync":"","slug":"getting-started-with-the-referrals-api","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Getting Started with Referrals API\"\n}\n[/block]\nThe referrals JSON REST api can be used to fetch, create and advance referrals given through Influitive's referral service. Referral creation is very much specific to the campaign you've configured, so the fields below are likely to change based on your configuration. Every field given here should map directly to the `field_name` property of each field configured on your referral campaign under the `Form Setup` section.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authorization\"\n}\n[/block]\nThe referrals api requires 2 pieces of identification, given in the form of headers:   \n\n* Organization Id *(identifies which company you are)*\n* Authorization token *(identifies which user you're requesting data under)*\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Your X_ORG_ID and Authorization token can be seen in the Integration Library under \\\"Influitive API\\\":\\n\\nIntegration Library → Influitive API → Manage → Configuration\\n\\n![alt text](https://i.imgur.com/taFotfW.png  =50x50)\\n\\n![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)\",\n  \"title\": \"Where to find your ORG_ID and Authorization Token\"\n}\n[/block]\nThese are passed in using the following headers to the json request:\n\nexample:\n\n`X_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3`\n\n`Authorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30 `","excerpt":"","order":0,"project":"5640b1fd2b14f70d0039b8ad","title":"Referrals API","updates":[],"version":"5640b1fe2b14f70d0039b8b0","createdAt":"2015-11-22T14:11:41.022Z","hidden":false,"isReference":true,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"childrenPages":[]}

Referrals API


[block:api-header] { "type": "basic", "title": "Getting Started with Referrals API" } [/block] The referrals JSON REST api can be used to fetch, create and advance referrals given through Influitive's referral service. Referral creation is very much specific to the campaign you've configured, so the fields below are likely to change based on your configuration. Every field given here should map directly to the `field_name` property of each field configured on your referral campaign under the `Form Setup` section. [block:api-header] { "type": "basic", "title": "Authorization" } [/block] The referrals api requires 2 pieces of identification, given in the form of headers: * Organization Id *(identifies which company you are)* * Authorization token *(identifies which user you're requesting data under)* [block:callout] { "type": "info", "body": "Your X_ORG_ID and Authorization token can be seen in the Integration Library under \"Influitive API\":\n\nIntegration Library → Influitive API → Manage → Configuration\n\n![alt text](https://i.imgur.com/taFotfW.png =50x50)\n\n![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)", "title": "Where to find your ORG_ID and Authorization Token" } [/block] These are passed in using the following headers to the json request: example: `X_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3` `Authorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30 `
[block:api-header] { "type": "basic", "title": "Getting Started with Referrals API" } [/block] The referrals JSON REST api can be used to fetch, create and advance referrals given through Influitive's referral service. Referral creation is very much specific to the campaign you've configured, so the fields below are likely to change based on your configuration. Every field given here should map directly to the `field_name` property of each field configured on your referral campaign under the `Form Setup` section. [block:api-header] { "type": "basic", "title": "Authorization" } [/block] The referrals api requires 2 pieces of identification, given in the form of headers: * Organization Id *(identifies which company you are)* * Authorization token *(identifies which user you're requesting data under)* [block:callout] { "type": "info", "body": "Your X_ORG_ID and Authorization token can be seen in the Integration Library under \"Influitive API\":\n\nIntegration Library → Influitive API → Manage → Configuration\n\n![alt text](https://i.imgur.com/taFotfW.png =50x50)\n\n![alt text](https://i.imgur.com/TXQWyYJ.png =50x50)", "title": "Where to find your ORG_ID and Authorization Token" } [/block] These are passed in using the following headers to the json request: example: `X_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3` `Authorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30 `
{"_id":"5641230ad300ef0d0099e42a","order":1,"project":"5640b1fd2b14f70d0039b8ad","type":"post","createdAt":"2015-11-09T22:49:46.734Z","isReference":true,"editedParams":true,"updates":[],"api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"post","params":[{"ref":"","required":true,"desc":"Referral details","default":"","type":"object","name":"prospect","in":"body","_id":"5651cddd03dd102b00df0323"},{"type":"object","name":"contact","in":"body","_id":"5651cddd03dd102b00df0322","ref":"","required":true,"desc":"One of email or share_token is required","default":""},{"type":"string","name":"campaign_id","in":"body","_id":"5651cddd03dd102b00df0321","ref":"","required":true,"desc":"Referral campaign (found in the URL when you edit a campaign).","default":""},{"required":false,"desc":"choose the milestone the advocate should advance to when the referral is created","default":"","type":"string","name":"status","in":"body","_id":"572b76731b0ae70e0046396e","ref":""}],"results":{"codes":[{"status":400,"language":"json","code":"{}","name":""}]},"settings":"56410453a6a9e90d008d8120","url":"/referrals"},"category":"564103f2d4b2e00d00bb3dec","excerpt":"","githubsync":"","hidden":false,"link_external":false,"parentDoc":null,"title":"Create A Referral","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example 1: Create a referral from an external form\"\n}\n[/block]\nGiven a referral campaign with the following field names\n\n> Prospect\n* first_name\n* last_name\n* email\n* title\n\n\n> Contact\n* first_name\n* last_name\n* email\n\n\nA referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` \n\nAn http call to the service to create a referral would look like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /referrals HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\\"referral\\\":\\n  {\\\"prospect\\\":{\\n    \\\"first_name\\\":\\\"Some\\\",\\n    \\\"last_name\\\":\\\"Prospect\\\",\\n    \\\"email\\\":\\\"some@prospect.com\\\",\\n    \\\"title\\\":\\\"CMO\\\"\\n  },\\n  \\\"contact\\\":{\\n    \\\"first_name\\\":\\\"Johnny\\\",\\n    \\\"last_name\\\":\\\"Advocate\\\",\\n    \\\"email\\\":\\\"johnny@advocate.com\\\"\\n  },\\n  \\\"campaign_id\\\":\\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\"}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nyields a response of:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 201 Created\\nContent-Type: application/json; charset=utf-8\\n\\n{\\\"referral\\\":\\n  {\\n    \\\"id\\\":\\\"8844c236-4ec0-488d-b541-7a3da5873bfb\\\",\\n    \\\"created_at\\\":\\\"2015-11-02T17:53:19.935Z\\\",\\n    \\\"campaign_id\\\":\\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\",\\n    \\\"status\\\":\\\"submitted\\\",\\n    \\\"contact\\\":{\\n      \\\"id\\\":\\\"a3019e91-cf25-4175-b365-4cb4a4f2e063\\\",\\n      \\\"email\\\":\\\"johnny@advocate.com\\\",\\n      \\\"first_name\\\":\\\"Johnny\\\",\\n      \\\"last_name\\\":\\\"Advocate\\\",\\n      \\\"member\\\":false\\n    },\\n    \\\"prospect\\\":{\\n      \\\"id\\\":\\\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\\\",\\n      \\\"email\\\":\\\"some@prospect.com\\\",\\n      \\\"first_name\\\":\\\"Some\\\",\\n      \\\"last_name\\\":\\\"Prospect\\\",\\n      \\\"lead_source\\\":\\\"influitive\\\",\\n      \\\"title\\\":\\\"CMO\\\"},\\n    \\\"milestones_reached\\\":[\\n      {\\\"label\\\":\\\"Submitted\\\",\\\"status\\\":\\\"submitted\\\",\\\"feedback\\\":null,\\\"points\\\":0,}\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example 2: Create a referral from a share token\"\n}\n[/block]\nGiven a referral campaign with the following field names\n\n> Prospect\n* email\n\n\n> Contact\n* share_token\n\n\nA referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` \n\nA milestone with the status of  `won` that is to be advanced to upon the referral's creation. \n\nAn http call to the service to create a referral would look like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /referrals HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\\"referral\\\":\\n  {\\n    \\\"prospect\\\": \\n    {\\n     \\\"email\\\":\\\"some@prospect.com\\\"\\n    },\\n  \\\"contact\\\":\\n    {\\n        \\\"share_token\\\": \\\"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\\\"\\n    },\\n  \\\"campaign_id\\\":\\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\",\\n  \\\"status\\\": \\\"won\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nyields a response of:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"referral\\\": {\\n    \\\"id\\\": \\\"dc28008d-4e94-403a-bbca-7d19a4a9fb70\\\",\\n    \\\"created_at\\\": \\\"2016-05-05T16:37:54.097Z\\\",\\n    \\\"updated_at\\\": \\\"2016-05-05T16:37:54.162Z\\\",\\n    \\\"campaign_id\\\": \\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\",\\n    \\\"context\\\": \\\"self\\\",\\n    \\\"contact\\\": {\\n      \\\"id\\\": \\\"d5a64921-3099-40b7-9541-92ddf87450f2\\\",\\n      \\\"email\\\": \\\"johnny@advocate.com\\\",\\n      \\\"first_name\\\": \\\"Johnny\\\",\\n      \\\"last_name\\\": \\\"Advocate\\\",\\n      \\\"member\\\": true,\\n      \\\"title\\\": null,\\n      \\\"company\\\": null,\\n      \\\"share_token\\\": \\\"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\\\",\\n      \\\"company_id\\\": \\\"f0b86194-907f-48df-bd64-d667341a12c9\\\"\\n    },\\n    \\\"prospect\\\": {\\n      \\\"id\\\": \\\"614ee329-af4f-4872-a712-19df444ffdce\\\",\\n      \\\"email\\\": \\\"some@prospect.com\\\",\\n      \\\"first_name\\\": null,\\n      \\\"last_name\\\": null,\\n      \\\"company\\\": null\\n    },\\n    \\\"status\\\": {\\n      \\\"code\\\": \\\"won\\\",\\n      \\\"label\\\": \\\"Won\\\",\\n      \\\"type\\\": \\\"won\\\"\\n    },\\n    \\\"milestones_reached\\\": [\\n      {\\n        \\\"label\\\": \\\"Submitted\\\",\\n        \\\"status\\\": \\\"submitted\\\",\\n        \\\"status_type\\\": \\\"in_progress\\\",\\n        \\\"feedback\\\": null,\\n        \\\"points\\\": 0,\\n        \\\"reached_at\\\": \\\"2016-05-05T16:37:54.099Z\\\"\\n      },\\n      {\\n        \\\"label\\\": \\\"Won\\\",\\n        \\\"status\\\": \\\"won\\\",\\n        \\\"status_type\\\": \\\"won\\\",\\n        \\\"feedback\\\": null,\\n        \\\"points\\\": 0,\\n        \\\"reached_at\\\": \\\"2016-05-05T16:37:54.164Z\\\"\\n      }\\n    ]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","link_url":"","slug":"create-a-referral","sync_unique":"","user":"5640bc51eaede117005c99dd","version":"5640b1fe2b14f70d0039b8b0","__v":6,"editedParams2":true,"childrenPages":[]}

postCreate A Referral


Body Params

prospect:
required
object
Referral details
contact:
required
object
One of email or share_token is required
campaign_id:
required
string
Referral campaign (found in the URL when you edit a campaign).
status:
string
choose the milestone the advocate should advance to when the referral is created
[block:api-header] { "type": "basic", "title": "Example 1: Create a referral from an external form" } [/block] Given a referral campaign with the following field names > Prospect * first_name * last_name * email * title > Contact * first_name * last_name * email A referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` An http call to the service to create a referral would look like this: [block:code] { "codes": [ { "code": "POST /referrals HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"referral\":\n {\"prospect\":{\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"email\":\"some@prospect.com\",\n \"title\":\"CMO\"\n },\n \"contact\":{\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"email\":\"johnny@advocate.com\"\n },\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\"}\n}", "language": "json" } ] } [/block] yields a response of: [block:code] { "codes": [ { "code": "HTTP/1.1 201 Created\nContent-Type: application/json; charset=utf-8\n\n{\"referral\":\n {\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"created_at\":\"2015-11-02T17:53:19.935Z\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"submitted\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\n \"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"lead_source\":\"influitive\",\n \"title\":\"CMO\"},\n \"milestones_reached\":[\n {\"label\":\"Submitted\",\"status\":\"submitted\",\"feedback\":null,\"points\":0,}\n ]\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Example 2: Create a referral from a share token" } [/block] Given a referral campaign with the following field names > Prospect * email > Contact * share_token A referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` A milestone with the status of `won` that is to be advanced to upon the referral's creation. An http call to the service to create a referral would look like this: [block:code] { "codes": [ { "code": "POST /referrals HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"referral\":\n {\n \"prospect\": \n {\n \"email\":\"some@prospect.com\"\n },\n \"contact\":\n {\n \"share_token\": \"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\"\n },\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\": \"won\"\n }\n}", "language": "json" } ] } [/block] yields a response of: [block:code] { "codes": [ { "code": "{\n \"referral\": {\n \"id\": \"dc28008d-4e94-403a-bbca-7d19a4a9fb70\",\n \"created_at\": \"2016-05-05T16:37:54.097Z\",\n \"updated_at\": \"2016-05-05T16:37:54.162Z\",\n \"campaign_id\": \"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"context\": \"self\",\n \"contact\": {\n \"id\": \"d5a64921-3099-40b7-9541-92ddf87450f2\",\n \"email\": \"johnny@advocate.com\",\n \"first_name\": \"Johnny\",\n \"last_name\": \"Advocate\",\n \"member\": true,\n \"title\": null,\n \"company\": null,\n \"share_token\": \"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\",\n \"company_id\": \"f0b86194-907f-48df-bd64-d667341a12c9\"\n },\n \"prospect\": {\n \"id\": \"614ee329-af4f-4872-a712-19df444ffdce\",\n \"email\": \"some@prospect.com\",\n \"first_name\": null,\n \"last_name\": null,\n \"company\": null\n },\n \"status\": {\n \"code\": \"won\",\n \"label\": \"Won\",\n \"type\": \"won\"\n },\n \"milestones_reached\": [\n {\n \"label\": \"Submitted\",\n \"status\": \"submitted\",\n \"status_type\": \"in_progress\",\n \"feedback\": null,\n \"points\": 0,\n \"reached_at\": \"2016-05-05T16:37:54.099Z\"\n },\n {\n \"label\": \"Won\",\n \"status\": \"won\",\n \"status_type\": \"won\",\n \"feedback\": null,\n \"points\": 0,\n \"reached_at\": \"2016-05-05T16:37:54.164Z\"\n }\n ]\n }\n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:api-header] { "type": "basic", "title": "Example 1: Create a referral from an external form" } [/block] Given a referral campaign with the following field names > Prospect * first_name * last_name * email * title > Contact * first_name * last_name * email A referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` An http call to the service to create a referral would look like this: [block:code] { "codes": [ { "code": "POST /referrals HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"referral\":\n {\"prospect\":{\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"email\":\"some@prospect.com\",\n \"title\":\"CMO\"\n },\n \"contact\":{\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"email\":\"johnny@advocate.com\"\n },\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\"}\n}", "language": "json" } ] } [/block] yields a response of: [block:code] { "codes": [ { "code": "HTTP/1.1 201 Created\nContent-Type: application/json; charset=utf-8\n\n{\"referral\":\n {\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"created_at\":\"2015-11-02T17:53:19.935Z\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"submitted\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\n \"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"lead_source\":\"influitive\",\n \"title\":\"CMO\"},\n \"milestones_reached\":[\n {\"label\":\"Submitted\",\"status\":\"submitted\",\"feedback\":null,\"points\":0,}\n ]\n }\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Example 2: Create a referral from a share token" } [/block] Given a referral campaign with the following field names > Prospect * email > Contact * share_token A referral campaign with id of `98160557-5a70-4306-949e-ee8d2ea7f4b4` A milestone with the status of `won` that is to be advanced to upon the referral's creation. An http call to the service to create a referral would look like this: [block:code] { "codes": [ { "code": "POST /referrals HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"referral\":\n {\n \"prospect\": \n {\n \"email\":\"some@prospect.com\"\n },\n \"contact\":\n {\n \"share_token\": \"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\"\n },\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\": \"won\"\n }\n}", "language": "json" } ] } [/block] yields a response of: [block:code] { "codes": [ { "code": "{\n \"referral\": {\n \"id\": \"dc28008d-4e94-403a-bbca-7d19a4a9fb70\",\n \"created_at\": \"2016-05-05T16:37:54.097Z\",\n \"updated_at\": \"2016-05-05T16:37:54.162Z\",\n \"campaign_id\": \"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"context\": \"self\",\n \"contact\": {\n \"id\": \"d5a64921-3099-40b7-9541-92ddf87450f2\",\n \"email\": \"johnny@advocate.com\",\n \"first_name\": \"Johnny\",\n \"last_name\": \"Advocate\",\n \"member\": true,\n \"title\": null,\n \"company\": null,\n \"share_token\": \"hhh4ca59-50f8-42dd-91d9-eff7fa4565b0\",\n \"company_id\": \"f0b86194-907f-48df-bd64-d667341a12c9\"\n },\n \"prospect\": {\n \"id\": \"614ee329-af4f-4872-a712-19df444ffdce\",\n \"email\": \"some@prospect.com\",\n \"first_name\": null,\n \"last_name\": null,\n \"company\": null\n },\n \"status\": {\n \"code\": \"won\",\n \"label\": \"Won\",\n \"type\": \"won\"\n },\n \"milestones_reached\": [\n {\n \"label\": \"Submitted\",\n \"status\": \"submitted\",\n \"status_type\": \"in_progress\",\n \"feedback\": null,\n \"points\": 0,\n \"reached_at\": \"2016-05-05T16:37:54.099Z\"\n },\n {\n \"label\": \"Won\",\n \"status\": \"won\",\n \"status_type\": \"won\",\n \"feedback\": null,\n \"points\": 0,\n \"reached_at\": \"2016-05-05T16:37:54.164Z\"\n }\n ]\n }\n}", "language": "json" } ] } [/block]
{"_id":"564125de2a2a4c0d00c69789","sync_unique":"","title":"Advancing A Referral","updates":[],"category":"564103f2d4b2e00d00bb3dec","link_external":false,"order":2,"project":"5640b1fd2b14f70d0039b8ad","slug":"advancing-a-referral","body":"Given the above referral in the system, and a referral campaign milestone configured with an api code of `qualified`, the next call would advance a referral from the initial milestone of `submitted` up to `qualified`.  \n\nThis call also provides *optional* `feedback` for this milestone transition that is displayed back to the advocate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PUT /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb/milestones/qualified HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\\"feedback\\\":\\\"Great thanks!\\\"}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","githubsync":"","isReference":true,"link_url":"","parentDoc":null,"user":"5640bc51eaede117005c99dd","__v":2,"api":{"auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"put","params":[{"_id":"56413f7b38e37e0d0049fddc","default":"","desc":"id for a specific referral","name":"referral_id","required":true,"type":"string","in":"path"},{"in":"path","_id":"56413f7b38e37e0d0049fddb","default":"","desc":"milestone to advance the referral to","name":"milestone","required":true,"type":"string"},{"default":"","type":"string","name":"feedback","in":"body","_id":"5651ce4d03dd102b00df0324","required":false,"desc":"any feedback you would like the advocate"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"56410453a6a9e90d008d8120","url":"/referrals/:referral_id/milestones/:milestone"},"editedParams":true,"hidden":false,"version":"5640b1fe2b14f70d0039b8b0","createdAt":"2015-11-09T23:01:50.822Z","editedParams2":true,"type":"put","childrenPages":[]}

putAdvancing A Referral


Path Params

referral_id:
required
string
id for a specific referral
milestone:
required
string
milestone to advance the referral to

Body Params

feedback:
string
any feedback you would like the advocate
Given the above referral in the system, and a referral campaign milestone configured with an api code of `qualified`, the next call would advance a referral from the initial milestone of `submitted` up to `qualified`. This call also provides *optional* `feedback` for this milestone transition that is displayed back to the advocate. [block:code] { "codes": [ { "code": "PUT /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb/milestones/qualified HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"feedback\":\"Great thanks!\"}", "language": "json" } ] } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



Given the above referral in the system, and a referral campaign milestone configured with an api code of `qualified`, the next call would advance a referral from the initial milestone of `submitted` up to `qualified`. This call also provides *optional* `feedback` for this milestone transition that is displayed back to the advocate. [block:code] { "codes": [ { "code": "PUT /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb/milestones/qualified HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\"feedback\":\"Great thanks!\"}", "language": "json" } ] } [/block]
{"_id":"5783328689ad100e00ab3ead","createdAt":"2016-07-11T05:45:42.188Z","hidden":false,"slug":"advance-a-referral-from-sfdc-workflow","version":"5640b1fe2b14f70d0039b8b0","category":"564103f2d4b2e00d00bb3dec","body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"alert(test('123')); // should return '123!'\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","githubsync":"","isReference":true,"link_external":false,"parentDoc":null,"type":"options","updates":[],"__v":0,"user":"54afec2fed9ada1400afbf85","api":{"url":"","auth":"required","examples":{"codes":[]},"method":"options","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"excerpt":"","sync_unique":"","title":"Advance a referral from SFDC workflow","order":3,"project":"5640b1fd2b14f70d0039b8ad","link_url":"","childrenPages":[]}

optionsAdvance a referral from SFDC workflow


Lorem ipsum dolor sit amet, consectetur adipiscing elit. [block:code] { "codes": [ { "code": "alert(test('123')); // should return '123!'", "language": "javascript" } ] } [/block]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. [block:code] { "codes": [ { "code": "alert(test('123')); // should return '123!'", "language": "javascript" } ] } [/block]
{"_id":"5641071fd4b2e00d00bb3df1","parentDoc":null,"slug":"listing-referrals","sync_unique":"","body":"The following will return a list of all referrals given in the system:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /referrals HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nWhich will return a response like:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 304 Not Modified\\n\\n{\\\"referrals\\\":[\\n  {\\n    \\\"id\\\":\\\"8844c236-4ec0-488d-b541-7a3da5873bfb\\\",\\n    \\\"created_at\\\":\\\"2015-11-02T17:53:19.935Z\\\",\\n    \\\"campaign_id\\\":\\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\",\\n    \\\"status\\\":\\\"qualified\\\",\\n    \\\"contact\\\":{\\n      \\\"id\\\":\\\"a3019e91-cf25-4175-b365-4cb4a4f2e063\\\",\\n      \\\"email\\\":\\\"johnny@advocate.com\\\",\\n      \\\"first_name\\\":\\\"Johnny\\\",\\n      \\\"last_name\\\":\\\"Advocate\\\",\\n      \\\"member\\\":false\\n    },\\n    \\\"prospect\\\":{\\n      \\\"id\\\":\\\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\\\",\\n      \\\"email\\\":\\\"some@prospect.com\\\",\\n      \\\"first_name\\\":\\\"Some\\\",\\n      \\\"last_name\\\":\\\"Prospect\\\",\\n      \\\"lead_source\\\":\\\"influitive\\\",\\n      \\\"company\\\":\\\"CMO\\\"\\n    },\\n    \\\"milestones_reached\\\":[\\n      {\\\"label\\\":\\\"Submitted\\\",\\\"status\\\":\\\"submitted\\\",\\\"feedback\\\":null,\\\"points\\\":0},\\n      {\\\"label\\\":\\\"Qualified\\\",\\\"status\\\":\\\"qualified\\\",\\\"feedback\\\":\\\"Great thanks!\\\",\\\"points\\\":400}\\n    ]\\n  }\\n  ...\\n]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","createdAt":"2015-11-09T20:50:39.978Z","excerpt":"","hidden":false,"link_external":false,"version":"5640b1fe2b14f70d0039b8b0","updates":[],"order":4,"project":"5640b1fd2b14f70d0039b8ad","api":{"examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[],"results":{"codes":[{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"56410453a6a9e90d008d8120","url":"/referrals","auth":"required"},"category":"564103f2d4b2e00d00bb3dec","githubsync":"","isReference":true,"__v":7,"link_url":"","title":"Listing Referrals","type":"get","user":"5640bc51eaede117005c99dd","childrenPages":[]}

getListing Referrals


The following will return a list of all referrals given in the system: [block:code] { "codes": [ { "code": "GET /referrals HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Which will return a response like: [block:code] { "codes": [ { "code": "HTTP/1.1 304 Not Modified\n\n{\"referrals\":[\n {\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"created_at\":\"2015-11-02T17:53:19.935Z\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"qualified\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\n \"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"lead_source\":\"influitive\",\n \"company\":\"CMO\"\n },\n \"milestones_reached\":[\n {\"label\":\"Submitted\",\"status\":\"submitted\",\"feedback\":null,\"points\":0},\n {\"label\":\"Qualified\",\"status\":\"qualified\",\"feedback\":\"Great thanks!\",\"points\":400}\n ]\n }\n ...\n]}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



The following will return a list of all referrals given in the system: [block:code] { "codes": [ { "code": "GET /referrals HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Which will return a response like: [block:code] { "codes": [ { "code": "HTTP/1.1 304 Not Modified\n\n{\"referrals\":[\n {\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"created_at\":\"2015-11-02T17:53:19.935Z\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"qualified\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\n \"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n \"first_name\":\"Some\",\n \"last_name\":\"Prospect\",\n \"lead_source\":\"influitive\",\n \"company\":\"CMO\"\n },\n \"milestones_reached\":[\n {\"label\":\"Submitted\",\"status\":\"submitted\",\"feedback\":null,\"points\":0},\n {\"label\":\"Qualified\",\"status\":\"qualified\",\"feedback\":\"Great thanks!\",\"points\":400}\n ]\n }\n ...\n]}", "language": "json" } ] } [/block]
{"_id":"56412735e32d360d00183f9b","isReference":true,"link_url":"","category":"564103f2d4b2e00d00bb3dec","hidden":false,"project":"5640b1fd2b14f70d0039b8ad","type":"get","createdAt":"2015-11-09T23:07:33.192Z","githubsync":"","link_external":false,"order":5,"parentDoc":null,"slug":"show-one-referral","sync_unique":"","title":"Show one Referral","editedParams":true,"excerpt":"","version":"5640b1fe2b14f70d0039b8b0","updates":[],"user":"5640bc51eaede117005c99dd","body":"The following will provide the status of a specific referral in the system\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nWhich will yield a response of:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 200 OK\\nContent-Type: application/json; charset=utf-8\\n\\n{\\\"referral\\\":{\\n  \\\"id\\\":\\\"8844c236-4ec0-488d-b541-7a3da5873bfb\\\",\\n  \\\"campaign_id\\\":\\\"98160557-5a70-4306-949e-ee8d2ea7f4b4\\\",\\n  \\\"status\\\":\\\"qualified\\\",\\n  \\\"contact\\\":{\\n    \\\"id\\\":\\\"a3019e91-cf25-4175-b365-4cb4a4f2e063\\\",\\n    \\\"email\\\":\\\"johnny@advocate.com\\\",\\n    \\\"first_name\\\":\\\"Johnny\\\",\\n    \\\"last_name\\\":\\\"Advocate\\\",\\n    \\\"member\\\":false\\n  },\\\"prospect\\\":{\\n    \\\"id\\\":\\\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\\\",\\n    \\\"email\\\":\\\"some@prospect.com\\\",\\n...\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"__v":1,"api":{"results":{"codes":[{"status":400,"language":"json","code":"{}","name":""}]},"settings":"56410453a6a9e90d008d8120","url":"/referrals/:referral_id","auth":"required","examples":{"codes":[{"language":"text","code":""}]},"method":"get","params":[{"required":true,"type":"string","in":"path","_id":"564143e8b0dc090d00f88330","default":"","desc":"id for a specific referral","name":"referral_id"}]},"childrenPages":[]}

getShow one Referral


Path Params

referral_id:
required
string
id for a specific referral
The following will provide the status of a specific referral in the system [block:code] { "codes": [ { "code": "GET /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Which will yield a response of: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n\n{\"referral\":{\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"qualified\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n...\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format



The following will provide the status of a specific referral in the system [block:code] { "codes": [ { "code": "GET /referrals/8844c236-4ec0-488d-b541-7a3da5873bfb HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Which will yield a response of: [block:code] { "codes": [ { "code": "HTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\n\n{\"referral\":{\n \"id\":\"8844c236-4ec0-488d-b541-7a3da5873bfb\",\n \"campaign_id\":\"98160557-5a70-4306-949e-ee8d2ea7f4b4\",\n \"status\":\"qualified\",\n \"contact\":{\n \"id\":\"a3019e91-cf25-4175-b365-4cb4a4f2e063\",\n \"email\":\"johnny@advocate.com\",\n \"first_name\":\"Johnny\",\n \"last_name\":\"Advocate\",\n \"member\":false\n },\"prospect\":{\n \"id\":\"25d36c2c-21b8-4ab0-9ccd-424e8c0d5c7b\",\n \"email\":\"some@prospect.com\",\n...\n}", "language": "json" } ] } [/block]
{"_id":"5783006ba9e63b0e00e5ae13","slug":"createupdatecomplete-reference-challenges","version":"5640b1fe2b14f70d0039b8b0","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Implementation Notes\"\n}\n[/block]\nMembers/Advocates is an array of the people to whom you would like to target this challenge. If provided you must supply either a salesforce id, the email of the member, or an influitive id.\n\nProspect/Account is the person, company, account etc that this reference is for. To accurately track references, passing an external_id or email will match these requests with existing prospects in our system. Omitting these values will create NEW challenges for every request.\n\nNOTE:\nPlease use only account OR prospect and members/advocates\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /references HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n{\\n    \\\"crm_opportunity_id\\\": \\\"\\\",\\n    \\\"prospect\\\":\\n        {\\n            \\\"name\\\": \\\"Steve Orpan\\\",\\n            \\\"email\\\": \\\"steveo@influitive.com\\\",\\n            \\\"title\\\": \\\"PM\\\",\\n            \\\"company\\\": \\\"Influitive\\\",\\n            \\\"phone\\\": \\\"416-555-2343\\\",\\n            \\\"external_id\\\": \\\"123\\\",\\n            \\\"sfdc_id\\\": \\\"0030123dfs02d023\\\"\\n        },\\n    \\\"account\\\":\\n        {\\n            \\\"name\\\": \\\"\\\",\\n            \\\"email\\\": \\\"\\\",\\n            \\\"title\\\": \\\"\\\",\\n            \\\"company\\\": \\\"\\\",\\n            \\\"phone\\\": \\\"\\\",\\n            \\\"external_id\\\": \\\"\\\",\\n            \\\"sfdc_id\\\": \\\"\\\"\\n        },\\n    \\\"members\\\":\\n        {\\n            \\\"id\\\": \\\"\\\",\\n            \\\"email\\\": \\\"\\\",\\n            \\\"crm_contact_id\\\": \\\"\\\",\\n            \\\"first_name\\\": \\\"\\\",\\n            \\\"last_name\\\": \\\"\\\"\\n        },\\n    “advocates”: \\n        [\\n            {\\n                \\\"first_name\\\": \\\"John\\\",\\n                \\\"last_name\\\": \\\"Advocate\\\",\\n                \\\"email\\\": \\\"John Advocate\\\",\\n                \\\"id\\\": \\\"12\\\",\\n                \\\"crm_contact_id\\\": \\\"0030dfs03fsdf203f\\\"\\n            },\\n            { … },\\n        ],\\n     \\\"status\\\": \\\"requested\\\",\\n     \\\"close_challenge\\\": \\\"false\\\",\\n     \\\"template_code\\\": \\\"awesome_reference_template\\\",\\n     \\\"notes\\\": \\\"This prospect is really interested in external integrations\\\",\\n     \\\"participant_limit\\\": \\\"1\\\",\\n     \\\"start_at\\\": \\\"YYYY-MM-DDThh:mm:ss.sTZD\\\",\\n     \\\"end_at\\\": \\\"YYYY-MM-DDThh:mm:ss.sTZD\\\"\\n    \\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","createdAt":"2016-07-11T02:11:55.260Z","hidden":false,"link_url":"","isReference":true,"link_external":false,"updates":[],"title":"Create/Update/Complete Reference Challenges","type":"post","user":"54afec2fed9ada1400afbf85","editedParams":true,"editedParams2":true,"excerpt":"","githubsync":"","__v":2,"api":{"auth":"required","examples":{"codes":[{"language":"json","code":"POST /references HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n    \"crm_opportunity_id\": \"\",\n    \"prospect\":\n        {\n            \"name\": \"Steve Orpan\",\n            \"email\": \"steveo@influitive.com\",\n            \"title\": \"PM\",\n            \"company\": \"Influitive\",\n            \"phone\": \"416-555-2343\",\n            \"external_id\": \"123\",\n            \"sfdc_id\": \"0030123dfs02d023\"\n        },\n    \"account\":\n        {\n            \"name\": \"\",\n            \"email\": \"\",\n            \"title\": \"\",\n            \"company\": \"\",\n            \"phone\": \"\",\n            \"external_id\": \"\",\n            \"sfdc_id\": \"\"\n        },\n    \"members\":\n        {\n            \"id\": \"\",\n            \"email\": \"\",\n            \"crm_contact_id\": \"\",\n            \"first_name\": \"\",\n            \"last_name\": \"\"\n        },\n    “advocates”: \n        [\n            {\n                \"first_name\": \"John\",\n                \"last_name\": \"Advocate\",\n                \"email\": \"John Advocate\",\n                \"id\": \"12\",\n                \"crm_contact_id\": \"0030dfs03fsdf203f\"\n            },\n            { … },\n        ],\n     \"status\": \"requested\",\n     \"close_challenge\": \"false\",\n     \"template_code\": \"awesome_reference_template\",\n     \"notes\": \"This prospect is really interested in external integrations\",\n     \"participant_limit\": \"1\",\n     \"start_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\",\n     \"end_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\"\n    \n}"}]},"method":"post","params":[{"_id":"5783006ba9e63b0e00e5ae1a","ref":"","in":"body","required":false,"desc":"Opportunity identifier in the crm system","default":"","type":"string","name":"crm_opportunity_id"},{"_id":"5783006ba9e63b0e00e5ae19","ref":"","in":"body","required":false,"desc":"Details of the recipient of the reference call.  Do not use if you are using Account.","default":"","type":"object","name":"prospect"},{"_id":"5783006ba9e63b0e00e5ae18","ref":"","in":"body","required":false,"desc":"Details of the recipient of the reference call.  Do not use if you are using Prospect.","default":"","type":"string","name":"account"},{"_id":"5783006ba9e63b0e00e5ae17","ref":"","in":"body","required":false,"desc":"Advocates that could participate in this reference challenge.","default":"","type":"object","name":"members"},{"_id":"5783006ba9e63b0e00e5ae16","ref":"","in":"body","required":false,"desc":"Advocates that could participate in this reference challenge.","default":"","type":"array_object","name":"advocates"},{"_id":"5783006ba9e63b0e00e5ae15","ref":"","in":"body","required":false,"desc":"requested (default), completed, updated.  NOTE: Only applies when status is 'completed'! Whether the external system is done with the challenge.","default":"","type":"string","name":"status"},{"_id":"5783032189ad100e00ab3e82","ref":"","in":"body","required":false,"desc":"true/false","default":"","type":"boolean","name":"close_challenge"},{"_id":"5783032189ad100e00ab3e81","ref":"","in":"body","required":false,"desc":"template code for the reference challenge template that is to be used for this challenge","default":"","type":"string","name":"template_code"},{"_id":"5783032189ad100e00ab3e80","ref":"","in":"body","required":false,"desc":"notes to the administrator","default":"","type":"string","name":"notes"},{"_id":"5783032189ad100e00ab3e7f","ref":"","in":"body","required":false,"desc":"limit the number of advocates that can start this challenge","default":"","type":"string","name":"participant_limit"},{"_id":"5783032189ad100e00ab3e7e","ref":"","in":"body","required":false,"desc":"schedule the challenge to publish at a certain time","default":"","type":"datetime","name":"start_at"},{"_id":"5783032189ad100e00ab3e7d","ref":"","in":"body","required":false,"desc":"schedule the challenge to expire at a certain time","default":"","type":"datetime","name":"end_at"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/references"},"category":"5782febe9ba6ea0e00787427","order":0,"parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","sync_unique":"","next":{"description":"","pages":[]},"childrenPages":[]}

postCreate/Update/Complete Reference Challenges


Body Params

crm_opportunity_id:
string
Opportunity identifier in the crm system
prospect:
object
Details of the recipient of the reference call. Do not use if you are using Account.
account:
string
Details of the recipient of the reference call. Do not use if you are using Prospect.
members:
object
Advocates that could participate in this reference challenge.
advocates:
array of objects
Advocates that could participate in this reference challenge.
status:
string
requested (default), completed, updated. NOTE: Only applies when status is 'completed'! Whether the external system is done with the challenge.
close_challenge:
boolean
true/false
template_code:
string
template code for the reference challenge template that is to be used for this challenge
notes:
string
notes to the administrator
participant_limit:
string
limit the number of advocates that can start this challenge
start_at:
datetime
schedule the challenge to publish at a certain time
end_at:
datetime
schedule the challenge to expire at a certain time
[block:api-header] { "type": "basic", "title": "Implementation Notes" } [/block] Members/Advocates is an array of the people to whom you would like to target this challenge. If provided you must supply either a salesforce id, the email of the member, or an influitive id. Prospect/Account is the person, company, account etc that this reference is for. To accurately track references, passing an external_id or email will match these requests with existing prospects in our system. Omitting these values will create NEW challenges for every request. NOTE: Please use only account OR prospect and members/advocates [block:code] { "codes": [ { "code": "POST /references HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"crm_opportunity_id\": \"\",\n \"prospect\":\n {\n \"name\": \"Steve Orpan\",\n \"email\": \"steveo@influitive.com\",\n \"title\": \"PM\",\n \"company\": \"Influitive\",\n \"phone\": \"416-555-2343\",\n \"external_id\": \"123\",\n \"sfdc_id\": \"0030123dfs02d023\"\n },\n \"account\":\n {\n \"name\": \"\",\n \"email\": \"\",\n \"title\": \"\",\n \"company\": \"\",\n \"phone\": \"\",\n \"external_id\": \"\",\n \"sfdc_id\": \"\"\n },\n \"members\":\n {\n \"id\": \"\",\n \"email\": \"\",\n \"crm_contact_id\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\"\n },\n “advocates”: \n [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Advocate\",\n \"email\": \"John Advocate\",\n \"id\": \"12\",\n \"crm_contact_id\": \"0030dfs03fsdf203f\"\n },\n { … },\n ],\n \"status\": \"requested\",\n \"close_challenge\": \"false\",\n \"template_code\": \"awesome_reference_template\",\n \"notes\": \"This prospect is really interested in external integrations\",\n \"participant_limit\": \"1\",\n \"start_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\",\n \"end_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\"\n \n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "Implementation Notes" } [/block] Members/Advocates is an array of the people to whom you would like to target this challenge. If provided you must supply either a salesforce id, the email of the member, or an influitive id. Prospect/Account is the person, company, account etc that this reference is for. To accurately track references, passing an external_id or email will match these requests with existing prospects in our system. Omitting these values will create NEW challenges for every request. NOTE: Please use only account OR prospect and members/advocates [block:code] { "codes": [ { "code": "POST /references HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n{\n \"crm_opportunity_id\": \"\",\n \"prospect\":\n {\n \"name\": \"Steve Orpan\",\n \"email\": \"steveo@influitive.com\",\n \"title\": \"PM\",\n \"company\": \"Influitive\",\n \"phone\": \"416-555-2343\",\n \"external_id\": \"123\",\n \"sfdc_id\": \"0030123dfs02d023\"\n },\n \"account\":\n {\n \"name\": \"\",\n \"email\": \"\",\n \"title\": \"\",\n \"company\": \"\",\n \"phone\": \"\",\n \"external_id\": \"\",\n \"sfdc_id\": \"\"\n },\n \"members\":\n {\n \"id\": \"\",\n \"email\": \"\",\n \"crm_contact_id\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\"\n },\n “advocates”: \n [\n {\n \"first_name\": \"John\",\n \"last_name\": \"Advocate\",\n \"email\": \"John Advocate\",\n \"id\": \"12\",\n \"crm_contact_id\": \"0030dfs03fsdf203f\"\n },\n { … },\n ],\n \"status\": \"requested\",\n \"close_challenge\": \"false\",\n \"template_code\": \"awesome_reference_template\",\n \"notes\": \"This prospect is really interested in external integrations\",\n \"participant_limit\": \"1\",\n \"start_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\",\n \"end_at\": \"YYYY-MM-DDThh:mm:ss.sTZD\"\n \n}", "language": "json" } ] } [/block]
{"_id":"578309dc89ad100e00ab3e83","createdAt":"2016-07-11T02:52:12.594Z","excerpt":"","parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","updates":[],"user":"54afec2fed9ada1400afbf85","editedParams2":true,"isReference":true,"link_url":"","slug":"post-reference-type-events","type":"post","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Implementation Notes\"\n}\n[/block]\nYou can log events into your AdvocateHub that describe things that have happened on your system. You can optionally add points that will be awarded to the member. You must identify the member by providing someone unique information.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /referrences/events HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n\\n{\\n    \\\"type\\\": \\\"site_visit\\\",\\n    \\\"member\\\": \\n        {\\n            \\\"id\\\": \\\"123\\\",\\n            \\\"email\\\": \\\"steve@advocate.ca\\\",\\n            \\\"crm_contact_id\\\": \\\"0030120343feffwf0\\\",\\n            \\\"first_name\\\": \\\"Steve\\\",\\n            \\\"last_name\\\": \\\"Orpan\\\"\\n        },\\n    \\\"notes\\\": \\\"completed a site visit\\\",\\n    \\\"link\\\": \\\"\\\",\\n    \\\"points\\\": \\\"123\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","category":"5782febe9ba6ea0e00787427","editedParams":true,"order":1,"sync_unique":"","link_external":false,"title":"Post reference type events","version":"5640b1fe2b14f70d0039b8b0","__v":0,"api":{"examples":{"codes":[{"language":"json","code":"POST /referrences/events HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n    \"type\": \"site_visit\",\n    \"member\": \n        {\n            \"id\": \"123\",\n            \"email\": \"steve@advocate.ca\",\n            \"crm_contact_id\": \"0030120343feffwf0\",\n            \"first_name\": \"Steve\",\n            \"last_name\": \"Orpan\"\n        },\n    \"notes\": \"completed a site visit\",\n    \"link\": \"\",\n    \"points\": \"123\"\n}"}]},"method":"post","params":[{"default":"","type":"string","name":"type","in":"body","_id":"578309dc89ad100e00ab3e88","ref":"","required":true,"desc":"Type of reference activity (ie. Survey Completed, Profile Completed)"},{"_id":"578309dc89ad100e00ab3e87","ref":"","required":true,"desc":"","default":"","type":"object","name":"member","in":"body"},{"_id":"578309dc89ad100e00ab3e86","ref":"","required":false,"desc":"Description of event","default":"","type":"string","name":"notes","in":"body"},{"in":"body","_id":"578309dc89ad100e00ab3e85","ref":"","required":false,"desc":"External URL for this reference","default":"","type":"string","name":"link"},{"name":"points","in":"body","_id":"578309dc89ad100e00ab3e84","ref":"","required":false,"desc":"Points to award to member","default":"","type":"int"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/references/events","auth":"required"},"githubsync":"","hidden":false,"childrenPages":[]}

postPost reference type events


Body Params

type:
required
string
Type of reference activity (ie. Survey Completed, Profile Completed)
member:
required
object
notes:
string
Description of event
link:
string
External URL for this reference
points:
integer
Points to award to member
[block:api-header] { "type": "basic", "title": "Implementation Notes" } [/block] You can log events into your AdvocateHub that describe things that have happened on your system. You can optionally add points that will be awarded to the member. You must identify the member by providing someone unique information. [block:code] { "codes": [ { "code": "POST /referrences/events HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n \"type\": \"site_visit\",\n \"member\": \n {\n \"id\": \"123\",\n \"email\": \"steve@advocate.ca\",\n \"crm_contact_id\": \"0030120343feffwf0\",\n \"first_name\": \"Steve\",\n \"last_name\": \"Orpan\"\n },\n \"notes\": \"completed a site visit\",\n \"link\": \"\",\n \"points\": \"123\"\n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "Implementation Notes" } [/block] You can log events into your AdvocateHub that describe things that have happened on your system. You can optionally add points that will be awarded to the member. You must identify the member by providing someone unique information. [block:code] { "codes": [ { "code": "POST /referrences/events HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n \"type\": \"site_visit\",\n \"member\": \n {\n \"id\": \"123\",\n \"email\": \"steve@advocate.ca\",\n \"crm_contact_id\": \"0030120343feffwf0\",\n \"first_name\": \"Steve\",\n \"last_name\": \"Orpan\"\n },\n \"notes\": \"completed a site visit\",\n \"link\": \"\",\n \"points\": \"123\"\n}", "language": "json" } ] } [/block]
{"_id":"57830b4f0d51ec0e00c646c2","body":"Use the following to get information around completed reference challenges.  Optionally add cursor to paginate from.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /referrences HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns this response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"data\\\": [\\n    {\\n      \\\"id\\\": 67,\\n      \\\"type\\\": \\\"completed_reference\\\",\\n      \\\"relationships\\\": {\\n        \\\"challenge\\\": {\\n          \\\"data\\\": {\\n            \\\"type\\\": \\\"Challenge\\\",\\n            \\\"id\\\": 26\\n          }\\n        },\\n        \\\"contact\\\": {\\n          \\\"data\\\": {\\n            \\\"type\\\": \\\"Advocate\\\",\\n            \\\"id\\\": 41\\n          }\\n        },\\n        \\\"prospect\\\": {\\n          \\\"data\\\": {\\n            \\\"type\\\": \\\"Prospect\\\",\\n            \\\"id\\\": 1\\n          }\\n        }\\n      },\\n      \\\"attributes\\\": {\\n        \\\"updated_at\\\": \\\"2011-11-18T19:34:03.483Z\\\"\\n      }\\n    }\\n  ],\\n  \\\"included\\\": [\\n    {\\n      \\\"id\\\": 41,\\n      \\\"type\\\": \\\"Advocate\\\",\\n      \\\"attributes\\\": {\\n        \\\"name\\\": \\\"Sean Jacobsohn\\\",\\n        \\\"first_name\\\": \\\"Sean\\\",\\n        \\\"last_name\\\": \\\"Jacobsohn\\\",\\n        \\\"email\\\": \\\"sj@acmecorp.com\\\",\\n        \\\"title\\\": \\\"Vice President, Marketing\\\",\\n        \\\"company\\\": \\\"AcmeCorp\\\",\\n        \\\"created_at\\\": \\\"2011-08-16T05:42:29.000Z\\\",\\n        \\\"joined_at\\\": null,\\n        \\\"nps_score\\\": null,\\n        \\\"current_points\\\": 100,\\n        \\\"lifetime_points\\\": 100,\\n        \\\"crm_contact_id\\\": null,\\n        \\\"level\\\": \\\"Advocate\\\"\\n      }\\n    },\\n    {\\n      \\\"id\\\": 1,\\n      \\\"type\\\": \\\"Prospect\\\",\\n      \\\"attributes\\\": {\\n        \\\"name\\\": \\\"Mark Organ\\\",\\n        \\\"email\\\": \\\"mark@influitive.com\\\",\\n        \\\"company\\\": \\\"Influitive\\\",\\n        \\\"phone\\\": null,\\n        \\\"title\\\": \\\"Co-founder and CEO\\\",\\n        \\\"crm_contact_id\\\": null\\n      }\\n    }\\n  ],\\n  \\\"links\\\": {\\n    \\\"first\\\": \\\"/references?cursor=1468188804-1\\\",\\n    \\\"last\\\": \\\"/references?cursor=1468188804-1\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","editedParams2":true,"link_external":false,"user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","category":"5782febe9ba6ea0e00787427","createdAt":"2016-07-11T02:58:23.812Z","excerpt":"","isReference":true,"link_url":"","project":"5640b1fd2b14f70d0039b8ad","title":"Get Reference Completions","updates":[],"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": [\n    {\n      \"id\": 67,\n      \"type\": \"completed_reference\",\n      \"relationships\": {\n        \"challenge\": {\n          \"data\": {\n            \"type\": \"Challenge\",\n            \"id\": 26\n          }\n        },\n        \"contact\": {\n          \"data\": {\n            \"type\": \"Advocate\",\n            \"id\": 41\n          }\n        },\n        \"prospect\": {\n          \"data\": {\n            \"type\": \"Prospect\",\n            \"id\": 1\n          }\n        }\n      },\n      \"attributes\": {\n        \"updated_at\": \"2011-11-18T19:34:03.483Z\"\n      }\n    }\n  ],\n  \"included\": [\n    {\n      \"id\": 41,\n      \"type\": \"Advocate\",\n      \"attributes\": {\n        \"name\": \"Sean Jacobsohn\",\n        \"first_name\": \"Sean\",\n        \"last_name\": \"Jacobsohn\",\n        \"email\": \"sj@acmecorp.com\",\n        \"title\": \"Vice President, Marketing\",\n        \"company\": \"AcmeCorp\",\n        \"created_at\": \"2011-08-16T05:42:29.000Z\",\n        \"joined_at\": null,\n        \"nps_score\": null,\n        \"current_points\": 100,\n        \"lifetime_points\": 100,\n        \"crm_contact_id\": null,\n        \"level\": \"Advocate\"\n      }\n    },\n    {\n      \"id\": 1,\n      \"type\": \"Prospect\",\n      \"attributes\": {\n        \"name\": \"Mark Organ\",\n        \"email\": \"mark@influitive.com\",\n        \"company\": \"Influitive\",\n        \"phone\": null,\n        \"title\": \"Co-founder and CEO\",\n        \"crm_contact_id\": null\n      }\n    }\n  ],\n  \"links\": {\n    \"first\": \"/references?cursor=1468188804-1\",\n    \"last\": \"/references?cursor=1468188804-1\"\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/references","auth":"required","examples":{"codes":[{"language":"json","code":"GET /referrences HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[{"_id":"57830b4f0d51ec0e00c646c3","ref":"","required":false,"desc":"Cursor to paginate from","default":"","type":"string","name":"cursor","in":"query"}]},"hidden":false,"__v":0,"editedParams":true,"githubsync":"","order":2,"parentDoc":null,"slug":"get-reference-completed-events","sync_unique":"","type":"get","childrenPages":[]}

getGet Reference Completions


Query Params

cursor:
string
Cursor to paginate from
Use the following to get information around completed reference challenges. Optionally add cursor to paginate from. [block:code] { "codes": [ { "code": "GET /referrences HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"data\": [\n {\n \"id\": 67,\n \"type\": \"completed_reference\",\n \"relationships\": {\n \"challenge\": {\n \"data\": {\n \"type\": \"Challenge\",\n \"id\": 26\n }\n },\n \"contact\": {\n \"data\": {\n \"type\": \"Advocate\",\n \"id\": 41\n }\n },\n \"prospect\": {\n \"data\": {\n \"type\": \"Prospect\",\n \"id\": 1\n }\n }\n },\n \"attributes\": {\n \"updated_at\": \"2011-11-18T19:34:03.483Z\"\n }\n }\n ],\n \"included\": [\n {\n \"id\": 41,\n \"type\": \"Advocate\",\n \"attributes\": {\n \"name\": \"Sean Jacobsohn\",\n \"first_name\": \"Sean\",\n \"last_name\": \"Jacobsohn\",\n \"email\": \"sj@acmecorp.com\",\n \"title\": \"Vice President, Marketing\",\n \"company\": \"AcmeCorp\",\n \"created_at\": \"2011-08-16T05:42:29.000Z\",\n \"joined_at\": null,\n \"nps_score\": null,\n \"current_points\": 100,\n \"lifetime_points\": 100,\n \"crm_contact_id\": null,\n \"level\": \"Advocate\"\n }\n },\n {\n \"id\": 1,\n \"type\": \"Prospect\",\n \"attributes\": {\n \"name\": \"Mark Organ\",\n \"email\": \"mark@influitive.com\",\n \"company\": \"Influitive\",\n \"phone\": null,\n \"title\": \"Co-founder and CEO\",\n \"crm_contact_id\": null\n }\n }\n ],\n \"links\": {\n \"first\": \"/references?cursor=1468188804-1\",\n \"last\": \"/references?cursor=1468188804-1\"\n }\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Use the following to get information around completed reference challenges. Optionally add cursor to paginate from. [block:code] { "codes": [ { "code": "GET /referrences HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "json" } ] } [/block] Returns this response: [block:code] { "codes": [ { "code": "{\n \"data\": [\n {\n \"id\": 67,\n \"type\": \"completed_reference\",\n \"relationships\": {\n \"challenge\": {\n \"data\": {\n \"type\": \"Challenge\",\n \"id\": 26\n }\n },\n \"contact\": {\n \"data\": {\n \"type\": \"Advocate\",\n \"id\": 41\n }\n },\n \"prospect\": {\n \"data\": {\n \"type\": \"Prospect\",\n \"id\": 1\n }\n }\n },\n \"attributes\": {\n \"updated_at\": \"2011-11-18T19:34:03.483Z\"\n }\n }\n ],\n \"included\": [\n {\n \"id\": 41,\n \"type\": \"Advocate\",\n \"attributes\": {\n \"name\": \"Sean Jacobsohn\",\n \"first_name\": \"Sean\",\n \"last_name\": \"Jacobsohn\",\n \"email\": \"sj@acmecorp.com\",\n \"title\": \"Vice President, Marketing\",\n \"company\": \"AcmeCorp\",\n \"created_at\": \"2011-08-16T05:42:29.000Z\",\n \"joined_at\": null,\n \"nps_score\": null,\n \"current_points\": 100,\n \"lifetime_points\": 100,\n \"crm_contact_id\": null,\n \"level\": \"Advocate\"\n }\n },\n {\n \"id\": 1,\n \"type\": \"Prospect\",\n \"attributes\": {\n \"name\": \"Mark Organ\",\n \"email\": \"mark@influitive.com\",\n \"company\": \"Influitive\",\n \"phone\": null,\n \"title\": \"Co-founder and CEO\",\n \"crm_contact_id\": null\n }\n }\n ],\n \"links\": {\n \"first\": \"/references?cursor=1468188804-1\",\n \"last\": \"/references?cursor=1468188804-1\"\n }\n}", "language": "json" } ] } [/block]
{"_id":"57c512aaecba570e00cd8a51","excerpt":"","link_external":false,"order":0,"updates":[],"__v":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /perks HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nReturns the following response.  \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[\\n    {\\n        \\\"uuid\\\": \\\"f4b368ab-29bf-498e-b6e5-d39b108adc8a\\\",\\n        \\\"name\\\": \\\"Choose your own charity\\\",\\n        \\\"description\\\": \\\"Choose your own charity\\\",\\n        \\\"type\\\": \\\"Reward\\\",\\n        \\\"needs_shipping_information\\\": false,\\n        \\\"resource\\\": \\\"perks/reward/f4b368ab-29bf-498e-b6e5-d39b108adc8a\\\"\\n    },\\n  {...},\\n ]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","isReference":true,"link_url":"","type":"get","sync_unique":"","api":{"examples":{"codes":[{"language":"json","code":"GET /perks HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3"}]},"method":"get","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"[\n    {\n        \"uuid\": \"f4b368ab-29bf-498e-b6e5-d39b108adc8a\",\n        \"name\": \"Choose your own charity\",\n        \"description\": \"Choose your own charity\",\n        \"type\": \"Reward\",\n        \"needs_shipping_information\": false,\n        \"resource\": \"perks/reward/f4b368ab-29bf-498e-b6e5-d39b108adc8a\"\n    },\n  {...},\n ]"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/perks","auth":"required"},"category":"579b8bd1f4ad7b190094b6a1","githubsync":"","hidden":false,"user":"54afec2fed9ada1400afbf85","version":"5640b1fe2b14f70d0039b8b0","createdAt":"2016-08-30T04:59:22.888Z","parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","slug":"retrieve-a-list-of-perks","title":"Retrieve a list of perks","next":{"description":"","pages":[]},"childrenPages":[]}

getRetrieve a list of perks


[block:code] { "codes": [ { "code": "GET /perks HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "text" } ] } [/block] Returns the following response. [block:code] { "codes": [ { "code": "[\n {\n \"uuid\": \"f4b368ab-29bf-498e-b6e5-d39b108adc8a\",\n \"name\": \"Choose your own charity\",\n \"description\": \"Choose your own charity\",\n \"type\": \"Reward\",\n \"needs_shipping_information\": false,\n \"resource\": \"perks/reward/f4b368ab-29bf-498e-b6e5-d39b108adc8a\"\n },\n {...},\n ]", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:code] { "codes": [ { "code": "GET /perks HTTP/1.1\nHost: api.influitive.com\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3", "language": "text" } ] } [/block] Returns the following response. [block:code] { "codes": [ { "code": "[\n {\n \"uuid\": \"f4b368ab-29bf-498e-b6e5-d39b108adc8a\",\n \"name\": \"Choose your own charity\",\n \"description\": \"Choose your own charity\",\n \"type\": \"Reward\",\n \"needs_shipping_information\": false,\n \"resource\": \"perks/reward/f4b368ab-29bf-498e-b6e5-d39b108adc8a\"\n },\n {...},\n ]", "language": "json" } ] } [/block]
{"_id":"579b8c0b8627551900433873","parentDoc":null,"project":"5640b1fd2b14f70d0039b8ad","slug":"send-a-badgeperk-to-an-advocate","__v":3,"api":{"auth":"required","examples":{"codes":[{"name":"Send Perk automatically (shipping depends on the reward)","language":"json","code":"POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"13\",\n\"send_automatically\": true,\n\"message\": \"hey there\",\n\"shipping\": \n  {\n    \"address\": \"123 fake street\",\n    \"address_2\": \"apt 504\",\n    \"city\": \"Toronto\",\n    \"state\": \"Ontario\",\n    \"country\": \"Canada\",\n    \"phone_number\": \"(416) 555-2342\"\n  },\n\"sender_id\": 5\n}"},{"name":"Send perk where the advocate has to redeem","code":"POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"1\",\n\"send automatically\": \"false\",\n}","language":"json"}]},"method":"post","params":[{"_id":"57bb3c74aa8f760e004588dd","ref":"","in":"query","required":true,"desc":"","default":"The UUID of the reward to perk","type":"string","name":"reward_uuid"},{"_id":"57bb3c74aa8f760e004588dc","ref":"","in":"body","required":true,"desc":"","default":"ContactID of the Advocate","type":"int","name":"contact_id"},{"_id":"57bb3c74aa8f760e004588db","ref":"","in":"body","required":true,"desc":"","default":"true/false.  False indicates the advocate is redeeming the reward, TRUE indicates the reward has already been sent","type":"boolean","name":"send_automatically"},{"_id":"57bb3c74aa8f760e004588da","ref":"","in":"body","required":false,"desc":"address, address_2, city, state, country, zip, phone_number","default":"The shipping address of the advocate if Send Automatically is False and the Reward requires shipping.","type":"object","name":"Shipping"},{"_id":"57cefcc6065d9a0e00d47cee","ref":"","in":"body","required":false,"desc":"","default":"message to send advocate","type":"string","name":"message"},{"_id":"57cefcc6065d9a0e00d47ced","ref":"","in":"body","required":false,"desc":"","default":"The contact_id of the administrator that is sending the perk message","type":"int","name":"sender_id"}],"results":{"codes":[{"language":"json","code":"200","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/perks/reward/:reward_uuid"},"category":"579b8bd1f4ad7b190094b6a1","link_external":false,"link_url":"","sync_unique":"","updates":[],"version":"5640b1fe2b14f70d0039b8b0","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Send a perk to an advocate when the reward requires shipping\"\n}\n[/block]\nUse the following API call to send a perk to an advocate where the reward requires shipping.  Add a message in order for an email to sent to the advocate, notifying them of the reward that got sent*.\n\n* to place linebreaks in the feedback message, place \"\\n\" in place where the linebreak is supposed to be in the payload. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n\\n{\\n\\\"contact_id\\\": \\\"1\\\",\\n \\\"send automatically\\\": \\\"true\\\",\\n  \\\"shipping\\\": \\n  {\\n    \\\"address\\\": \\\"123 fake street\\\",\\n    \\\"address_2\\\": \\\"apt 504\\\",\\n    \\\"city\\\": \\\"Toronto\\\",\\n    \\\"state\\\": \\\"Ontario\\\",\\n    \\\"country\\\": \\\"Canada\\\",\\n    \\\"phone_number\\\": \\\"(416) 555-2342\\\"\\n  },\\n  \\\"message\\\": \\\"Hey firstname,\\\\n\\\\nYou're reward is on it's way!\\\",\\n  \\\"sender_id\\\": 5\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"200\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Send a perk where the advocate needs to manually redeem\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\\nHost: api.influitive.com\\nContent-Type: application/json\\nAccept: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\\n\\n\\n{\\n\\\"contact_id\\\": \\\"1\\\",\\n\\\"send automatically\\\": \\\"false\\\",\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nReturns the following response:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"200\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","order":1,"title":"Send a perk to an advocate","type":"post","createdAt":"2016-07-29T17:02:03.000Z","excerpt":"","githubsync":"","hidden":false,"isReference":true,"user":"54afec2fed9ada1400afbf85","next":{"description":"","pages":[]},"childrenPages":[]}

postSend a perk to an advocate


Query Params

reward_uuid:
required
stringThe UUID of the reward to perk

Body Params

contact_id:
required
integerContactID of the Advocate
send_automatically:
required
booleantrue/false. False indicates the advocate is redeeming the reward, TRUE indicates the reward has already been sent
Shipping:
objectThe shipping address of the advocate if Send Automatically is False and the Reward requires shipping.
address, address_2, city, state, country, zip, phone_number
message:
stringmessage to send advocate
sender_id:
integerThe contact_id of the administrator that is sending the perk message
[block:api-header] { "type": "basic", "title": "Send a perk to an advocate when the reward requires shipping" } [/block] Use the following API call to send a perk to an advocate where the reward requires shipping. Add a message in order for an email to sent to the advocate, notifying them of the reward that got sent*. * to place linebreaks in the feedback message, place "\n" in place where the linebreak is supposed to be in the payload. [block:code] { "codes": [ { "code": "POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"1\",\n \"send automatically\": \"true\",\n \"shipping\": \n {\n \"address\": \"123 fake street\",\n \"address_2\": \"apt 504\",\n \"city\": \"Toronto\",\n \"state\": \"Ontario\",\n \"country\": \"Canada\",\n \"phone_number\": \"(416) 555-2342\"\n },\n \"message\": \"Hey firstname,\\n\\nYou're reward is on it's way!\",\n \"sender_id\": 5\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "200", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Send a perk where the advocate needs to manually redeem" } [/block] [block:code] { "codes": [ { "code": "POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"1\",\n\"send automatically\": \"false\",\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "200", "language": "text" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "type": "basic", "title": "Send a perk to an advocate when the reward requires shipping" } [/block] Use the following API call to send a perk to an advocate where the reward requires shipping. Add a message in order for an email to sent to the advocate, notifying them of the reward that got sent*. * to place linebreaks in the feedback message, place "\n" in place where the linebreak is supposed to be in the payload. [block:code] { "codes": [ { "code": "POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"1\",\n \"send automatically\": \"true\",\n \"shipping\": \n {\n \"address\": \"123 fake street\",\n \"address_2\": \"apt 504\",\n \"city\": \"Toronto\",\n \"state\": \"Ontario\",\n \"country\": \"Canada\",\n \"phone_number\": \"(416) 555-2342\"\n },\n \"message\": \"Hey firstname,\\n\\nYou're reward is on it's way!\",\n \"sender_id\": 5\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "200", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Send a perk where the advocate needs to manually redeem" } [/block] [block:code] { "codes": [ { "code": "POST /perks/reward/0594649d-8h7c-49f0-b559-694b3f9c75x3 HTTP/1.1\nHost: api.influitive.com\nContent-Type: application/json\nAccept: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a30\nX_ORG_ID: 9774649d-5e6c-49f0-b559-694b3f9c76e3\n\n\n{\n\"contact_id\": \"1\",\n\"send automatically\": \"false\",\n}", "language": "json" } ] } [/block] Returns the following response: [block:code] { "codes": [ { "code": "200", "language": "text" } ] } [/block]
{"_id":"5ae9accf7fda4e00035d3f29","project":"5640b1fd2b14f70d0039b8ad","version":"5640b1fe2b14f70d0039b8b0","category":"5ae9ab34ec1e8a0003d4c53f","user":"54afec2fed9ada1400afbf85","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-02T12:19:27.965Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"text","code":"GET /challenges/questions/responses?limit=2&offset=2&question_ids%5B%5D=1&question_ids%5B%5D=3&contact_ids%5B%5D=c17a8ce5-de96-4f7a-ba1d-8c4666d37818 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"collection\": [1, 5, 2, 4],\n  \"limit\": 10,\n  \"offset\": 2\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"56410453a6a9e90d008d8120","auth":"required","params":[{"_id":"5ae9accf7fda4e00035d3f2d","ref":"","in":"query","required":false,"desc":"List of question IDs","default":"","type":"array_int","name":"question_ids"},{"_id":"5ae9accf7fda4e00035d3f2c","ref":"","in":"query","required":false,"desc":"List of contact UUIDs","default":"","type":"array_string","name":"contact_ids"},{"_id":"5ae9ad06ec1e8a0003d4c571","ref":"","in":"query","required":false,"desc":"Collection size limit","default":"10","type":"int","name":"limit"},{"_id":"5ae9ad06ec1e8a0003d4c570","ref":"","in":"query","required":false,"desc":"Collection offset","default":"0","type":"int","name":"offset"}],"url":"/challenges/questions/responses"},"isReference":false,"order":0,"body":"This call is used to retrieve list of response ids for given question ids and contact uuids. Limit is capped at 100.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"GET /challenges/questions/responses?limit=2&offset=2&question_ids%5B%5D=1&question_ids%5B%5D=3&contact_ids%5B%5D=c17a8ce5-de96-4f7a-ba1d-8c4666d37818 HTTP/1.1\\nHost: api.influitive.com\\nAccept: application/vnd.infl-v3+json\\nContent-Type: application/json\\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"collection\\\": [1, 5, 2, 4],\\n  \\\"limit\\\": 10,\\n  \\\"offset\\\": 2\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"get-list-of-response-ids","type":"get","title":"Get list of response IDs","__v":3,"parentDoc":null,"childrenPages":[]}

getGet list of response IDs


Query Params

question_ids:
array of integers
List of question IDs
contact_ids:
array of strings
List of contact UUIDs
limit:
integer10
Collection size limit
offset:
integer0
Collection offset
This call is used to retrieve list of response ids for given question ids and contact uuids. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/questions/responses?limit=2&offset=2&question_ids%5B%5D=1&question_ids%5B%5D=3&contact_ids%5B%5D=c17a8ce5-de96-4f7a-ba1d-8c4666d37818 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"collection\": [1, 5, 2, 4],\n \"limit\": 10,\n \"offset\": 2\n}", "language": "json" } ] } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This call is used to retrieve list of response ids for given question ids and contact uuids. Limit is capped at 100. [block:code] { "codes": [ { "code": "GET /challenges/questions/responses?limit=2&offset=2&question_ids%5B%5D=1&question_ids%5B%5D=3&contact_ids%5B%5D=c17a8ce5-de96-4f7a-ba1d-8c4666d37818 HTTP/1.1\nHost: api.influitive.com\nAccept: application/vnd.infl-v3+json\nContent-Type: application/json\nAuthorization: Token 6bfa3b6256add25b71159d56ffa9ad4e629f7a303", "language": "text" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"collection\": [1, 5, 2, 4],\n \"limit\": 10,\n \"offset\": 2\n}", "language": "json" } ] } [/block]