{"_id":"565fc2d4649b951900c8985e","parentDoc":null,"project":"565fc2d2649b951900c89858","user":"555d323987ebf70d002aded4","hidden":false,"order":0,"sync_unique":"","title":"Welcome","updates":[],"version":"565fc2d2649b951900c8985b","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]}},"createdAt":"2015-12-03T04:19:32.130Z","excerpt":"This page will help you get started with CalReply Web API","isReference":false,"link_url":"","next":{"description":"","pages":[]},"slug":"getting-started","type":"basic","__v":10,"body":"The CalReply API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors.","category":"565fc2d3649b951900c8985c","githubsync":"","link_external":false,"childrenPages":[]}

Welcome

This page will help you get started with CalReply Web API

The CalReply API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors.
The CalReply API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website's client-side code). JSON is returned by all API responses, including errors.
{"_id":"565fc42c649b951900c89863","__v":11,"githubsync":"","link_external":false,"order":1,"type":"basic","isReference":false,"link_url":"","parentDoc":null,"title":"API Registration","updates":["5a1f3416e4433a0012117e60"],"slug":"registration","user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"","auth":"required","params":[]},"category":"565fc2d3649b951900c8985c","createdAt":"2015-12-03T04:25:16.443Z","excerpt":"This page will help you get started with API Registration","body":"To authenticate using OAuth you have to be a registered OAuth Application. Your application will be issued with a unique *client_id* and *client_secret*. These details will be required for your application to authenticate when requesting an access token.\n\nThe API is available upon request. Please contact your account manager to request access. You will then be provided with a unique *client_id* and a *client_secret*.","hidden":false,"next":{"description":"","pages":[]},"project":"565fc2d2649b951900c89858","sync_unique":"","childrenPages":[]}

API Registration

This page will help you get started with API Registration

To authenticate using OAuth you have to be a registered OAuth Application. Your application will be issued with a unique *client_id* and *client_secret*. These details will be required for your application to authenticate when requesting an access token. The API is available upon request. Please contact your account manager to request access. You will then be provided with a unique *client_id* and a *client_secret*.
To authenticate using OAuth you have to be a registered OAuth Application. Your application will be issued with a unique *client_id* and *client_secret*. These details will be required for your application to authenticate when requesting an access token. The API is available upon request. Please contact your account manager to request access. You will then be provided with a unique *client_id* and a *client_secret*.
{"_id":"565fc46513f6680d0022df53","title":"Permissions","category":"565fc2d3649b951900c8985c","excerpt":"This page will help you get started with API Permissions","link_external":false,"parentDoc":null,"sync_unique":"","type":"basic","version":"565fc2d2649b951900c8985b","__v":7,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"Any application which authenticates using OAuth will automatically have access to perform the following actions on the calendars associated with your account:\n\n###Subscription Resource:\n\n* [Create New Subscription](doc:create-new-subscription) \n* [Get Subscription Details](doc:get-subscription-details) \n* [Get Subscription Details for all Subscriptions for a Username](doc:get-multiple-subscription-details-with-a-username) \n* [Update Subscription Details](doc:update-subscription-details) \n* [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription) \n\n###Webcal Resource:\n\n* [Create New Webcal Subscription](doc:webcal-create-new-subscription) \n* [Get Webcal Update](doc:webcal-get-update) \n\n###Google Resource:\n\n* [Create New Google Subscription](doc:google-create-new-subscription)","createdAt":"2015-12-03T04:26:13.103Z","hidden":false,"updates":[],"link_url":"","next":{"description":"","pages":[]},"order":2,"project":"565fc2d2649b951900c89858","slug":"permissions","githubsync":"","isReference":false,"user":"555d323987ebf70d002aded4","childrenPages":[]}

Permissions

This page will help you get started with API Permissions

Any application which authenticates using OAuth will automatically have access to perform the following actions on the calendars associated with your account: ###Subscription Resource: * [Create New Subscription](doc:create-new-subscription) * [Get Subscription Details](doc:get-subscription-details) * [Get Subscription Details for all Subscriptions for a Username](doc:get-multiple-subscription-details-with-a-username) * [Update Subscription Details](doc:update-subscription-details) * [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription) ###Webcal Resource: * [Create New Webcal Subscription](doc:webcal-create-new-subscription) * [Get Webcal Update](doc:webcal-get-update) ###Google Resource: * [Create New Google Subscription](doc:google-create-new-subscription)
Any application which authenticates using OAuth will automatically have access to perform the following actions on the calendars associated with your account: ###Subscription Resource: * [Create New Subscription](doc:create-new-subscription) * [Get Subscription Details](doc:get-subscription-details) * [Get Subscription Details for all Subscriptions for a Username](doc:get-multiple-subscription-details-with-a-username) * [Update Subscription Details](doc:update-subscription-details) * [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription) ###Webcal Resource: * [Create New Webcal Subscription](doc:webcal-create-new-subscription) * [Get Webcal Update](doc:webcal-get-update) ###Google Resource: * [Create New Google Subscription](doc:google-create-new-subscription)
{"_id":"565fc4dc07e3200d006e46a9","type":"basic","category":"565fc4b907e3200d006e46a8","link_external":false,"parentDoc":null,"order":0,"project":"565fc2d2649b951900c89858","sync_unique":"","version":"565fc2d2649b951900c8985b","body":"CalReply makes use the OAuth 2 protocol to allow websites or applications to request authorization to access protected calendars without requiring the account username and password.\n\n####OAuth Details\n\n* CalReply OAuth supports the **client_credentials** grant type\n* OAuth requests will **only** be served over HTTPS\n* **Access tokens** will expire after 5 minutes (subject to changes in production environment). Don’t rely on this amount instead use the value returned in **expires_in**.\n* ** Refresh tokens** will expire after 60 minutes (subject to changes in production environment).\n\n###Authentication Flow\n\nThese are the steps for authenticating with OAuth2: \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c1e08ae-export-2.png\",\n        \"export-2.png\",\n        322,\n        374,\n        \"#dfe0de\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"This page will help you get started with OAuth Authentication","hidden":false,"link_url":"","updates":[],"createdAt":"2015-12-03T04:28:12.479Z","isReference":true,"slug":"introduction","title":"Introduction","user":"555d323987ebf70d002aded4","__v":5,"api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"githubsync":"","next":{"pages":[],"description":""},"childrenPages":[]}

Introduction

This page will help you get started with OAuth Authentication

CalReply makes use the OAuth 2 protocol to allow websites or applications to request authorization to access protected calendars without requiring the account username and password. ####OAuth Details * CalReply OAuth supports the **client_credentials** grant type * OAuth requests will **only** be served over HTTPS * **Access tokens** will expire after 5 minutes (subject to changes in production environment). Don’t rely on this amount instead use the value returned in **expires_in**. * ** Refresh tokens** will expire after 60 minutes (subject to changes in production environment). ###Authentication Flow These are the steps for authenticating with OAuth2: [block:image] { "images": [ { "image": [ "https://files.readme.io/c1e08ae-export-2.png", "export-2.png", 322, 374, "#dfe0de" ] } ] } [/block]
CalReply makes use the OAuth 2 protocol to allow websites or applications to request authorization to access protected calendars without requiring the account username and password. ####OAuth Details * CalReply OAuth supports the **client_credentials** grant type * OAuth requests will **only** be served over HTTPS * **Access tokens** will expire after 5 minutes (subject to changes in production environment). Don’t rely on this amount instead use the value returned in **expires_in**. * ** Refresh tokens** will expire after 60 minutes (subject to changes in production environment). ###Authentication Flow These are the steps for authenticating with OAuth2: [block:image] { "images": [ { "image": [ "https://files.readme.io/c1e08ae-export-2.png", "export-2.png", 322, 374, "#dfe0de" ] } ] } [/block]
{"_id":"565fc5656c2a8d0d002765a0","excerpt":"This page will help you get started with Obtaining an Access Token","githubsync":"","link_external":false,"title":"Obtaining an Access Token","createdAt":"2015-12-03T04:30:29.497Z","hidden":false,"isReference":true,"sync_unique":"","type":"post","__v":33,"api":{"settings":"5a1f9731986fec001e5a8810","url":"/oauth2/token","auth":"required","params":[{"_id":"5a1f9a668d762a002a98f7d7","ref":"","in":"header","required":false,"desc":"Client id and secret encoded for Basic Authentication, where `Username` is `client_id` and `Password` is `client_secret`","default":"","type":"string","name":"Authorization"},{"_id":"5a1f9a668d762a002a98f7d6","ref":"","in":"body","required":true,"desc":"OAuth 2 flow that is being initiated. Must be `client_credentials`","default":"","type":"string","name":"grant_type"},{"_id":"5a1f9a668d762a002a98f7d5","ref":"","in":"body","required":false,"desc":"Your client id (mandatory if no Authorization Header)","default":"","type":"string","name":"client_id"},{"_id":"5a1f9a668d762a002a98f7d4","ref":"","in":"body","required":false,"desc":"Your client secret (mandatory if no Authorization Header)","default":"","type":"string","name":"client_secret"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n \"access_token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n \"token_type\": \"bearer\",\n \"expires_in\": 299,\n \"refresh_token\": \"yyyyyyyyyyyyyyyyyyyyyyyyy\",\n \"as:client_id\": \"johnsmithmedia\",\n \".issued\": \"Sun, 06 Dec 2015 23:53:00 GMT\",\n \".expires\": \"Sun, 06 Dec 2015 23:58:00 GMT\"\n}","name":""}]},"examples":{"codes":[{"name":"cURL - With Authorization Header","language":"curl","code":"curl -X POST \\\n\thttps://api.calreply.net/oauth2/token\n\t--header 'Content-Type: application/json' \\\n  --header 'Accept: application/json' \\\n  --header 'authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n  -d '{\n\t\"grant_type\": \"client_credentials\"\n}'"},{"name":"cURL - Without Authorization Header","language":"curl","code":"curl -X POST \\\n\thttps://api.calreply.net/oauth2/token\n\t--header 'Content-Type: application/json' \\\n  --header 'Accept: application/json' \\\n  -d '{\n\t\"grant_type\": \"client_credentials\",\n\t\"client_id\": \"johnsmithmedia\",\n\t\"client_secret\": \"password\"\n}'"}]},"method":"post"},"category":"565fc4b907e3200d006e46a8","order":1,"parentDoc":null,"project":"565fc2d2649b951900c89858","slug":"client-authentication-details","updates":[],"user":"555d323987ebf70d002aded4","body":"To obtain an access token, a POST request with the client authentication details is needed. The client’s authentication details can be provided in one of two ways.\n\n####Option 1: Use basic authentication\n\nUsing an Authentication Header, encode your client id and secret for Basic Authentication, where: \n \n  * Username: *client_id*\n  * Password: *client_secret*\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Option 1 is the preferred method.\"\n}\n[/block]\n####Option 2: Send authentication details as URL encoded form data\n\nAlternatively you can include the client id and secret as extra values as url encoded form data. \n\n###Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**access_token**\\n*Always Present*\",\n    \"1-0\": \"**token_type**\\n*Always Present*\",\n    \"2-0\": \"**expires_in**\\n*Always Present*\",\n    \"3-0\": \"**refresh_token**\\n*Always Present*\",\n    \"4-0\": \"**as:client_id**\\n*Always Present*\",\n    \"5-0\": \"**.issued**\\n*Always Present*\",\n    \"6-0\": \"**.expires**\\n*Always Present*\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"2-1\": \"Number\",\n    \"5-1\": \"Date\",\n    \"6-1\": \"Date\",\n    \"0-2\": \"The OAuth token to use for further API calls.\",\n    \"1-2\": \"Type of access token. Will always be **Bearer**.\",\n    \"2-2\": \"The number of seconds left that access_token is valid.\",\n    \"3-2\": \"A long-lived token which can be used to obtain a new access token.\",\n    \"4-2\": \"your client id.\",\n    \"5-2\": \"Date and time the access token was issued.\",\n    \"6-2\": \"Date and time the access token will expire.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","link_url":"","next":{"description":"","pages":[]},"version":"565fc2d2649b951900c8985b","childrenPages":[]}

postObtaining an Access Token

This page will help you get started with Obtaining an Access Token

Body Params

grant_type:
required
string
OAuth 2 flow that is being initiated. Must be `client_credentials`
client_id:
string
Your client id (mandatory if no Authorization Header)
client_secret:
string
Your client secret (mandatory if no Authorization Header)

Headers

Authorization:
string
Client id and secret encoded for Basic Authentication, where `Username` is `client_id` and `Password` is `client_secret`
To obtain an access token, a POST request with the client authentication details is needed. The client’s authentication details can be provided in one of two ways. ####Option 1: Use basic authentication Using an Authentication Header, encode your client id and secret for Basic Authentication, where: * Username: *client_id* * Password: *client_secret* [block:callout] { "type": "info", "body": "Option 1 is the preferred method." } [/block] ####Option 2: Send authentication details as URL encoded form data Alternatively you can include the client id and secret as extra values as url encoded form data. ###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**access_token**\n*Always Present*", "1-0": "**token_type**\n*Always Present*", "2-0": "**expires_in**\n*Always Present*", "3-0": "**refresh_token**\n*Always Present*", "4-0": "**as:client_id**\n*Always Present*", "5-0": "**.issued**\n*Always Present*", "6-0": "**.expires**\n*Always Present*", "0-1": "String", "1-1": "String", "3-1": "String", "4-1": "String", "2-1": "Number", "5-1": "Date", "6-1": "Date", "0-2": "The OAuth token to use for further API calls.", "1-2": "Type of access token. Will always be **Bearer**.", "2-2": "The number of seconds left that access_token is valid.", "3-2": "A long-lived token which can be used to obtain a new access token.", "4-2": "your client id.", "5-2": "Date and time the access token was issued.", "6-2": "Date and time the access token will expire." }, "cols": 3, "rows": 7 } [/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



To obtain an access token, a POST request with the client authentication details is needed. The client’s authentication details can be provided in one of two ways. ####Option 1: Use basic authentication Using an Authentication Header, encode your client id and secret for Basic Authentication, where: * Username: *client_id* * Password: *client_secret* [block:callout] { "type": "info", "body": "Option 1 is the preferred method." } [/block] ####Option 2: Send authentication details as URL encoded form data Alternatively you can include the client id and secret as extra values as url encoded form data. ###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**access_token**\n*Always Present*", "1-0": "**token_type**\n*Always Present*", "2-0": "**expires_in**\n*Always Present*", "3-0": "**refresh_token**\n*Always Present*", "4-0": "**as:client_id**\n*Always Present*", "5-0": "**.issued**\n*Always Present*", "6-0": "**.expires**\n*Always Present*", "0-1": "String", "1-1": "String", "3-1": "String", "4-1": "String", "2-1": "Number", "5-1": "Date", "6-1": "Date", "0-2": "The OAuth token to use for further API calls.", "1-2": "Type of access token. Will always be **Bearer**.", "2-2": "The number of seconds left that access_token is valid.", "3-2": "A long-lived token which can be used to obtain a new access token.", "4-2": "your client id.", "5-2": "Date and time the access token was issued.", "6-2": "Date and time the access token will expire." }, "cols": 3, "rows": 7 } [/block]
{"_id":"56650fabc8981f0d0039a874","updates":[],"api":{"auth":"required","params":[{"_id":"5a1f9dc2681312001e23af99","ref":"","in":"header","required":true,"desc":"Client id and secret encoded for Basic Authentication, where `Username` is `client_id` and `Password` is `client_secret`","default":"","type":"string","name":"Authorization"},{"_id":"5a1f9dc2681312001e23af98","ref":"","in":"body","required":true,"desc":"OAuth 2 flow that is being initiated. Must be `refresh_token`.","default":"","type":"string","name":"grant_type"},{"_id":"5a1f9dc2681312001e23af97","ref":"","in":"body","required":true,"desc":"The refresh token issued when access token was return.","default":"","type":"string","name":"refresh_token"},{"_id":"5a1f9dc2681312001e23af96","ref":"","in":"body","required":false,"desc":"Your client id.","default":"","type":"string","name":"client_id"}],"results":{"codes":[{"language":"json","code":"{\n\t\"access_token\": \"yyyyyyyyyyyyyyyyyyyyyyy\", \n  \"token_type\": \"bearer\",\n\t\"expires_in\": 3599,\n\t\"refresh_token\": \"yyyyyyyyyyyyyyy\", \n  \"as:client_id\": \"johnsmithmedia\",\n\t\".issued\": \"Mon, 02 Nov 2015 00:40:17 GMT\", \n  \".expires\": \"Mon, 02 Nov \t\t\t2015 01:40:17 GMT\"\n}","name":"","status":200}]},"settings":"5a1f9731986fec001e5a8810","url":"/oauth2/token","examples":{"codes":[{"language":"curl","code":"curl -X POST \\\n \thttps://api.calreply.net/oauth2/token\n  --header 'Content-Type: application/json' \\\n  --header 'Accept: application/json' \\\n  --header 'authorization: Basic YWRtaW46cGFzc3dvcmQ=' \\\n  -d '{\n  \"grant_type\": \"client_credentials\",\n  \"refresh_token\": \"xxxxxxxxxxxxxxx\",\n  \"client_id\": \"johnsmithmedia\"\n}'"}]},"method":"post"},"category":"565fc4b907e3200d006e46a8","parentDoc":null,"slug":"refresh-tokens","sync_unique":"","version":"565fc2d2649b951900c8985b","body":"All access tokens granted will automatically expire after the timeframe specified when retrieving the token, so all developer code must cater for refreshing tokens. You do this by swapping a refresh token for a new access token.\n\nIf an access token has been granted, you can use the refresh token included when the original token was granted to automatically retrieve a new access token. \n\n###Response\n\nThe response to the refresh token request is the same as the response to the initial token grant:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**access_token**\\n*Always Present*\",\n    \"1-0\": \"**token_type**\\n*Always Present*\",\n    \"2-0\": \"**expires_in**\\n*Always Present*\",\n    \"3-0\": \"**refresh_token**\\n*Always Present*\",\n    \"4-0\": \"**as:client_id**\\n*Always Present*\",\n    \"5-0\": \"**.issued**\\n*Always Present*\",\n    \"6-0\": \"**.expires**\\n*Always Present*\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"3-1\": \"String\",\n    \"2-1\": \"Number\",\n    \"5-1\": \"Date\",\n    \"6-1\": \"Date\",\n    \"4-1\": \"String\",\n    \"0-2\": \"The OAuth token to use for further API calls.\",\n    \"1-2\": \"Type of access token. Will always be **Bearer.** \",\n    \"2-2\": \"The number of seconds left that access_token is valid.\",\n    \"3-2\": \"A long-lived token which can be used to obtain a new access token.\",\n    \"4-2\": \"your client id.\",\n    \"5-2\": \"Date and time the access token was issued.\",\n    \"6-2\": \"Date and time the access token will expire.\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please note each refresh token can only be used once. Each response to refresh an access token request will return a refresh token that needs to be used next time.\",\n  \"title\": \"Important\"\n}\n[/block]\n**Using Access tokens to make API calls** \n\nWhen making API calls with an OAuth access token, the token should be passed in as a bearer token in the Authorization header of an API request.\n\nSo for example, if your access token was JKTmODIzNTBhODQ1ZWU5ZDkz, the authorization header of your HTTPS requests would be ```Authorization: Bearer JKTmODIzNTBhODQ1ZWU5ZDkz```.","hidden":false,"project":"565fc2d2649b951900c89858","link_url":"","title":"Refresh Tokens","type":"post","createdAt":"2015-12-07T04:48:43.885Z","excerpt":"This page will help you get started with using Refresh Tokens","link_external":false,"isReference":true,"next":{"description":"","pages":[]},"order":2,"user":"555d323987ebf70d002aded4","__v":13,"githubsync":"","childrenPages":[]}

postRefresh Tokens

This page will help you get started with using Refresh Tokens

Body Params

grant_type:
required
string
OAuth 2 flow that is being initiated. Must be `refresh_token`.
refresh_token:
required
string
The refresh token issued when access token was return.
client_id:
string
Your client id.

Headers

Authorization:
required
string
Client id and secret encoded for Basic Authentication, where `Username` is `client_id` and `Password` is `client_secret`
All access tokens granted will automatically expire after the timeframe specified when retrieving the token, so all developer code must cater for refreshing tokens. You do this by swapping a refresh token for a new access token. If an access token has been granted, you can use the refresh token included when the original token was granted to automatically retrieve a new access token. ###Response The response to the refresh token request is the same as the response to the initial token grant: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**access_token**\n*Always Present*", "1-0": "**token_type**\n*Always Present*", "2-0": "**expires_in**\n*Always Present*", "3-0": "**refresh_token**\n*Always Present*", "4-0": "**as:client_id**\n*Always Present*", "5-0": "**.issued**\n*Always Present*", "6-0": "**.expires**\n*Always Present*", "0-1": "String", "1-1": "String", "3-1": "String", "2-1": "Number", "5-1": "Date", "6-1": "Date", "4-1": "String", "0-2": "The OAuth token to use for further API calls.", "1-2": "Type of access token. Will always be **Bearer.** ", "2-2": "The number of seconds left that access_token is valid.", "3-2": "A long-lived token which can be used to obtain a new access token.", "4-2": "your client id.", "5-2": "Date and time the access token was issued.", "6-2": "Date and time the access token will expire." }, "cols": 3, "rows": 7 } [/block] [block:callout] { "type": "info", "body": "Please note each refresh token can only be used once. Each response to refresh an access token request will return a refresh token that needs to be used next time.", "title": "Important" } [/block] **Using Access tokens to make API calls** When making API calls with an OAuth access token, the token should be passed in as a bearer token in the Authorization header of an API request. So for example, if your access token was JKTmODIzNTBhODQ1ZWU5ZDkz, the authorization header of your HTTPS requests would be ```Authorization: Bearer JKTmODIzNTBhODQ1ZWU5ZDkz```.

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



All access tokens granted will automatically expire after the timeframe specified when retrieving the token, so all developer code must cater for refreshing tokens. You do this by swapping a refresh token for a new access token. If an access token has been granted, you can use the refresh token included when the original token was granted to automatically retrieve a new access token. ###Response The response to the refresh token request is the same as the response to the initial token grant: [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**access_token**\n*Always Present*", "1-0": "**token_type**\n*Always Present*", "2-0": "**expires_in**\n*Always Present*", "3-0": "**refresh_token**\n*Always Present*", "4-0": "**as:client_id**\n*Always Present*", "5-0": "**.issued**\n*Always Present*", "6-0": "**.expires**\n*Always Present*", "0-1": "String", "1-1": "String", "3-1": "String", "2-1": "Number", "5-1": "Date", "6-1": "Date", "4-1": "String", "0-2": "The OAuth token to use for further API calls.", "1-2": "Type of access token. Will always be **Bearer.** ", "2-2": "The number of seconds left that access_token is valid.", "3-2": "A long-lived token which can be used to obtain a new access token.", "4-2": "your client id.", "5-2": "Date and time the access token was issued.", "6-2": "Date and time the access token will expire." }, "cols": 3, "rows": 7 } [/block] [block:callout] { "type": "info", "body": "Please note each refresh token can only be used once. Each response to refresh an access token request will return a refresh token that needs to be used next time.", "title": "Important" } [/block] **Using Access tokens to make API calls** When making API calls with an OAuth access token, the token should be passed in as a bearer token in the Authorization header of an API request. So for example, if your access token was JKTmODIzNTBhODQ1ZWU5ZDkz, the authorization header of your HTTPS requests would be ```Authorization: Bearer JKTmODIzNTBhODQ1ZWU5ZDkz```.
{"_id":"5835021761b4300f0032e6aa","user":"555d323987ebf70d002aded4","api":{"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[]},"githubsync":"","link_external":false,"next":{"pages":[],"description":""},"order":0,"project":"565fc2d2649b951900c89858","hidden":false,"title":"Introduction","version":"565fc2d2649b951900c8985b","slug":"subscribe-resource-introduction","sync_unique":"","body":"Use the CalReply Subscription API to programatically create a calendar subscription for Webcal and Google. CalReply will automatically decide which subscription path to follow (Webcal or Google) depending on the device that is being used.  \n\nThis API will be useful in achieving greater control and flexibility in integrating CalReply subscription functionality, full control of look & feel and all platforms (websites or apps) can use this single API regardless of the user's device following Webcal or Google calendar subscriptions.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Single Subscriptions\",\n  \"body\": \"If you require a single subscription per subscriber, please contact your account manager, for more information on setting this up.\"\n}\n[/block]","category":"583501d5b4e4250f00c9ddd1","excerpt":"This page will help you get started with the CalReply Subscription API","isReference":true,"link_url":"","parentDoc":null,"__v":1,"createdAt":"2016-11-23T02:42:31.513Z","type":"basic","updates":["5a1f3744ade2810012c5bb73"],"childrenPages":[]}

Introduction

This page will help you get started with the CalReply Subscription API

Use the CalReply Subscription API to programatically create a calendar subscription for Webcal and Google. CalReply will automatically decide which subscription path to follow (Webcal or Google) depending on the device that is being used. This API will be useful in achieving greater control and flexibility in integrating CalReply subscription functionality, full control of look & feel and all platforms (websites or apps) can use this single API regardless of the user's device following Webcal or Google calendar subscriptions. [block:callout] { "type": "info", "title": "Single Subscriptions", "body": "If you require a single subscription per subscriber, please contact your account manager, for more information on setting this up." } [/block]
Use the CalReply Subscription API to programatically create a calendar subscription for Webcal and Google. CalReply will automatically decide which subscription path to follow (Webcal or Google) depending on the device that is being used. This API will be useful in achieving greater control and flexibility in integrating CalReply subscription functionality, full control of look & feel and all platforms (websites or apps) can use this single API regardless of the user's device following Webcal or Google calendar subscriptions. [block:callout] { "type": "info", "title": "Single Subscriptions", "body": "If you require a single subscription per subscriber, please contact your account manager, for more information on setting this up." } [/block]
{"_id":"5833ce77f13aed0f00e8db3a","hidden":false,"link_external":false,"slug":"integrating-via-subscription-api","updates":[],"user":"555d323987ebf70d002aded4","githubsync":"","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"next":{"pages":[],"description":""},"order":1,"project":"565fc2d2649b951900c89858","type":"basic","version":"565fc2d2649b951900c8985b","createdAt":"2016-11-22T04:49:59.720Z","excerpt":"This page will help you get started with Integrating via Subscription API","sync_unique":"","category":"583501d5b4e4250f00c9ddd1","body":"CalReply exposes a subscription api for the greatest level of flexibility with integrating a website or app with our service. It should only be used as a server to server service rather than client to server. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5610eb6-export.png\",\n        \"export.png\",\n        948,\n        201,\n        \"#29333c\"\n      ],\n      \"caption\": \"Server to Server Implementation\"\n    }\n  ]\n}\n[/block]","link_url":"","parentDoc":null,"title":"Integrating via Subscription API","__v":0,"childrenPages":[]}

Integrating via Subscription API

This page will help you get started with Integrating via Subscription API

CalReply exposes a subscription api for the greatest level of flexibility with integrating a website or app with our service. It should only be used as a server to server service rather than client to server. [block:image] { "images": [ { "image": [ "https://files.readme.io/5610eb6-export.png", "export.png", 948, 201, "#29333c" ], "caption": "Server to Server Implementation" } ] } [/block]
CalReply exposes a subscription api for the greatest level of flexibility with integrating a website or app with our service. It should only be used as a server to server service rather than client to server. [block:image] { "images": [ { "image": [ "https://files.readme.io/5610eb6-export.png", "export.png", 948, 201, "#29333c" ], "caption": "Server to Server Implementation" } ] } [/block]
{"_id":"58350201b4e4250f00c9ddd2","next":{"pages":[],"description":""},"slug":"create-new-subscription","user":"555d323987ebf70d002aded4","category":"583501d5b4e4250f00c9ddd1","excerpt":"Use the API to programatically create a calendar subscription for Webcal and Google","hidden":false,"__v":19,"body":"This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction).\n\n###Subscription Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**subscriberId**\\n\\n*Optional*\",\n    \"1-0\": \"**emailAddress** \\n\\n*Optional*\",\n    \"3-0\": \"**redirectTo** \\n\\n*Required*\",\n    \"4-0\": \"**calendarTags** \\n\\n*Optional*\",\n    \"5-0\": \"**timeZoneId** \\n\\n*Optional*\",\n    \"6-0\": \"**requestEventIds** \\n\\n*Optional*\",\n    \"7-0\": \"**externalEventIds** \\n\\n*Optional*\",\n    \"8-0\": \"**utmSource** \\n\\n*Optional*\",\n    \"9-0\": \"**utmMedium** \\n\\n*Optional*\",\n    \"10-0\": \"**utmContent** \\n\\n*Optional*\",\n    \"11-0\": \"**utmCampaign** \\n\\n*Optional*\",\n    \"12-0\": \"**userAgent** \\n\\n*Optional*\",\n    \"13-0\": \"**urlReferrer** \\n\\n*Optional*\",\n    \"14-0\": \"**ipAddress** \\n\\n*Optional*\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"3-1\": \"String\",\n    \"4-1\": \"CalendarTags[]\",\n    \"5-1\": \"String\",\n    \"6-1\": \"String[] \\n(UUID/GUID)\",\n    \"7-1\": \"String[]\",\n    \"8-1\": \"String\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"14-1\": \"String\",\n    \"0-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\",\n    \"1-2\": \"Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.\",\n    \"3-2\": \"A url to redirect user to with subscription result after a Google subscription e.g. confirmation page, app deep link\",\n    \"4-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\nSee [Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) below for complete schema.\",\n    \"5-2\": \"Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\\n\\nSee [Timezones](doc:timezones) for available list.\",\n    \"6-2\": \"An array of event identifiers. Identifiers that do not match will be ignored.\",\n    \"7-2\": \"One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.\",\n    \"8-2\": \"Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics.  e.g. Newsletter-December.\",\n    \"9-2\": \"Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email\",\n    \"10-2\": \"Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner\",\n    \"11-2\": \"Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign\",\n    \"12-2\": \"User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.\\n\\n`Required if no subscriptionMethod value is passed through`\",\n    \"13-2\": \"Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook\",\n    \"14-2\": \"IP Address of the user. Used for monitoring and logging purposes\",\n    \"2-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\",\n    \"15-0\": \"**subscriptionMethod**\\n\\n*Optional*\",\n    \"15-1\": \"String\",\n    \"15-2\": \"Used when you want to bypass  our subscription flow choice and tell us which one to use. Value can only be `WebCal` or `Google`\",\n    \"16-0\": \"**Events**\\n\\n*Optional*\",\n    \"16-1\": \"EventDetails[]\",\n    \"16-2\": \"You can add manual events to this subscription that belong solely to this subscription.\"\n  },\n  \"cols\": 3,\n  \"rows\": 17\n}\n[/block]\n##Response\n\nThe response will vary depending on the subscription type determined by the server or specified by you.\n\n###WebCal\n\nThe following is response body that will be returned from a WebCal subscription flow.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**success**\\n\\n*Always present*\",\n    \"1-0\": \"**statusCode**\\n\\n*Always present*\",\n    \"2-0\": \"**errors**\\n\\n*Always present*\",\n    \"3-0\": \"**subscriptionType**\\n\\n*Sometimes Present*\",\n    \"4-0\": \"**subscriptionId** \\n\\n*Sometimes Present*\",\n    \"5-0\": \"**subscriptionUrl** \\n\\n*Sometimes Present*\",\n    \"6-0\": \"**isNewSubscription** \\n\\n*Sometimes Present*\",\n    \"7-0\": \"**subscriberId** \\n\\n*Sometimes Present*\",\n    \"0-1\": \"Boolean\",\n    \"1-1\": \"Number\",\n    \"2-1\": \"ErrorModel[]\",\n    \"3-1\": \"String\",\n    \"4-1\": \"UUID/GUID\",\n    \"5-1\": \"String\",\n    \"6-1\": \"Boolean\",\n    \"7-1\": \"String\",\n    \"0-2\": \"Represents if the create subscription was successful\",\n    \"1-2\": \"HTTP error codes if request was not successful\",\n    \"2-2\": \"List of errors if request was not successful\\n\\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.\",\n    \"3-2\": \"Value that represents the type of subscription created if the request was successful. Currently only *Webcal* or *Google* \",\n    \"4-2\": \"Unique identifier of the subscription if request was successful\",\n    \"5-2\": \"Url to the WebCal Subscription if request was successful\",\n    \"6-2\": \"Represents if this was a new or existing subscription if request was successful\",\n    \"7-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\nIf successful, the caller will need to prompt the user to add the subscription to their calendar by opening the subscriptionUrl in a window. The recommended way to do this in a website is by using javascript.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script type=\\\"text/javascript\\\">\\n  \\twindow.location = response.subscriptionUrl;\\n</script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"A user can cancel the native prompt to add a calendar. It is recommended that you have a way i.e. link, for the user to retry adding the the calendar should they cancel the native prompt.\"\n}\n[/block]\n###Google\n\nA Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal.\n\n**New Subscription**\nBefore we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. In this case the response of a Create Subscription will return the following. If successful, you must redirect the user to the url in the redirectTo property.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**success** \\n\\n*Always Present*\",\n    \"0-1\": \"Boolean\",\n    \"0-2\": \"Represents if the create subscription was successful\",\n    \"1-0\": \"**statusCode** \\n\\n*Always Present*\",\n    \"2-0\": \"**errors** \\n\\n*Always Present*\",\n    \"3-0\": \"**subscriptionType**\\n \\n*Sometimes Present*\",\n    \"4-0\": \"**subscriberId** \\n\\n*Sometimes Present*\",\n    \"5-0\": \"**redirectTo** \\n\\n*Always Present*\",\n    \"1-1\": \"Number\",\n    \"2-1\": \"String[]\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"1-2\": \"HTTP error codes if request was not successful\",\n    \"2-2\": \"List of json serialized errors if request was not successful\\n\\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.\",\n    \"3-2\": \"Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google\",\n    \"4-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\",\n    \"5-2\": \"Redirect url to the Google OAuth Consent Form\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\nAfter the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request. The response will be exactly the same as the response for Existing Subscription, below.\n\n**Existing Subscription**\nIf an existing subscription is found, the OAuth consent does not need to be repeated. In this case we simply update the subscription and the response of a Create Subscription will return the following.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**success** \\n\\n*Always Present*\",\n    \"0-1\": \"Boolean\",\n    \"0-2\": \"Represents if the create subscription was successful\",\n    \"1-0\": \"**statusCode** \\n\\n*Always Present*\",\n    \"2-0\": \"**errors** \\n\\n*Always Present*\",\n    \"3-0\": \"**subscriptionType** \\n\\n*Sometimes Present*\",\n    \"4-0\": \"**subscriptionId** \\n\\n*Sometimes Present*\",\n    \"5-0\": \"**isNewSubscription** \\n\\n*Sometimes Present*\",\n    \"6-0\": \"**subscriberId** \\n\\n*Sometimes Present*\",\n    \"1-1\": \"Number\",\n    \"2-1\": \"String[]\",\n    \"3-1\": \"String\",\n    \"4-1\": \"UUID/GUID\",\n    \"5-1\": \"Boolean\",\n    \"6-1\": \"String\",\n    \"1-2\": \"HTTP error codes if request was not successful\",\n    \"2-2\": \"List of error messages if request was not successful\",\n    \"3-2\": \"Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google\",\n    \"4-2\": \"Unique identifier of the subscription if request was successful\",\n    \"5-2\": \"Represents if this was a new or existing subscription if request was successful\",\n    \"6-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","parentDoc":null,"sync_unique":"","version":"565fc2d2649b951900c8985b","isReference":true,"link_url":"","link_external":false,"order":2,"project":"565fc2d2649b951900c89858","title":"Create New Subscription","type":"post","api":{"params":[{"_id":"565fca04bca87d0d006bc7b4","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"No default","type":"string","name":"accountCode"},{"_id":"565fca04bca87d0d006bc7b3","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"No default","type":"string","name":"calendarCode"},{"_id":"565fca04bca87d0d006bc7b2","ref":"","in":"body","required":false,"desc":"The list of parameters which can be passed through when creating a new subscription. Parameters are listed in the table below.","default":"No default","type":"object","name":"subscriptionParams"},{"_id":"58350e00b4e4250f00c9dde3","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"58350e00b4e4250f00c9dde2","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"success\": true,\n  \"subscriptionType\": \"google\",\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"subscriberId\": \"jsmith\",\n  \"redirectTo\": \"https://accounts.google.com/signin/oauth/oauthchooseaccount?hl=en-US&client_id=915162771337m&as=E6QhIKJHFcuF1ZbdXdRj1A&flowName=GeneralOAuthFlow\",\n}\n ","name":"OK - Google"},{"name":"OK - Webcal","status":200,"language":"json","code":"{\n  \"success\": true,\n  \"subscriptionType\": \"webcal\",\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"subscriberId\": \"jsmith\",\n  \"subscriptionUrl\": \"webcal://api.calreply.net/v1/webcal/705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"isNewSubscription\": true\n}"},{"status":400,"language":"json","code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}"}]},"settings":"583507fada14d90f0084d43b","url":"/subscribe/:accountCode/:calendarCode","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X POST --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"calendarTags\": [\n  \t\t{\"internalId\":\"0000000-0000-0000-0000-000000000001\"},\n      {\"internalId\":\"0000000-0000-0000-0000-000000000002\"},\n      {\"externalId\":\"TeamA\"}],\n  \"timeZoneId\": \"Eastern Standard Time\",\n  \"additionalOptIn\":False,\n  \"emailAddress\": \"jsmith@gmail.com\",\n  \"marketingAllowed\": false,\n  \"urlReferrer\": \"http://m.facebook.com/\",\n  \"ipAddress\": \"64.64.64.64\"\n  \"userAgent\": \"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Safari/537.36 [FB_IAB/FB4A;FBAV/55.0.0.18.66;]\",\n  \"utmSource\": \"Facebook\",\n  \"utmMedium\": \"Display\",\n  \"utmCampaign\": \"2016\",\n  \"utmContent\": \"Mobile_320x50\",\n  \"requestEventIds\": [\"8e71077bc7f242b8acb9bda8f804c0d7\"],\n  \"externalEventIds\": [\"90712\",\"37818\"],\n  \"subscriberId\": \"jsmith\",\n  \"subscriptionMethod\": \"google\",\n  \"redirectTo\": \"https://yourdomain.com/confirmation\"\n}\" \"https://api.calreply.net/v2/subscribe/:accountCode/:calendarCode\"","name":null},{"language":"curl","code":"curl -X POST --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"events\": [\n  \t\t { \n       \t \"eventId\": \"BookingId:12345678\",\n         \"title\":\"The Lion King\",\n         \"description\": \"2 tickets to the Lion King at The Capital Theatre. Customer Support: 01-2345-6789\",\n         \"location\":\"13 Campbell St, Haymarket NSW 2000\",\n         \"timezone\": \"AUS Eastern Standard Time\",\n         \"start\": \"2016-06-04T19:00:00+10\",\n         \"end\": \"2016-06-04T23:00:00+10\",\n         \"allDayEvent\": false,\n         \"notifyBefore\": 60\n        }\n],\n  \"userAgent\": \"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Safari/537.36 [FB_IAB/FB4A;FBAV/55.0.0.18.66;]\",\n  \"subscriberId\": \"jsmith\",\n  \"redirectTo\": \"https://yourdomain.com/confirmation\"\n}\" \"https://api.calreply.net/v2/subscribe/:accountCode/:calendarCode\""}]},"method":"post"},"createdAt":"2016-11-23T02:42:09.900Z","githubsync":"","updates":["5a1f39182a3f630012fe92dc","5a1f44091917ba0034e06068","5a1f4d2f0ea0df00125e01af","5a1f4d87ade2810012c5bd41"],"childrenPages":[]}

postCreate New Subscription

Use the API to programatically create a calendar subscription for Webcal and Google

Path Params

accountCode:
required
stringNo default
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calendarCode:
required
stringNo default
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.

Body Params

subscriptionParams:
objectNo default
The list of parameters which can be passed through when creating a new subscription. Parameters are listed in the table below.

Headers

Content-Type:
stringapplication/json
Authorization:
string
A Bearer token using your access token received via OAuth authentication
This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###Subscription Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriberId**\n\n*Optional*", "1-0": "**emailAddress** \n\n*Optional*", "3-0": "**redirectTo** \n\n*Required*", "4-0": "**calendarTags** \n\n*Optional*", "5-0": "**timeZoneId** \n\n*Optional*", "6-0": "**requestEventIds** \n\n*Optional*", "7-0": "**externalEventIds** \n\n*Optional*", "8-0": "**utmSource** \n\n*Optional*", "9-0": "**utmMedium** \n\n*Optional*", "10-0": "**utmContent** \n\n*Optional*", "11-0": "**utmCampaign** \n\n*Optional*", "12-0": "**userAgent** \n\n*Optional*", "13-0": "**urlReferrer** \n\n*Optional*", "14-0": "**ipAddress** \n\n*Optional*", "0-1": "String", "1-1": "String", "3-1": "String", "4-1": "CalendarTags[]", "5-1": "String", "6-1": "String[] \n(UUID/GUID)", "7-1": "String[]", "8-1": "String", "9-1": "String", "10-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "14-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "3-2": "A url to redirect user to with subscription result after a Google subscription e.g. confirmation page, app deep link", "4-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee [Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) below for complete schema.", "5-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\nSee [Timezones](doc:timezones) for available list.", "6-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "7-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "8-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "9-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "11-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "12-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.\n\n`Required if no subscriptionMethod value is passed through`", "13-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "14-2": "IP Address of the user. Used for monitoring and logging purposes", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "15-0": "**subscriptionMethod**\n\n*Optional*", "15-1": "String", "15-2": "Used when you want to bypass our subscription flow choice and tell us which one to use. Value can only be `WebCal` or `Google`", "16-0": "**Events**\n\n*Optional*", "16-1": "EventDetails[]", "16-2": "You can add manual events to this subscription that belong solely to this subscription." }, "cols": 3, "rows": 17 } [/block] ##Response The response will vary depending on the subscription type determined by the server or specified by you. ###WebCal The following is response body that will be returned from a WebCal subscription flow. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "1-0": "**statusCode**\n\n*Always present*", "2-0": "**errors**\n\n*Always present*", "3-0": "**subscriptionType**\n\n*Sometimes Present*", "4-0": "**subscriptionId** \n\n*Sometimes Present*", "5-0": "**subscriptionUrl** \n\n*Sometimes Present*", "6-0": "**isNewSubscription** \n\n*Sometimes Present*", "7-0": "**subscriberId** \n\n*Sometimes Present*", "0-1": "Boolean", "1-1": "Number", "2-1": "ErrorModel[]", "3-1": "String", "4-1": "UUID/GUID", "5-1": "String", "6-1": "Boolean", "7-1": "String", "0-2": "Represents if the create subscription was successful", "1-2": "HTTP error codes if request was not successful", "2-2": "List of errors if request was not successful\n\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only *Webcal* or *Google* ", "4-2": "Unique identifier of the subscription if request was successful", "5-2": "Url to the WebCal Subscription if request was successful", "6-2": "Represents if this was a new or existing subscription if request was successful", "7-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id" }, "cols": 3, "rows": 8 } [/block] If successful, the caller will need to prompt the user to add the subscription to their calendar by opening the subscriptionUrl in a window. The recommended way to do this in a website is by using javascript. [block:code] { "codes": [ { "code": "<script type=\"text/javascript\">\n \twindow.location = response.subscriptionUrl;\n</script>", "language": "html" } ] } [/block] [block:callout] { "type": "info", "title": "Note", "body": "A user can cancel the native prompt to add a calendar. It is recommended that you have a way i.e. link, for the user to retry adding the the calendar should they cancel the native prompt." } [/block] ###Google A Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal. **New Subscription** Before we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. In this case the response of a Create Subscription will return the following. If successful, you must redirect the user to the url in the redirectTo property. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success** \n\n*Always Present*", "0-1": "Boolean", "0-2": "Represents if the create subscription was successful", "1-0": "**statusCode** \n\n*Always Present*", "2-0": "**errors** \n\n*Always Present*", "3-0": "**subscriptionType**\n \n*Sometimes Present*", "4-0": "**subscriberId** \n\n*Sometimes Present*", "5-0": "**redirectTo** \n\n*Always Present*", "1-1": "Number", "2-1": "String[]", "3-1": "String", "4-1": "String", "5-1": "String", "1-2": "HTTP error codes if request was not successful", "2-2": "List of json serialized errors if request was not successful\n\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google", "4-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "5-2": "Redirect url to the Google OAuth Consent Form" }, "cols": 3, "rows": 6 } [/block] After the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request. The response will be exactly the same as the response for Existing Subscription, below. **Existing Subscription** If an existing subscription is found, the OAuth consent does not need to be repeated. In this case we simply update the subscription and the response of a Create Subscription will return the following. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success** \n\n*Always Present*", "0-1": "Boolean", "0-2": "Represents if the create subscription was successful", "1-0": "**statusCode** \n\n*Always Present*", "2-0": "**errors** \n\n*Always Present*", "3-0": "**subscriptionType** \n\n*Sometimes Present*", "4-0": "**subscriptionId** \n\n*Sometimes Present*", "5-0": "**isNewSubscription** \n\n*Sometimes Present*", "6-0": "**subscriberId** \n\n*Sometimes Present*", "1-1": "Number", "2-1": "String[]", "3-1": "String", "4-1": "UUID/GUID", "5-1": "Boolean", "6-1": "String", "1-2": "HTTP error codes if request was not successful", "2-2": "List of error messages if request was not successful", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google", "4-2": "Unique identifier of the subscription if request was successful", "5-2": "Represents if this was a new or existing subscription if request was successful", "6-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id" }, "cols": 3, "rows": 7 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###Subscription Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriberId**\n\n*Optional*", "1-0": "**emailAddress** \n\n*Optional*", "3-0": "**redirectTo** \n\n*Required*", "4-0": "**calendarTags** \n\n*Optional*", "5-0": "**timeZoneId** \n\n*Optional*", "6-0": "**requestEventIds** \n\n*Optional*", "7-0": "**externalEventIds** \n\n*Optional*", "8-0": "**utmSource** \n\n*Optional*", "9-0": "**utmMedium** \n\n*Optional*", "10-0": "**utmContent** \n\n*Optional*", "11-0": "**utmCampaign** \n\n*Optional*", "12-0": "**userAgent** \n\n*Optional*", "13-0": "**urlReferrer** \n\n*Optional*", "14-0": "**ipAddress** \n\n*Optional*", "0-1": "String", "1-1": "String", "3-1": "String", "4-1": "CalendarTags[]", "5-1": "String", "6-1": "String[] \n(UUID/GUID)", "7-1": "String[]", "8-1": "String", "9-1": "String", "10-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "14-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "3-2": "A url to redirect user to with subscription result after a Google subscription e.g. confirmation page, app deep link", "4-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee [Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) below for complete schema.", "5-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\nSee [Timezones](doc:timezones) for available list.", "6-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "7-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "8-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "9-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "11-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "12-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.\n\n`Required if no subscriptionMethod value is passed through`", "13-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "14-2": "IP Address of the user. Used for monitoring and logging purposes", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "15-0": "**subscriptionMethod**\n\n*Optional*", "15-1": "String", "15-2": "Used when you want to bypass our subscription flow choice and tell us which one to use. Value can only be `WebCal` or `Google`", "16-0": "**Events**\n\n*Optional*", "16-1": "EventDetails[]", "16-2": "You can add manual events to this subscription that belong solely to this subscription." }, "cols": 3, "rows": 17 } [/block] ##Response The response will vary depending on the subscription type determined by the server or specified by you. ###WebCal The following is response body that will be returned from a WebCal subscription flow. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "1-0": "**statusCode**\n\n*Always present*", "2-0": "**errors**\n\n*Always present*", "3-0": "**subscriptionType**\n\n*Sometimes Present*", "4-0": "**subscriptionId** \n\n*Sometimes Present*", "5-0": "**subscriptionUrl** \n\n*Sometimes Present*", "6-0": "**isNewSubscription** \n\n*Sometimes Present*", "7-0": "**subscriberId** \n\n*Sometimes Present*", "0-1": "Boolean", "1-1": "Number", "2-1": "ErrorModel[]", "3-1": "String", "4-1": "UUID/GUID", "5-1": "String", "6-1": "Boolean", "7-1": "String", "0-2": "Represents if the create subscription was successful", "1-2": "HTTP error codes if request was not successful", "2-2": "List of errors if request was not successful\n\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only *Webcal* or *Google* ", "4-2": "Unique identifier of the subscription if request was successful", "5-2": "Url to the WebCal Subscription if request was successful", "6-2": "Represents if this was a new or existing subscription if request was successful", "7-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id" }, "cols": 3, "rows": 8 } [/block] If successful, the caller will need to prompt the user to add the subscription to their calendar by opening the subscriptionUrl in a window. The recommended way to do this in a website is by using javascript. [block:code] { "codes": [ { "code": "<script type=\"text/javascript\">\n \twindow.location = response.subscriptionUrl;\n</script>", "language": "html" } ] } [/block] [block:callout] { "type": "info", "title": "Note", "body": "A user can cancel the native prompt to add a calendar. It is recommended that you have a way i.e. link, for the user to retry adding the the calendar should they cancel the native prompt." } [/block] ###Google A Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal. **New Subscription** Before we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. In this case the response of a Create Subscription will return the following. If successful, you must redirect the user to the url in the redirectTo property. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success** \n\n*Always Present*", "0-1": "Boolean", "0-2": "Represents if the create subscription was successful", "1-0": "**statusCode** \n\n*Always Present*", "2-0": "**errors** \n\n*Always Present*", "3-0": "**subscriptionType**\n \n*Sometimes Present*", "4-0": "**subscriberId** \n\n*Sometimes Present*", "5-0": "**redirectTo** \n\n*Always Present*", "1-1": "Number", "2-1": "String[]", "3-1": "String", "4-1": "String", "5-1": "String", "1-2": "HTTP error codes if request was not successful", "2-2": "List of json serialized errors if request was not successful\n\nSee [Error Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-error-model) below for complete schema.", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google", "4-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "5-2": "Redirect url to the Google OAuth Consent Form" }, "cols": 3, "rows": 6 } [/block] After the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request. The response will be exactly the same as the response for Existing Subscription, below. **Existing Subscription** If an existing subscription is found, the OAuth consent does not need to be repeated. In this case we simply update the subscription and the response of a Create Subscription will return the following. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success** \n\n*Always Present*", "0-1": "Boolean", "0-2": "Represents if the create subscription was successful", "1-0": "**statusCode** \n\n*Always Present*", "2-0": "**errors** \n\n*Always Present*", "3-0": "**subscriptionType** \n\n*Sometimes Present*", "4-0": "**subscriptionId** \n\n*Sometimes Present*", "5-0": "**isNewSubscription** \n\n*Sometimes Present*", "6-0": "**subscriberId** \n\n*Sometimes Present*", "1-1": "Number", "2-1": "String[]", "3-1": "String", "4-1": "UUID/GUID", "5-1": "Boolean", "6-1": "String", "1-2": "HTTP error codes if request was not successful", "2-2": "List of error messages if request was not successful", "3-2": "Value that represents the type of subscription created if the request was successful. Currently only WebCal or Google", "4-2": "Unique identifier of the subscription if request was successful", "5-2": "Represents if this was a new or existing subscription if request was successful", "6-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id" }, "cols": 3, "rows": 7 } [/block]
{"_id":"58350235b85f2f0f0046390d","__v":5,"category":"583501d5b4e4250f00c9ddd1","createdAt":"2016-11-23T02:43:01.999Z","githubsync":"","next":{"pages":[],"description":""},"slug":"get-subscription-details","api":{"examples":{"codes":[{"language":"curl","code":"curl -X GET --header \"Accept: application/json\" \"https://api.calreply.net/v1/subscription/:subscriptionId\"","name":""}]},"method":"get","params":[{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":false,"desc":"This is the subscriptionId returned from the Create New subscription API function.","default":"","type":"string","name":"subscriptionId"},{"_id":"5835120cb85f2f0f00463919","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5835120cb85f2f0f00463918","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"results":{"codes":[{"status":200,"name":"","code":"{\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"calendar\": {\n    \"code\": \"acmecal_1\",\n    \"name\": \"Calendar 1\",\n    \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n  },\n  \"tags\": [\n  \t\"id\": \"652c382f-09cf-4924-875a-d10873d4032d\",\n    \"name: \"All Teams\"\n  ],\n  \"timezoneId\": \"Eastern Standard Time\",\n  \"subscriptionType\": \"webcal\",\n  \"subscriberId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"emailAddress\": \"jsmith@gmail.com\",\n  \"createdAt\": \"2016-11-01 10:01:00\",\n  \"isActive\": true,\n   \"events\": [\n        {\n            \"id\": \"d1c67c2e-fde0-4d69-8bc9-52d411e71093\",\n            \"name\": \"Montreal Canadiens vs Toronto Maple Leafs\",\n            \"externalId\": \"2055263\",\n            \"isExcluded\": true\n        }\n   ]\n}","language":"json"},{"code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}","language":"text","status":400,"name":""}]},"settings":"","url":"/subscription/:subscriptionId","auth":"required"},"body":"###Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**subscriptionId** \\n\\n*Always Present* \",\n    \"1-0\": \"**calendar** \\n\\n*Always Present*\",\n    \"2-0\": \"**tags** \\n\\n*Sometimes Present*\",\n    \"3-0\": \"**timezoneId** \\n\\n*Sometimes Present*\",\n    \"4-0\": \"**subscriptionType** \\n\\n*Always Present*\",\n    \"5-0\": \"**subscriberId** \\n\\n*Sometimes Present*\",\n    \"6-0\": \"**emailAddress** \\n\\n*Sometimes Present*\",\n    \"7-0\": \"**createdAt** \\n\\n*Always Present*\",\n    \"8-0\": \"**isActive** \\n\\n*Always Present*\",\n    \"9-0\": \"**deactivatedDate** \\n\\n*Sometimes Present*\",\n    \"10-0\": \"**events** \\n\\n*Sometimes Present*\",\n    \"0-1\": \"UUID/GUID\",\n    \"1-1\": \"Calendar\",\n    \"2-1\": \"CalendarTags[]\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"String\",\n    \"7-1\": \"Date\",\n    \"8-1\": \"Boolean\",\n    \"9-1\": \"Date\",\n    \"10-1\": \"Events[]\",\n    \"0-2\": \"Unique identifier of the subscription.\",\n    \"1-2\": \"Calendar information. See [Calendar Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model) below for complete schema\",\n    \"2-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\nSee [Calendar Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.\",\n    \"3-2\": \"Windows timezone identifier to filter events by\",\n    \"4-2\": \"Value that represents the type of subscription created. Currently only WebCal or Google\",\n    \"5-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\",\n    \"6-2\": \"Email address linked to the subscription\",\n    \"7-2\": \"Date and time in UTC that the subscription was created\",\n    \"8-2\": \"Is the subscription still active or has it been deactivated\",\n    \"9-2\": \"Date and time in UTC that the subscription was deactivated\",\n    \"10-2\": \"List of calendar events that are included or excluded from a calendar subscription. Events marked as not excluded will exclusively be included in the calendar subscription. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema and see below for further information.\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"A calendar is made of a set of events. An individual subscription can have a subset of events, by either specifying which events to include or exclude. The 'Events' list returned is only a list of the events to be excluded or included and not the original set of events.\",\n  \"title\": \"Calendar Events\"\n}\n[/block]","hidden":false,"link_url":"","order":3,"project":"565fc2d2649b951900c89858","excerpt":"Use the API to programmatically Get Subscription Details","isReference":true,"link_external":false,"parentDoc":null,"sync_unique":"","type":"get","updates":[],"title":"Get Subscription Details","user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","childrenPages":[]}

getGet Subscription Details

Use the API to programmatically Get Subscription Details

Path Params

subscriptionId:
string
This is the subscriptionId returned from the Create New subscription API function.

Headers

Content-Type:
stringapplication/json
Authorization:
string
A Bearer token using your access token received via OAuth authentication
###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriptionId** \n\n*Always Present* ", "1-0": "**calendar** \n\n*Always Present*", "2-0": "**tags** \n\n*Sometimes Present*", "3-0": "**timezoneId** \n\n*Sometimes Present*", "4-0": "**subscriptionType** \n\n*Always Present*", "5-0": "**subscriberId** \n\n*Sometimes Present*", "6-0": "**emailAddress** \n\n*Sometimes Present*", "7-0": "**createdAt** \n\n*Always Present*", "8-0": "**isActive** \n\n*Always Present*", "9-0": "**deactivatedDate** \n\n*Sometimes Present*", "10-0": "**events** \n\n*Sometimes Present*", "0-1": "UUID/GUID", "1-1": "Calendar", "2-1": "CalendarTags[]", "3-1": "String", "4-1": "String", "5-1": "String", "6-1": "String", "7-1": "Date", "8-1": "Boolean", "9-1": "Date", "10-1": "Events[]", "0-2": "Unique identifier of the subscription.", "1-2": "Calendar information. See [Calendar Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model) below for complete schema", "2-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee [Calendar Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.", "3-2": "Windows timezone identifier to filter events by", "4-2": "Value that represents the type of subscription created. Currently only WebCal or Google", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-2": "Email address linked to the subscription", "7-2": "Date and time in UTC that the subscription was created", "8-2": "Is the subscription still active or has it been deactivated", "9-2": "Date and time in UTC that the subscription was deactivated", "10-2": "List of calendar events that are included or excluded from a calendar subscription. Events marked as not excluded will exclusively be included in the calendar subscription. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema and see below for further information." }, "cols": 3, "rows": 11 } [/block] [block:callout] { "type": "warning", "body": "A calendar is made of a set of events. An individual subscription can have a subset of events, by either specifying which events to include or exclude. The 'Events' list returned is only a list of the events to be excluded or included and not the original set of events.", "title": "Calendar Events" } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriptionId** \n\n*Always Present* ", "1-0": "**calendar** \n\n*Always Present*", "2-0": "**tags** \n\n*Sometimes Present*", "3-0": "**timezoneId** \n\n*Sometimes Present*", "4-0": "**subscriptionType** \n\n*Always Present*", "5-0": "**subscriberId** \n\n*Sometimes Present*", "6-0": "**emailAddress** \n\n*Sometimes Present*", "7-0": "**createdAt** \n\n*Always Present*", "8-0": "**isActive** \n\n*Always Present*", "9-0": "**deactivatedDate** \n\n*Sometimes Present*", "10-0": "**events** \n\n*Sometimes Present*", "0-1": "UUID/GUID", "1-1": "Calendar", "2-1": "CalendarTags[]", "3-1": "String", "4-1": "String", "5-1": "String", "6-1": "String", "7-1": "Date", "8-1": "Boolean", "9-1": "Date", "10-1": "Events[]", "0-2": "Unique identifier of the subscription.", "1-2": "Calendar information. See [Calendar Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model) below for complete schema", "2-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee [Calendar Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.", "3-2": "Windows timezone identifier to filter events by", "4-2": "Value that represents the type of subscription created. Currently only WebCal or Google", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-2": "Email address linked to the subscription", "7-2": "Date and time in UTC that the subscription was created", "8-2": "Is the subscription still active or has it been deactivated", "9-2": "Date and time in UTC that the subscription was deactivated", "10-2": "List of calendar events that are included or excluded from a calendar subscription. Events marked as not excluded will exclusively be included in the calendar subscription. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema and see below for further information." }, "cols": 3, "rows": 11 } [/block] [block:callout] { "type": "warning", "body": "A calendar is made of a set of events. An individual subscription can have a subset of events, by either specifying which events to include or exclude. The 'Events' list returned is only a list of the events to be excluded or included and not the original set of events.", "title": "Calendar Events" } [/block]
{"_id":"5902bb890502280f001e67dc","link_external":false,"link_url":"","next":{"pages":[],"description":""},"project":"565fc2d2649b951900c89858","sync_unique":"","title":"Get Subscription Details for all Subscriptions for a Username","updates":[],"githubsync":"","api":{"auth":"required","examples":{"codes":[{"name":"","code":"curl -X GET --header \"Accept: application/json\" \"https://api.calreply.net/v1/subscription/:accountCode/:calendarCode/:userName\"","language":"curl"}]},"method":"get","params":[{"_id":"5902bf3c0502280f001e6805","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"","type":"string","name":"accountCode"},{"_id":"5902bf3c0502280f001e6804","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"","type":"string","name":"calendarCode"},{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":true,"desc":"This is the username as defined by a 3rd party system","default":"","type":"string","name":"userName"},{"_id":"5835120cb85f2f0f00463919","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5835120cb85f2f0f00463918","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"results":{"codes":[{"status":200,"language":"json","code":"[\n  {\n    \"subscriptionId\": \"85865458-8f71-4187-9b49-0106ece19ee0\",\n    \"calendar\": {\n      \"code\": \"acmecal_1\",\n      \"name\": \"Calendar 1\",\n      \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n    },\n    \"tags\": [],\n    \"timezoneId\": \"Eastern Standard Time\",\n    \"subscriptionType\": \"Google\",\n    \"emailAddress\": \"jsmith@gmail.com\",\n    \"createdAt\": \"2016-11-09T17:30:11.933\",\n    \"isActive\": false,\n    \"deactivatedDate\": \"2016-11-30T23:02:41.83\",\n    \"events\": []\n  },\n  {\n    \"subscriptionId\": \"18101aa1-1464-4a09-9dd3-114095de6629\",\n    \"calendar\": {\n      \"code\": \"acmecal_2\",\n      \"name\": \"Calendar 2\",\n      \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n    },\n    \"tags\": [],\n    \"timezoneId\": \"Eastern Standard Time\",\n    \"subscriptionType\": \"Google\",\n    \"emailAddress\": \"jsmith@gmail.com\",\n    \"createdAt\": \"2016-11-09T17:11:53.307\",\n    \"isActive\": false,\n    \"deactivatedDate\": \"2016-11-30T23:02:39.537\",\n    \"events\": []\n  },\n  {\n    \"subscriptionId\": \"255476c2-b403-4903-8b2f-37fbc1771079\",\n    \"calendar\": {\n      \"code\": \"acmecal_3\",\n      \"name\": \"Calendar 3\",\n      \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n    },\n    \"tags\": [],\n    \"timezoneId\": \"Eastern Standard Time\",\n    \"subscriptionType\": \"WebCal\",\n    \"emailAddress\": \"jsmith@gmail.com\",\n    \"createdAt\": \"2016-11-30T00:49:09.653\",\n    \"isActive\": false,\n    \"deactivatedDate\": \"2016-11-30T23:02:52.177\",\n    \"events\": []\n  }\n  ]","name":""}]},"settings":"","url":"/subscription/:accountCode/:calendarCode/:username"},"category":"583501d5b4e4250f00c9ddd1","createdAt":"2017-04-28T03:48:25.164Z","hidden":false,"parentDoc":null,"slug":"get-multiple-subscription-details-with-a-username","type":"get","body":"###Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**subscriptionId** \\n\\n*Always Present* \",\n    \"1-0\": \"**calendar** \\n\\n*Always Present*\",\n    \"2-0\": \"**tags** \\n\\n*Sometimes Present*\",\n    \"3-0\": \"**timezoneId** \\n\\n*Sometimes Present*\",\n    \"4-0\": \"**subscriptionType** \\n\\n*Always Present*\",\n    \"5-0\": \"**subscriberId** \\n\\n*Sometimes Present*\",\n    \"6-0\": \"**emailAddress** \\n\\n*Sometimes Present*\",\n    \"7-0\": \"**createdAt** \\n\\n*Always Present*\",\n    \"8-0\": \"**isActive** \\n\\n*Always Present*\",\n    \"9-0\": \"**deactivatedDate** \\n\\n*Sometimes Present*\",\n    \"10-0\": \"**events** \\n\\n*Sometimes Present*\",\n    \"0-1\": \"UUID/GUID\",\n    \"1-1\": \"Calendar\",\n    \"2-1\": \"CalendarTags[]\",\n    \"3-1\": \"String\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"String\",\n    \"7-1\": \"Date\",\n    \"8-1\": \"Boolean\",\n    \"9-1\": \"Date\",\n    \"10-1\": \"Events[]\",\n    \"0-2\": \"Unique identifier of the subscription.\",\n    \"1-2\": \"Calendar information. See [Calendar Model ](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model)below for complete schema\",\n    \"2-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\nSee Calendar [Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.\",\n    \"3-2\": \"Windows timezone identifier to filter events by\",\n    \"4-2\": \"Value that represents the type of subscription created. Currently only WebCal or Google\",\n    \"5-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\",\n    \"6-2\": \"Email address linked to the subscription\",\n    \"7-2\": \"Date and time in UTC that the subscription was created\",\n    \"8-2\": \"Is the subscription still active or has it been deactivated\",\n    \"9-2\": \"Date and time in UTC that the subscription was deactivated\",\n    \"10-2\": \"List of calendar events to subscribe to only. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema\"\n  },\n  \"cols\": 3,\n  \"rows\": 11\n}\n[/block]","__v":3,"isReference":true,"order":4,"user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","excerpt":"Use the API to programmatically get multiple Subscription Details with a username","childrenPages":[]}

getGet Subscription Details for all Subscriptions for a Username

Use the API to programmatically get multiple Subscription Details with a username

Path Params

accountCode:
required
string
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calendarCode:
required
string
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.
userName:
required
string
This is the username as defined by a 3rd party system

Headers

Content-Type:
stringapplication/json
Authorization:
string
A Bearer token using your access token received via OAuth authentication
###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriptionId** \n\n*Always Present* ", "1-0": "**calendar** \n\n*Always Present*", "2-0": "**tags** \n\n*Sometimes Present*", "3-0": "**timezoneId** \n\n*Sometimes Present*", "4-0": "**subscriptionType** \n\n*Always Present*", "5-0": "**subscriberId** \n\n*Sometimes Present*", "6-0": "**emailAddress** \n\n*Sometimes Present*", "7-0": "**createdAt** \n\n*Always Present*", "8-0": "**isActive** \n\n*Always Present*", "9-0": "**deactivatedDate** \n\n*Sometimes Present*", "10-0": "**events** \n\n*Sometimes Present*", "0-1": "UUID/GUID", "1-1": "Calendar", "2-1": "CalendarTags[]", "3-1": "String", "4-1": "String", "5-1": "String", "6-1": "String", "7-1": "Date", "8-1": "Boolean", "9-1": "Date", "10-1": "Events[]", "0-2": "Unique identifier of the subscription.", "1-2": "Calendar information. See [Calendar Model ](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model)below for complete schema", "2-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee Calendar [Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.", "3-2": "Windows timezone identifier to filter events by", "4-2": "Value that represents the type of subscription created. Currently only WebCal or Google", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-2": "Email address linked to the subscription", "7-2": "Date and time in UTC that the subscription was created", "8-2": "Is the subscription still active or has it been deactivated", "9-2": "Date and time in UTC that the subscription was deactivated", "10-2": "List of calendar events to subscribe to only. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema" }, "cols": 3, "rows": 11 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



###Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**subscriptionId** \n\n*Always Present* ", "1-0": "**calendar** \n\n*Always Present*", "2-0": "**tags** \n\n*Sometimes Present*", "3-0": "**timezoneId** \n\n*Sometimes Present*", "4-0": "**subscriptionType** \n\n*Always Present*", "5-0": "**subscriberId** \n\n*Sometimes Present*", "6-0": "**emailAddress** \n\n*Sometimes Present*", "7-0": "**createdAt** \n\n*Always Present*", "8-0": "**isActive** \n\n*Always Present*", "9-0": "**deactivatedDate** \n\n*Sometimes Present*", "10-0": "**events** \n\n*Sometimes Present*", "0-1": "UUID/GUID", "1-1": "Calendar", "2-1": "CalendarTags[]", "3-1": "String", "4-1": "String", "5-1": "String", "6-1": "String", "7-1": "Date", "8-1": "Boolean", "9-1": "Date", "10-1": "Events[]", "0-2": "Unique identifier of the subscription.", "1-2": "Calendar information. See [Calendar Model ](https://calreply-api.readme.io/docs/subscription-resource-models#section-calendar-model)below for complete schema", "2-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\nSee Calendar [Tag Mode](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model)l for complete schema. for complete schema.", "3-2": "Windows timezone identifier to filter events by", "4-2": "Value that represents the type of subscription created. Currently only WebCal or Google", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-2": "Email address linked to the subscription", "7-2": "Date and time in UTC that the subscription was created", "8-2": "Is the subscription still active or has it been deactivated", "9-2": "Date and time in UTC that the subscription was deactivated", "10-2": "List of calendar events to subscribe to only. See [Event Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-event-model) below for complete schema" }, "cols": 3, "rows": 11 } [/block]
{"_id":"58eeb906b4f0dd3900874830","parentDoc":null,"type":"put","createdAt":"2017-04-12T23:32:22.619Z","excerpt":"Use the API to programmatically update a calendar subscription","link_external":false,"category":"583501d5b4e4250f00c9ddd1","githubsync":"","order":5,"slug":"update-subscription-details","title":"Update Subscription Details","__v":10,"api":{"auth":"required","examples":{"codes":[{"name":"Include events in subscription","language":"curl","code":"curl -X PUT --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"calendarTags\": [\n  \t\t{\"internalId\":\"0000000-0000-0000-0000-000000000001\"},\n      {\"internalId\":\"0000000-0000-0000-0000-000000000002\"},\n      {\"externalId\":\"TeamA\"}],\n  \"timeZoneId\": \"Eastern Standard Time\",\n  \"additionalOptIn\":false,\n  \"marketingAllowed\": false,\n  \"requestEventIds\": [\"8e71077bc7f242b8acb9bda8f804c0d7\"],\n  \"externalEventIds\": [\"90712\",\"37818\"]\n}\" \"https://api.calreply.net/v1/subscription/:accountCode/:calendarCode/:subscriptionId\""},{"name":"Exclude events from subscription","language":"curl","code":"curl -X PUT --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"calendarTags\": [\n  \t\t{\"internalId\":\"0000000-0000-0000-0000-000000000001\"},\n      {\"internalId\":\"0000000-0000-0000-0000-000000000002\"},\n      {\"externalId\":\"TeamA\"}],\n  \"timeZoneId\": \"Eastern Standard Time\",\n  \"additionalOptIn\":false,\n  \"marketingAllowed\": false,\n  \"excludeRequestEventIds\": [\"8e71077bc7f242b8acb9bda8f804c0d7\"],\n  \"excludExternalEventIds\": [\"90712\",\"37818\"]\n}\" \"https://api.calreply.net/v1/subscription/:accountCode/:calendarCode/:subscriptionId\""}]},"method":"put","params":[{"_id":"565fca04bca87d0d006bc7b4","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"No default","type":"string","name":"accountCode"},{"_id":"565fca04bca87d0d006bc7b3","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"No default","type":"string","name":"calendarCode"},{"_id":"565fca04bca87d0d006bc7b2","ref":"","in":"body","required":true,"desc":"The list of parameters which can be passed through when updating an existing subscription. Parameters are listed in the table below.","default":"No default","type":"object","name":"subscriptionUpdateParameters"},{"_id":"58350e00b4e4250f00c9dde3","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"58350e00b4e4250f00c9dde2","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"},{"_id":"58eebba5cbbefb2f00fc0e8d","ref":"","in":"path","required":true,"desc":"This is the subscriptionId returned from the Create New subscription API function.","default":"","type":"string","name":"subscriptionId"}],"results":{"codes":[{"name":null,"status":200,"language":"json","code":"{\n \"success\": true,\n \"message\": \"Subscription updated\"\n}"},{"language":"json","code":"{\n \"success\": false,\n \"statusCode\": 400,\n \"errors\": [\n   {\n     \"Code\": \"InvalidRequestParameter\",\n     \"Reason\": \"Invalid combination of tag details and merchant/calendar codes\"\n   }\n ]\n}","name":"","status":400}]},"settings":"","url":"/subscription/:accountCode/:calendarCode/:subscriptionId"},"version":"565fc2d2649b951900c8985b","body":"This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction).\n\n###Subscription Update Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**CalendarTags** \\n\\n*Optional*\",\n    \"1-0\": \"**timeZoneId** \\n\\n*Optional*\",\n    \"2-0\": \"**requestEventIds** \\n\\n*Optional*\",\n    \"3-0\": \"**externalEventIds** \\n\\n*Optional*\",\n    \"0-1\": \"[CalendarTags[]](https://calreply-api.readme.io/docs/update-subscription-details#section-tag-model)\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String[] \\n(UUID/GUID)\",\n    \"3-1\": \"String[]\",\n    \"0-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) for complete schema.\",\n    \"1-2\": \"Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\\n\\nSee [Timezones](doc:timezones) for available list.\",\n    \"2-2\": \"An array of event identifiers to exclusively include in the calendar subscription. Identifiers that do not match will be ignored.\",\n    \"3-2\": \"One or more identifiers that represents unique events to you that will be exclusively include in the calendar subscription. . Identifiers that do not match will be ignored.\",\n    \"6-0\": \"**marketingAllowed**\\n\\n*Optional*\",\n    \"6-1\": \"Boolean\",\n    \"6-2\": \"Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.\",\n    \"7-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"7-1\": \"Boolean\",\n    \"7-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\",\n    \"8-0\": \"**redirectTo**\\n\\n*Optional*\",\n    \"8-2\": \"The url to redirect the user to after the subscription has been created. (Required for Google subscriptions)\",\n    \"8-1\": \"String\",\n    \"4-0\": \"**excludeRequestEventIds** \\n\\n*Optional*\",\n    \"4-1\": \"String[] \\n(UUID/GUID)\",\n    \"4-2\": \"An array of event identifiers to exclude from the calendar subscription. Identifiers that do not match will be ignored.\",\n    \"5-0\": \"**excludeExternalEventIds** \\n\\n*Optional*\",\n    \"5-1\": \"String[]\",\n    \"5-2\": \"One or more identifiers that represents unique events to you that will be excluded from the calendar subscription. Identifiers that do not match will be ignored.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]\n\n##Response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**success**\\n\\n*Always present*\",\n    \"1-0\": \"**statusCode**\\n\\n*Always present*\",\n    \"2-0\": \"**errors**\\n\\n*Always present*\",\n    \"3-0\": \"**message**\\n\\n*Sometimes present*\",\n    \"0-1\": \"Boolean\",\n    \"1-1\": \"Number\",\n    \"2-1\": \"String[]\",\n    \"3-1\": \"String\",\n    \"0-2\": \"Represents if the create subscription was successful\",\n    \"1-2\": \"HTTP error codes if request was not successful\",\n    \"2-2\": \"List of error messages if request was not successful\",\n    \"3-2\": \"Confirmation message\",\n    \"4-0\": \"**subscriptionId**\\n\\n*Sometimes present*\",\n    \"4-1\": \"UUID/GUID\",\n    \"4-2\": \"The unique identifier of the subscription that was being updated\",\n    \"5-0\": \"**subscriberId**\\n\\n*Sometimes present*\",\n    \"5-1\": \"String\",\n    \"5-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id\",\n    \"6-0\": \"**subscriptionType**\\n\\n*Sometimes present*\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Type of subscription that is being updated. Currently can only be `Google` or `WebCal`\",\n    \"7-0\": \"**RedirectTo**\\n\\n*Sometimes present*\",\n    \"7-1\": \"String\",\n    \"7-2\": \"Url to redirect the user to, to complete reauthorization.\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Google Subscriptions\",\n  \"body\": \"Users with Google subscriptions can revoke permission to their calendar via their Google Account Settings. In cases where this has occurred we require the user to reauthorize us so we can access their calendar and update it. This is achieved by passing back a url to the Google Consent form in the `redirectTo` property of the response. You **must** redirect the user  and upon completion of the consent form we will redirect the use back to you with the result.\"\n}\n[/block]\n### Google Reauthorization \n\nAfter the user has selected an option on the consent form we will redirect the user back to the caller using the `redirectTo` url provided in the request and the result as query parameters.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**success**\\n\\n*Always present*\",\n    \"0-1\": \"Boolean\",\n    \"0-2\": \"Indicates if the subscription was created successfully.\",\n    \"1-0\": \"**subscriptionId**\\n\\n*Sometimes present*\",\n    \"1-1\": \"UUID/GUID\",\n    \"1-2\": \"Unique identifier of the subscription.\",\n    \"2-0\": \"**subscriberId**\\n\\n*Sometimes present*\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Identifier that represents a unique user to you given to us in initial request.\",\n    \"3-0\": \"**errors**\\n\\n**Sometimes present**\",\n    \"3-1\": \"Errors[]\\n(Json)\",\n    \"3-2\": \"Json serialize array of Errors\",\n    \"h-0\": \"Parameter\",\n    \"h-2\": \"Description\",\n    \"h-1\": \"Type\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","hidden":false,"next":{"pages":[],"description":""},"sync_unique":"","updates":[],"user":"555d323987ebf70d002aded4","isReference":true,"link_url":"","project":"565fc2d2649b951900c89858","childrenPages":[]}

putUpdate Subscription Details

Use the API to programmatically update a calendar subscription

Path Params

accountCode:
required
stringNo default
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calendarCode:
required
stringNo default
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.
subscriptionId:
required
string
This is the subscriptionId returned from the Create New subscription API function.

Body Params

subscriptionUpdateParameters:
required
objectNo default
The list of parameters which can be passed through when updating an existing subscription. Parameters are listed in the table below.

Headers

Content-Type:
stringapplication/json
Authorization:
string
A Bearer token using your access token received via OAuth authentication
This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###Subscription Update Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**CalendarTags** \n\n*Optional*", "1-0": "**timeZoneId** \n\n*Optional*", "2-0": "**requestEventIds** \n\n*Optional*", "3-0": "**externalEventIds** \n\n*Optional*", "0-1": "[CalendarTags[]](https://calreply-api.readme.io/docs/update-subscription-details#section-tag-model)", "1-1": "String", "2-1": "String[] \n(UUID/GUID)", "3-1": "String[]", "0-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) for complete schema.", "1-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\nSee [Timezones](doc:timezones) for available list.", "2-2": "An array of event identifiers to exclusively include in the calendar subscription. Identifiers that do not match will be ignored.", "3-2": "One or more identifiers that represents unique events to you that will be exclusively include in the calendar subscription. . Identifiers that do not match will be ignored.", "6-0": "**marketingAllowed**\n\n*Optional*", "6-1": "Boolean", "6-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "7-0": "**additionalOptIn**\n\n*Optional*", "7-1": "Boolean", "7-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "8-0": "**redirectTo**\n\n*Optional*", "8-2": "The url to redirect the user to after the subscription has been created. (Required for Google subscriptions)", "8-1": "String", "4-0": "**excludeRequestEventIds** \n\n*Optional*", "4-1": "String[] \n(UUID/GUID)", "4-2": "An array of event identifiers to exclude from the calendar subscription. Identifiers that do not match will be ignored.", "5-0": "**excludeExternalEventIds** \n\n*Optional*", "5-1": "String[]", "5-2": "One or more identifiers that represents unique events to you that will be excluded from the calendar subscription. Identifiers that do not match will be ignored." }, "cols": 3, "rows": 9 } [/block] ##Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "1-0": "**statusCode**\n\n*Always present*", "2-0": "**errors**\n\n*Always present*", "3-0": "**message**\n\n*Sometimes present*", "0-1": "Boolean", "1-1": "Number", "2-1": "String[]", "3-1": "String", "0-2": "Represents if the create subscription was successful", "1-2": "HTTP error codes if request was not successful", "2-2": "List of error messages if request was not successful", "3-2": "Confirmation message", "4-0": "**subscriptionId**\n\n*Sometimes present*", "4-1": "UUID/GUID", "4-2": "The unique identifier of the subscription that was being updated", "5-0": "**subscriberId**\n\n*Sometimes present*", "5-1": "String", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-0": "**subscriptionType**\n\n*Sometimes present*", "6-1": "String", "6-2": "Type of subscription that is being updated. Currently can only be `Google` or `WebCal`", "7-0": "**RedirectTo**\n\n*Sometimes present*", "7-1": "String", "7-2": "Url to redirect the user to, to complete reauthorization." }, "cols": 3, "rows": 8 } [/block] [block:callout] { "type": "warning", "title": "Google Subscriptions", "body": "Users with Google subscriptions can revoke permission to their calendar via their Google Account Settings. In cases where this has occurred we require the user to reauthorize us so we can access their calendar and update it. This is achieved by passing back a url to the Google Consent form in the `redirectTo` property of the response. You **must** redirect the user and upon completion of the consent form we will redirect the use back to you with the result." } [/block] ### Google Reauthorization After the user has selected an option on the consent form we will redirect the user back to the caller using the `redirectTo` url provided in the request and the result as query parameters. [block:parameters] { "data": { "0-0": "**success**\n\n*Always present*", "0-1": "Boolean", "0-2": "Indicates if the subscription was created successfully.", "1-0": "**subscriptionId**\n\n*Sometimes present*", "1-1": "UUID/GUID", "1-2": "Unique identifier of the subscription.", "2-0": "**subscriberId**\n\n*Sometimes present*", "2-1": "String", "2-2": "Identifier that represents a unique user to you given to us in initial request.", "3-0": "**errors**\n\n**Sometimes present**", "3-1": "Errors[]\n(Json)", "3-2": "Json serialize array of Errors", "h-0": "Parameter", "h-2": "Description", "h-1": "Type" }, "cols": 3, "rows": 4 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###Subscription Update Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**CalendarTags** \n\n*Optional*", "1-0": "**timeZoneId** \n\n*Optional*", "2-0": "**requestEventIds** \n\n*Optional*", "3-0": "**externalEventIds** \n\n*Optional*", "0-1": "[CalendarTags[]](https://calreply-api.readme.io/docs/update-subscription-details#section-tag-model)", "1-1": "String", "2-1": "String[] \n(UUID/GUID)", "3-1": "String[]", "0-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/subscription-resource-models#section-tag-model) for complete schema.", "1-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\nSee [Timezones](doc:timezones) for available list.", "2-2": "An array of event identifiers to exclusively include in the calendar subscription. Identifiers that do not match will be ignored.", "3-2": "One or more identifiers that represents unique events to you that will be exclusively include in the calendar subscription. . Identifiers that do not match will be ignored.", "6-0": "**marketingAllowed**\n\n*Optional*", "6-1": "Boolean", "6-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "7-0": "**additionalOptIn**\n\n*Optional*", "7-1": "Boolean", "7-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "8-0": "**redirectTo**\n\n*Optional*", "8-2": "The url to redirect the user to after the subscription has been created. (Required for Google subscriptions)", "8-1": "String", "4-0": "**excludeRequestEventIds** \n\n*Optional*", "4-1": "String[] \n(UUID/GUID)", "4-2": "An array of event identifiers to exclude from the calendar subscription. Identifiers that do not match will be ignored.", "5-0": "**excludeExternalEventIds** \n\n*Optional*", "5-1": "String[]", "5-2": "One or more identifiers that represents unique events to you that will be excluded from the calendar subscription. Identifiers that do not match will be ignored." }, "cols": 3, "rows": 9 } [/block] ##Response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "1-0": "**statusCode**\n\n*Always present*", "2-0": "**errors**\n\n*Always present*", "3-0": "**message**\n\n*Sometimes present*", "0-1": "Boolean", "1-1": "Number", "2-1": "String[]", "3-1": "String", "0-2": "Represents if the create subscription was successful", "1-2": "HTTP error codes if request was not successful", "2-2": "List of error messages if request was not successful", "3-2": "Confirmation message", "4-0": "**subscriptionId**\n\n*Sometimes present*", "4-1": "UUID/GUID", "4-2": "The unique identifier of the subscription that was being updated", "5-0": "**subscriberId**\n\n*Sometimes present*", "5-1": "String", "5-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id", "6-0": "**subscriptionType**\n\n*Sometimes present*", "6-1": "String", "6-2": "Type of subscription that is being updated. Currently can only be `Google` or `WebCal`", "7-0": "**RedirectTo**\n\n*Sometimes present*", "7-1": "String", "7-2": "Url to redirect the user to, to complete reauthorization." }, "cols": 3, "rows": 8 } [/block] [block:callout] { "type": "warning", "title": "Google Subscriptions", "body": "Users with Google subscriptions can revoke permission to their calendar via their Google Account Settings. In cases where this has occurred we require the user to reauthorize us so we can access their calendar and update it. This is achieved by passing back a url to the Google Consent form in the `redirectTo` property of the response. You **must** redirect the user and upon completion of the consent form we will redirect the use back to you with the result." } [/block] ### Google Reauthorization After the user has selected an option on the consent form we will redirect the user back to the caller using the `redirectTo` url provided in the request and the result as query parameters. [block:parameters] { "data": { "0-0": "**success**\n\n*Always present*", "0-1": "Boolean", "0-2": "Indicates if the subscription was created successfully.", "1-0": "**subscriptionId**\n\n*Sometimes present*", "1-1": "UUID/GUID", "1-2": "Unique identifier of the subscription.", "2-0": "**subscriberId**\n\n*Sometimes present*", "2-1": "String", "2-2": "Identifier that represents a unique user to you given to us in initial request.", "3-0": "**errors**\n\n**Sometimes present**", "3-1": "Errors[]\n(Json)", "3-2": "Json serialize array of Errors", "h-0": "Parameter", "h-2": "Description", "h-1": "Type" }, "cols": 3, "rows": 4 } [/block]
{"_id":"5a1f591c2a3f630012fe994c","project":"565fc2d2649b951900c89858","version":"565fc2d2649b951900c8985b","category":"583501d5b4e4250f00c9ddd1","user":"555d323987ebf70d002aded4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-11-30T01:04:28.200Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"language":"json","code":"","name":"","status":200},{"code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}","name":"","status":400,"language":"json"}]},"method":"delete","examples":{"codes":[{"language":"curl","name":"cURL - Deactivate subscription","code":"curl -H \"Authorization: Bearer MDRmODIzNTBhODQ1ZWU5ZDkz\" https://api.calreply.net/v1/subscription/:accountCode/:calendarCode/ -d \"{ \"id\": \"0000000-0000-0000-0000-000000000001\" }\""},{"name":"cUrl - Deactivate by Username","language":"curl","code":"curl -H \"Authorization: Bearer MDRmODIzNTBhODQ1ZWU5ZDkz\" https://api.calreply.net/v1/subscription/:accountCode/:calendarCode/ -d \"{ \"username\": \"john.doe@mymail.com\" }\""}]},"auth":"required","params":[{"_id":"5835159407e6c80f004edfda","ref":"","in":"path","required":false,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"","type":"string","name":"accountCode"},{"_id":"5667472b32dd550d00f39260","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"","type":"string","name":"calendarCode"},{"_id":"5835159407e6c80f004edfd9","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"},{"_id":"5a1f5a44ade2810012c5bf5c","ref":"","in":"body","required":false,"desc":"The list of parameters which can be passed through when deactivating subscriptions. Parameters are listed in the table below.","default":"","type":"object","name":"deactivateSubscriptionParameters"}],"url":"/subscription/:accountCode/:calendarCode/"},"isReference":true,"order":6,"body":"The Deactivate Subscription API function disables a subscription from receiving any events in the future. Once a subscription has been deactivated, any new events published will not appear in their calendar. \nYou can either specify an individual subscription to deactivate or all subscriptions that belong to a username for a calendar.\nThis API function is protected by OAuth and must include an [Access Token](doc:client-authentication-details) token in the same way it is required to create a subscription.\n\n### Deactivate Subscription Parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**id**\\n\\n*Optional*\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Id of subscription to deactivate\",\n    \"1-0\": \"**username**\\n\\n*Optional*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"The username to deactivate all subscriptions for\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","excerpt":"Use the API to programmatically disable one or more subscriptions from receiving events in the future.","slug":"deactivate-an-existing-subscription","type":"delete","title":"Deactivate an Existing Subscription","__v":6,"parentDoc":null,"childrenPages":[]}

deleteDeactivate an Existing Subscription

Use the API to programmatically disable one or more subscriptions from receiving events in the future.

Path Params

accountCode:
string
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calendarCode:
required
string
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.

Body Params

deactivateSubscriptionParameters:
object
The list of parameters which can be passed through when deactivating subscriptions. Parameters are listed in the table below.

Headers

Authorization:
string
A Bearer token using your access token received via OAuth authentication
The Deactivate Subscription API function disables a subscription from receiving any events in the future. Once a subscription has been deactivated, any new events published will not appear in their calendar. You can either specify an individual subscription to deactivate or all subscriptions that belong to a username for a calendar. This API function is protected by OAuth and must include an [Access Token](doc:client-authentication-details) token in the same way it is required to create a subscription. ### Deactivate Subscription Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**id**\n\n*Optional*", "0-1": "UUID/GUID", "0-2": "Id of subscription to deactivate", "1-0": "**username**\n\n*Optional*", "1-1": "String", "1-2": "The username to deactivate all subscriptions for" }, "cols": 3, "rows": 2 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples



The Deactivate Subscription API function disables a subscription from receiving any events in the future. Once a subscription has been deactivated, any new events published will not appear in their calendar. You can either specify an individual subscription to deactivate or all subscriptions that belong to a username for a calendar. This API function is protected by OAuth and must include an [Access Token](doc:client-authentication-details) token in the same way it is required to create a subscription. ### Deactivate Subscription Parameters [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**id**\n\n*Optional*", "0-1": "UUID/GUID", "0-2": "Id of subscription to deactivate", "1-0": "**username**\n\n*Optional*", "1-1": "String", "1-2": "The username to deactivate all subscriptions for" }, "cols": 3, "rows": 2 } [/block]
{"_id":"5902c49095200b0f00760352","body":"###Calendar Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"**code** \\n\\n*Required*\",\n    \"1-0\": \"**name** \\n\\n*Required*\",\n    \"2-0\": \"**image** \\n\\n*Optional*\",\n    \"0-1\": \"String\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"0-2\": \"Code Identifier for the calendar\",\n    \"1-2\": \"Display name of the calendar\",\n    \"2-2\": \"Calendar image if available\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n###Tag Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"**id**\\n\\n*Required*\",\n    \"1-0\": \"**name** \\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier for the calendar tag\",\n    \"1-2\": \"Display name of the tag\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n###Event Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"**id** \\n\\n*Required*\",\n    \"1-0\": \"**name** \\n\\n*Required*\",\n    \"2-0\": \"**externalId** \\n\\n*Optional*\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier for the calendar tag\",\n    \"1-2\": \"Display name of the tag\",\n    \"2-2\": \"Identifier that represents unique events to you\",\n    \"h-2\": \"Description\",\n    \"3-0\": \"**isExcluded** \\n\\n*Optional*\",\n    \"3-1\": \"Boolean\",\n    \"3-2\": \"Indicates that this event is excluded from the subscriber's calendar.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n### EventDetail Model\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**eventId**\\n\\n*Required*\",\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"8-0\": \"**notifyBefore**\\n\\n*Optional*\",\n    \"8-1\": \"Number\",\n    \"8-2\": \"Indicates how many minutes before the event the subscriber should be notified.\",\n    \"7-0\": \"**allDayEvent**\\n\\n*Optional*\",\n    \"7-1\": \"Boolean\",\n    \"7-2\": \"Indicated if the event runs all day.\",\n    \"6-0\": \"**end**\\n\\n*Required*\",\n    \"6-1\": \"DateTime (ISO 8601)\",\n    \"6-2\": \"Date and time the event will end in Timezone that it is occurs in.\",\n    \"5-0\": \"**start**\\n\\n*Required*\",\n    \"5-1\": \"DateTime (ISO 8601)\",\n    \"5-2\": \"Date and time the event will start in Timezone that it is occurs in.\",\n    \"4-0\": \"**timezone**\\n\\n*Optional*\",\n    \"4-1\": \"String\",\n    \"4-2\": \"A Windows timezone identifier. Indicates the timezone that an event occurs in.\",\n    \"3-0\": \"**Location**\\n\\n*Optional*\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Text that will appear in the event `Location` field.\",\n    \"2-0\": \"**description**\\n\\n*Required*\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Text that will appear in the events `Description` field.\",\n    \"1-0\": \"**title**\\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Summary/Title of the event.\",\n    \"0-1\": \"String\",\n    \"0-2\": \"A unique identifier for the event.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]\n### Error Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Property\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**Code**\\n\\n*Always present*\",\n    \"0-1\": \"String\",\n    \"1-0\": \"**Reason**\\n\\n*Always present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Explains why the error occured.\",\n    \"0-2\": \"Represents the type of error.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","link_url":"","user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","createdAt":"2017-04-28T04:26:56.226Z","githubsync":"","hidden":false,"isReference":true,"link_external":false,"order":7,"type":"basic","__v":5,"next":{"pages":[],"description":""},"parentDoc":null,"project":"565fc2d2649b951900c89858","slug":"subscription-resource-models","api":{"results":{"codes":[{"status":200,"name":"","code":"{\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"calendar\": {\n    \"code\": \"acmecal_1\",\n    \"name\": \"Calendar 1\",\n    \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n  },\n  \"tags\": [\n  \t\"id\": \"652c382f-09cf-4924-875a-d10873d4032d\",\n    \"name: \"All Teams\"\n  ],\n  \"timezoneId\": \"Eastern Standard Time\",\n  \"subscriptionType\": \"webcal\",\n  \"subscriberId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"emailAddress\": \"jsmith@gmail.com\",\n  \"createdAt\": \"2016-11-01 10:01:00\",\n  \"isActive\": true,\n}","language":"json"},{"code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}","language":"text","status":400,"name":""}]},"method":"get","examples":{"codes":[{"language":"curl","code":"curl -X GET --header \"Accept: application/json\" \"https://api.calreply.net/v1/subscription/:subscriptionId\"","name":""}]},"auth":"required","params":[{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":false,"desc":"This is the subscriptionId returned from the Create New subscription API function.","default":"","type":"string","name":"subscriptionId"},{"_id":"5835120cb85f2f0f00463919","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5835120cb85f2f0f00463918","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"url":"/subscription/:subscriptionId","settings":""},"category":"583501d5b4e4250f00c9ddd1","excerpt":"","sync_unique":"","title":"Subscription Resource Models","updates":["5a1f4cc3e4433a00121181fb"],"childrenPages":[]}

Subscription Resource Models


###Calendar Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**code** \n\n*Required*", "1-0": "**name** \n\n*Required*", "2-0": "**image** \n\n*Optional*", "0-1": "String", "1-1": "String", "2-1": "String", "0-2": "Code Identifier for the calendar", "1-2": "Display name of the calendar", "2-2": "Calendar image if available", "h-2": "Description" }, "cols": 3, "rows": 3 } [/block] ###Tag Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ###Event Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**id** \n\n*Required*", "1-0": "**name** \n\n*Required*", "2-0": "**externalId** \n\n*Optional*", "1-1": "String", "2-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "2-2": "Identifier that represents unique events to you", "h-2": "Description", "3-0": "**isExcluded** \n\n*Optional*", "3-1": "Boolean", "3-2": "Indicates that this event is excluded from the subscriber's calendar." }, "cols": 3, "rows": 4 } [/block] ### EventDetail Model [block:parameters] { "data": { "0-0": "**eventId**\n\n*Required*", "h-0": "Property", "h-1": "Type", "h-2": "Description", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event `Location` field.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events `Description` field.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "0-1": "String", "0-2": "A unique identifier for the event." }, "cols": 3, "rows": 9 } [/block] ### Error Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "h-2": "Description", "0-0": "**Code**\n\n*Always present*", "0-1": "String", "1-0": "**Reason**\n\n*Always present*", "1-1": "String", "1-2": "Explains why the error occured.", "0-2": "Represents the type of error." }, "cols": 3, "rows": 2 } [/block]
###Calendar Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**code** \n\n*Required*", "1-0": "**name** \n\n*Required*", "2-0": "**image** \n\n*Optional*", "0-1": "String", "1-1": "String", "2-1": "String", "0-2": "Code Identifier for the calendar", "1-2": "Display name of the calendar", "2-2": "Calendar image if available", "h-2": "Description" }, "cols": 3, "rows": 3 } [/block] ###Tag Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ###Event Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "0-0": "**id** \n\n*Required*", "1-0": "**name** \n\n*Required*", "2-0": "**externalId** \n\n*Optional*", "1-1": "String", "2-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "2-2": "Identifier that represents unique events to you", "h-2": "Description", "3-0": "**isExcluded** \n\n*Optional*", "3-1": "Boolean", "3-2": "Indicates that this event is excluded from the subscriber's calendar." }, "cols": 3, "rows": 4 } [/block] ### EventDetail Model [block:parameters] { "data": { "0-0": "**eventId**\n\n*Required*", "h-0": "Property", "h-1": "Type", "h-2": "Description", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event `Location` field.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events `Description` field.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "0-1": "String", "0-2": "A unique identifier for the event." }, "cols": 3, "rows": 9 } [/block] ### Error Model [block:parameters] { "data": { "h-0": "Property", "h-1": "Type", "h-2": "Description", "0-0": "**Code**\n\n*Always present*", "0-1": "String", "1-0": "**Reason**\n\n*Always present*", "1-1": "String", "1-2": "Explains why the error occured.", "0-2": "Represents the type of error." }, "cols": 3, "rows": 2 } [/block]
{"_id":"5845fa9f9faf12230009b0a9","next":{"pages":[],"description":""},"slug":"introduction-webcal-resource","type":"basic","api":{"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[]},"body":"Use the CalReply Webcal API to programatically create a calendar subscription using the Webcal protocol only. CalReply will automatically follow the Webcal path to create the subscription. Webcal is supported by iOS, Apple Calendar and Microsoft Outlook. Webcal is not supported by Google Calendar. \n\nThis API will be useful if you are wanting to create subscriptions for Webcal only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .","hidden":false,"link_external":false,"link_url":"","category":"565fc671b182df0d00d4e448","isReference":true,"project":"565fc2d2649b951900c89858","title":"Introduction","sync_unique":"","updates":[],"__v":0,"createdAt":"2016-12-05T23:39:11.867Z","excerpt":"This page will help you get started with the CalReply Webcal API","githubsync":"","order":0,"parentDoc":null,"user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","childrenPages":[]}

Introduction

This page will help you get started with the CalReply Webcal API

Use the CalReply Webcal API to programatically create a calendar subscription using the Webcal protocol only. CalReply will automatically follow the Webcal path to create the subscription. Webcal is supported by iOS, Apple Calendar and Microsoft Outlook. Webcal is not supported by Google Calendar. This API will be useful if you are wanting to create subscriptions for Webcal only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .
Use the CalReply Webcal API to programatically create a calendar subscription using the Webcal protocol only. CalReply will automatically follow the Webcal path to create the subscription. Webcal is supported by iOS, Apple Calendar and Microsoft Outlook. Webcal is not supported by Google Calendar. This API will be useful if you are wanting to create subscriptions for Webcal only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .
{"_id":"565fc69ade5dc50d00acff35","version":"565fc2d2649b951900c8985b","editedParams":true,"editedParams2":true,"excerpt":"Use the API to programatically create a calendar subscription using the Webcal protocol","link_url":"","parentDoc":null,"title":"Create New Webcal Subscription","api":{"auth":"required","examples":{"codes":[{"name":null,"code":"curl -X POST --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"calendarTags\": [\n  \t\t{\"internalId\":\"0000000-0000-0000-0000-000000000001\"},\n      {\"internalId\":\"0000000-0000-0000-0000-000000000002\"},\n      {\"externalId\":\"TeamA\"}],\n  \"TimeZoneId\": \"Eastern Standard Time\",\n  \"EmailAddress\": \"jsmith@gmail.com\",\n  \"additionalOptIn\":False,\n  \"MarketingAllowed\": false,\n  \"Referer\": \"http://m.facebook.com/\",\n  \"UserAgent\": \"AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/46.0.2490.76 Safari/537.36 [FB_IAB/FB4A;FBAV/55.0.0.18.66;]\",\n  \"ChannelFinderZipCode\": \"90210\",\n  \"ChannelFinderLineUpId\": \"USA-CA00053-DEFAULT\",\n  \"ClickId\": \"ada0c00e-835a-4638-bb38-0873478f0d38\",\n  \"SourceId\": 1,\n  \"NetworkDevice\": \"CABLE\",\n  \"ProviderName\": \"Time Warner Cable\",\n  \"ProviderLocation\": \"Beverly Hills\",\n  \"StationNum\": \"10741\",\n  \"StationName\": \"KTTV\",\n  \"UtmSource\": \"Facebook\",\n  \"UtmMedium\": \"Display\",\n  \"UtmCampaign\": \"2016\",\n  \"UtmContent\": \"Mobile_320x50\",\n  \"RequestEventIds\": [\"8e71077bc7f242b8acb9bda8f804c0d7\"],\n  \"ExternalEventIds\": [\"90712\",\"37818\"],\n  \"UserName\": \"jsmith\",\n  \"SubscriptionPlatformType\": \"apple\"\n}\" \"http://api.calreply.net/v1/webcal/{merchantCode}/{calCode}\"","language":"curl"}]},"method":"post","params":[{"_id":"565fca04bca87d0d006bc7b4","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"No default","type":"string","name":"merchantCode"},{"_id":"565fca04bca87d0d006bc7b3","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"No default","type":"string","name":"calCode"},{"_id":"565fca04bca87d0d006bc7b2","ref":"","in":"body","required":false,"desc":"The list of parameters which can be passed through when creating a new Webcal subscription. Parameters are listed in the table below.","default":"No default","type":"object","name":"calendarParams"}],"results":{"codes":[{"language":"json","code":"webcal://api.calreply.net/v1/webcal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\n \nProtected calendar response\nwebcal://calreply_username:password@api.calreply.net/v1/webcal/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\n ","name":null,"status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/webcal/:merchantCode/:calCode"},"category":"565fc671b182df0d00d4e448","link_external":false,"type":"post","slug":"webcal-create-new-subscription","sync_unique":"","body":"This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction).\n\n###calendarParams\n[block:parameters]\n{\n  \"data\": {\n    \"3-0\": \"**calendarTags** \\n\\n*Optional*\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"h-0\": \"Name\",\n    \"3-1\": \"CalendarTags[]\",\n    \"3-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.\",\n    \"6-0\": \"**externalEventIds**\\n\\n*Optional*\",\n    \"7-0\": \"**utmSource**\\n\\n*Optional*\",\n    \"11-0\": \"**userAgent**\\n\\n*Optional*\",\n    \"12-0\": \"**urlReferrer**\\n\\n*Optional*\",\n    \"13-0\": \"**ipAddress**\\n\\n*Optional*\",\n    \"14-0\": \"**events**\\n\\n*Optional*\",\n    \"15-0\": \"**NetworkDevice**\\n\\n*Optional*\",\n    \"16-0\": \"**ProviderName**\\n\\n*Optional*\",\n    \"17-0\": \"**ProviderLocation**\\n\\n*Optional*\",\n    \"18-0\": \"**StationNum**\\n\\n*Optional*\",\n    \"19-0\": \"**StationName**\\n\\n*Optional*\",\n    \"20-0\": \"\",\n    \"21-0\": \"\",\n    \"22-0\": \"\",\n    \"23-0\": \"\",\n    \"24-0\": \"\",\n    \"26-0\": \"**UserName**\\n\\n*required for protected calendars only*\",\n    \"27-0\": \"**SubscriptionPlatformType**\\n\\n*Optional*[](http://google.com) \",\n    \"6-2\": \"One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.\",\n    \"7-2\": \"Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics.  e.g. Newsletter-December.\",\n    \"11-2\": \"The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.\",\n    \"12-2\": \"Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook\",\n    \"26-2\": \"We recommend using the unique identifier that represents this user in your system. Required for protected calendars.\",\n    \"6-1\": \"String[]\",\n    \"7-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"13-2\": \"IP Address of the user. Used for monitoring and logging purposes\",\n    \"14-2\": \"You can add manual events to this subscription that belong solely to this subscription.\",\n    \"14-1\": \"EventDetails[]\",\n    \"20-2\": \"\",\n    \"20-1\": \"\",\n    \"21-2\": \"\",\n    \"22-2\": \"\",\n    \"23-2\": \"\",\n    \"26-1\": \"String\",\n    \"21-1\": \"\",\n    \"22-1\": \"String\",\n    \"23-1\": \"String\",\n    \"15-1\": \"String\",\n    \"16-1\": \"String\",\n    \"17-1\": \"String\",\n    \"18-1\": \"Integer\",\n    \"19-1\": \"String\",\n    \"24-1\": \"\",\n    \"27-1\": \"String\",\n    \"15-2\": \"The network type as used to specify the network type by the channel finder e.g. Cable\",\n    \"16-2\": \"The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.\",\n    \"17-2\": \"The location of the provider based on the specified zip code e.g. Beverly Hills\",\n    \"18-2\": \"The station number of television provider airing a specific show, as used by the channel finder.\",\n    \"19-2\": \"The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV\",\n    \"27-2\": \"Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook\",\n    \"24-2\": \"\",\n    \"25-0\": \"\",\n    \"25-1\": \"\",\n    \"25-2\": \"\",\n    \"8-0\": \"**utmMedium**\\n\\n*Optional*\",\n    \"8-1\": \"String\",\n    \"8-2\": \"Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email\",\n    \"0-0\": \"**subscriberId**\\n\\n*Optional*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.\",\n    \"1-0\": \"**emailAddress**\\n\\n*Optional*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.\",\n    \"2-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\",\n    \"4-0\": \"**timezoneId**\\n\\n*Optional*\",\n    \"4-1\": \"String\",\n    \"4-2\": \"Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\\n\\n[See Timezones](doc:timezones) for available list.\",\n    \"5-0\": \"**requestEventIds**\\n\\n*Optional*\",\n    \"5-1\": \"String[]\\n(UUID/GUID)\",\n    \"5-2\": \"An array of event identifiers. Identifiers that do not match will be ignored.\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"9-0\": \"**utmCampaign**\\n\\n*Optional*\",\n    \"9-2\": \"Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign\",\n    \"10-0\": \"**utmContent**\\n\\n*Optional*\",\n    \"10-2\": \"Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner\"\n  },\n  \"cols\": 3,\n  \"rows\": 15\n}\n[/block]\n###Protected Calendars\n\nCalReply supports the ability to mark calendars as **protected**. Calendars can be marked as protected by emailing [support@calreply.com](mailto:support@calreply.com) with a special request.\n\nProtected calendars have the following properties:\n\n  * Protected calendars are hidden and are not accessible via a public calendar URL\n  * Subscribing to a protected calendar must occur via the CalReply API\n  * Protected calendars require basic http authentication. Forcing basic authentication ensures that webcal URLs on iOS devices cannot be shared since the webcal password is masked after a user subscribes from an in-app experience.  \n\nProtected calendars require that the **calendarParams** object contains the **username** field. For iOS users, the username will appear under the Subscribe Calendar Information section, and the password will be randomly generated and masked. \n\nHere is an example:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/DpGQH52QTY638KrO3XrD_CalReply_WebAPI_2.0.pdf-(page-9-of-10).png\",\n        \"CalReply_WebAPI_2.0.pdf-(page-9-of-10).png\",\n        \"470\",\n        \"674\",\n        \"#b26660\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n**Returns**\n\nA webcal URL containing a subscriptionId as a GUID. The subscription ID is a unique subscription identifier.\n\nProtected calendars return a webcal URL containing a subscriptionId as a GUID, prefixed with the username and password required for basic http authentication. The URL for a protected calendar will contain a randomly generated **username and password** as part of the url in the format of {username}:{password}.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The webcal subscription API function should be used to add new calendar subscription on iOS devices and for Microsoft Outlook users. This function is not compatible with Google Calendar.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Recommendation\",\n  \"body\": \"It is recommended that you extract this GUID from the URL returned and store it against the users profile information in your own database.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Tip\",\n  \"body\": \"To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)\"\n}\n[/block]","createdAt":"2015-12-03T04:35:38.077Z","githubsync":"","hidden":false,"isReference":true,"next":{"description":"","pages":[]},"user":"555d323987ebf70d002aded4","__v":10,"order":1,"project":"565fc2d2649b951900c89858","updates":[],"childrenPages":[]}

postCreate New Webcal Subscription

Use the API to programatically create a calendar subscription using the Webcal protocol

Path Params

merchantCode:
required
stringNo default
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calCode:
required
stringNo default
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.

Body Params

calendarParams:
objectNo default
The list of parameters which can be passed through when creating a new Webcal subscription. Parameters are listed in the table below.
This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###calendarParams [block:parameters] { "data": { "3-0": "**calendarTags** \n\n*Optional*", "h-1": "Type", "h-2": "Description", "h-0": "Name", "3-1": "CalendarTags[]", "3-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.", "6-0": "**externalEventIds**\n\n*Optional*", "7-0": "**utmSource**\n\n*Optional*", "11-0": "**userAgent**\n\n*Optional*", "12-0": "**urlReferrer**\n\n*Optional*", "13-0": "**ipAddress**\n\n*Optional*", "14-0": "**events**\n\n*Optional*", "15-0": "**NetworkDevice**\n\n*Optional*", "16-0": "**ProviderName**\n\n*Optional*", "17-0": "**ProviderLocation**\n\n*Optional*", "18-0": "**StationNum**\n\n*Optional*", "19-0": "**StationName**\n\n*Optional*", "20-0": "", "21-0": "", "22-0": "", "23-0": "", "24-0": "", "26-0": "**UserName**\n\n*required for protected calendars only*", "27-0": "**SubscriptionPlatformType**\n\n*Optional*[](http://google.com) ", "6-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "7-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "11-2": "The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.", "12-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "26-2": "We recommend using the unique identifier that represents this user in your system. Required for protected calendars.", "6-1": "String[]", "7-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "13-2": "IP Address of the user. Used for monitoring and logging purposes", "14-2": "You can add manual events to this subscription that belong solely to this subscription.", "14-1": "EventDetails[]", "20-2": "", "20-1": "", "21-2": "", "22-2": "", "23-2": "", "26-1": "String", "21-1": "", "22-1": "String", "23-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "Integer", "19-1": "String", "24-1": "", "27-1": "String", "15-2": "The network type as used to specify the network type by the channel finder e.g. Cable", "16-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "17-2": "The location of the provider based on the specified zip code e.g. Beverly Hills", "18-2": "The station number of television provider airing a specific show, as used by the channel finder.", "19-2": "The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV", "27-2": "Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook", "24-2": "", "25-0": "", "25-1": "", "25-2": "", "8-0": "**utmMedium**\n\n*Optional*", "8-1": "String", "8-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "0-0": "**subscriberId**\n\n*Optional*", "0-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.", "1-0": "**emailAddress**\n\n*Optional*", "1-1": "String", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "4-0": "**timezoneId**\n\n*Optional*", "4-1": "String", "4-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\n[See Timezones](doc:timezones) for available list.", "5-0": "**requestEventIds**\n\n*Optional*", "5-1": "String[]\n(UUID/GUID)", "5-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "9-1": "String", "10-1": "String", "9-0": "**utmCampaign**\n\n*Optional*", "9-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "10-0": "**utmContent**\n\n*Optional*", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner" }, "cols": 3, "rows": 15 } [/block] ###Protected Calendars CalReply supports the ability to mark calendars as **protected**. Calendars can be marked as protected by emailing [support@calreply.com](mailto:support@calreply.com) with a special request. Protected calendars have the following properties: * Protected calendars are hidden and are not accessible via a public calendar URL * Subscribing to a protected calendar must occur via the CalReply API * Protected calendars require basic http authentication. Forcing basic authentication ensures that webcal URLs on iOS devices cannot be shared since the webcal password is masked after a user subscribes from an in-app experience. Protected calendars require that the **calendarParams** object contains the **username** field. For iOS users, the username will appear under the Subscribe Calendar Information section, and the password will be randomly generated and masked. Here is an example: [block:image] { "images": [ { "image": [ "https://files.readme.io/DpGQH52QTY638KrO3XrD_CalReply_WebAPI_2.0.pdf-(page-9-of-10).png", "CalReply_WebAPI_2.0.pdf-(page-9-of-10).png", "470", "674", "#b26660", "" ] } ] } [/block] **Returns** A webcal URL containing a subscriptionId as a GUID. The subscription ID is a unique subscription identifier. Protected calendars return a webcal URL containing a subscriptionId as a GUID, prefixed with the username and password required for basic http authentication. The URL for a protected calendar will contain a randomly generated **username and password** as part of the url in the format of {username}:{password}. [block:callout] { "type": "warning", "body": "The webcal subscription API function should be used to add new calendar subscription on iOS devices and for Microsoft Outlook users. This function is not compatible with Google Calendar." } [/block] [block:callout] { "type": "info", "title": "Recommendation", "body": "It is recommended that you extract this GUID from the URL returned and store it against the users profile information in your own database." } [/block] [block:callout] { "type": "info", "title": "Tip", "body": "To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)" } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###calendarParams [block:parameters] { "data": { "3-0": "**calendarTags** \n\n*Optional*", "h-1": "Type", "h-2": "Description", "h-0": "Name", "3-1": "CalendarTags[]", "3-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.", "6-0": "**externalEventIds**\n\n*Optional*", "7-0": "**utmSource**\n\n*Optional*", "11-0": "**userAgent**\n\n*Optional*", "12-0": "**urlReferrer**\n\n*Optional*", "13-0": "**ipAddress**\n\n*Optional*", "14-0": "**events**\n\n*Optional*", "15-0": "**NetworkDevice**\n\n*Optional*", "16-0": "**ProviderName**\n\n*Optional*", "17-0": "**ProviderLocation**\n\n*Optional*", "18-0": "**StationNum**\n\n*Optional*", "19-0": "**StationName**\n\n*Optional*", "20-0": "", "21-0": "", "22-0": "", "23-0": "", "24-0": "", "26-0": "**UserName**\n\n*required for protected calendars only*", "27-0": "**SubscriptionPlatformType**\n\n*Optional*[](http://google.com) ", "6-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "7-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "11-2": "The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.", "12-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "26-2": "We recommend using the unique identifier that represents this user in your system. Required for protected calendars.", "6-1": "String[]", "7-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "13-2": "IP Address of the user. Used for monitoring and logging purposes", "14-2": "You can add manual events to this subscription that belong solely to this subscription.", "14-1": "EventDetails[]", "20-2": "", "20-1": "", "21-2": "", "22-2": "", "23-2": "", "26-1": "String", "21-1": "", "22-1": "String", "23-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "Integer", "19-1": "String", "24-1": "", "27-1": "String", "15-2": "The network type as used to specify the network type by the channel finder e.g. Cable", "16-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "17-2": "The location of the provider based on the specified zip code e.g. Beverly Hills", "18-2": "The station number of television provider airing a specific show, as used by the channel finder.", "19-2": "The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV", "27-2": "Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook", "24-2": "", "25-0": "", "25-1": "", "25-2": "", "8-0": "**utmMedium**\n\n*Optional*", "8-1": "String", "8-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "0-0": "**subscriberId**\n\n*Optional*", "0-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.", "1-0": "**emailAddress**\n\n*Optional*", "1-1": "String", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "4-0": "**timezoneId**\n\n*Optional*", "4-1": "String", "4-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\n[See Timezones](doc:timezones) for available list.", "5-0": "**requestEventIds**\n\n*Optional*", "5-1": "String[]\n(UUID/GUID)", "5-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "9-1": "String", "10-1": "String", "9-0": "**utmCampaign**\n\n*Optional*", "9-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "10-0": "**utmContent**\n\n*Optional*", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner" }, "cols": 3, "rows": 15 } [/block] ###Protected Calendars CalReply supports the ability to mark calendars as **protected**. Calendars can be marked as protected by emailing [support@calreply.com](mailto:support@calreply.com) with a special request. Protected calendars have the following properties: * Protected calendars are hidden and are not accessible via a public calendar URL * Subscribing to a protected calendar must occur via the CalReply API * Protected calendars require basic http authentication. Forcing basic authentication ensures that webcal URLs on iOS devices cannot be shared since the webcal password is masked after a user subscribes from an in-app experience. Protected calendars require that the **calendarParams** object contains the **username** field. For iOS users, the username will appear under the Subscribe Calendar Information section, and the password will be randomly generated and masked. Here is an example: [block:image] { "images": [ { "image": [ "https://files.readme.io/DpGQH52QTY638KrO3XrD_CalReply_WebAPI_2.0.pdf-(page-9-of-10).png", "CalReply_WebAPI_2.0.pdf-(page-9-of-10).png", "470", "674", "#b26660", "" ] } ] } [/block] **Returns** A webcal URL containing a subscriptionId as a GUID. The subscription ID is a unique subscription identifier. Protected calendars return a webcal URL containing a subscriptionId as a GUID, prefixed with the username and password required for basic http authentication. The URL for a protected calendar will contain a randomly generated **username and password** as part of the url in the format of {username}:{password}. [block:callout] { "type": "warning", "body": "The webcal subscription API function should be used to add new calendar subscription on iOS devices and for Microsoft Outlook users. This function is not compatible with Google Calendar." } [/block] [block:callout] { "type": "info", "title": "Recommendation", "body": "It is recommended that you extract this GUID from the URL returned and store it against the users profile information in your own database." } [/block] [block:callout] { "type": "info", "title": "Tip", "body": "To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)" } [/block]
{"_id":"565fd95fbca87d0d006bc7bd","category":"565fc671b182df0d00d4e448","slug":"webcal-get-update","type":"get","version":"565fc2d2649b951900c8985b","body":"This API function is used to generate an iCalendar response in ICS format for a specific calendar subscriber by specifying the subscriberId.\n\n**Returns**\nAn iCalendar output in ICS format for this specific subscription.","isReference":true,"next":{"description":"","pages":[]},"user":"555d323987ebf70d002aded4","editedParams2":true,"excerpt":"Use the API to programatically Get Subscription Details in ICS format","githubsync":"","hidden":false,"__v":3,"createdAt":"2015-12-03T05:55:43.000Z","editedParams":true,"title":"Get Subscription","updates":[],"parentDoc":null,"project":"565fc2d2649b951900c89858","sync_unique":"","api":{"params":[{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":false,"desc":"This is a GUID and represents the unique identifier for a specific subscription. The subscriptionId is returned as part of the webcal URL in the response from the [Create New Webcal Subscription](doc:create-new-subscription) function.","default":"","type":"string","name":"subscriptionId"}],"results":{"codes":[{"name":"","code":"","language":"text","status":200},{"name":"","code":"no content","language":"text","status":400},{"name":"Response Headers","language":"text","code":"{\n  \"date\": \"Wed, 09 Dec 2015 14:23:53 GMT\",\n  \"content-type\": \"text/calendar\",\n  \"cache-control\": \"private\",\n  \"content-disposition\": \"attachment; filename=calendar.ics\",\n  \"connection\": \"keep-alive\",\n  \"content-length\": \"14175\"\n}"},{"name":"Response Body","language":"text","code":"BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//CalReply Inc//CalReply 1.0//EN\nMETHOD:REFRESH\nX-WR-CALDESC:Click the SYNC TO MY CALENDAR button to add your favorite team\n\t's schedule to your mobile calendar\\, and get tune-in reminders with broadcas\n\tt details so you never miss a game!\nX-WR-CALNAME:2015 NFL Season Calendar - Chicago Bears\nX-WR-RELCALID:50952801-fe23-e511-a14c-063521276427\nX-PUBLISH-TTL:P1D\nBEGIN:VTIMEZONE\nTZID:America/New_York\nBEGIN:STANDARD\nDTSTART:20070101T020000\nRRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU;\nTZOFFSETFROM:-0400\nTZOFFSETTO:-0500\nEND:STANDARD\nBEGIN:DAYLIGHT\nDTSTART:20070101T020000\nRRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU;\nTZOFFSETFROM:-0500\nTZOFFSETTO:-0400\nEND:DAYLIGHT\nEND:VTIMEZONE\nBEGIN:VTIMEZONE\nTZID:UTC\nBEGIN:STANDARD\nDTSTART:19800101T000000\nTZOFFSETFROM:+0000\nTZOFFSETTO:+0000\nEND:STANDARD\nEND:VTIMEZONE\nBEGIN:VEVENT\nUID:8d39bb0e-2753-4e10-b60e-053834b6dad4\nCLASS:PUBLIC\nTRANSP:TRANSPARENT\nSUMMARY:San Francisco 49ers at Chicago Bears\nDTSTART;TZID=\"America/New_York\":20151206T130000\nDTEND;TZID=\"America/New_York\":20151206T150000\nDESCRIPTION:Watch the game on demand with NFL Game Pass: https://www.nfl.co\n\tm/gamepass?icampaign=AP_Sched_packages\\n\\nRadio - WESTWOOD ONE\\n\\nHome team T\n\tickets: http://www.nfl.com/tickets/chicago-bears?icampaign=sc_tickets_schedul\n\te_header\\n\\n\\n\\nShare - http://calrep.ly/1PYwoNS\\n\\nYou may unsubscribe by fo\n\tllowing - http://calrep.ly/unsubscribe\\n\\nPowered by CalReply - http://calrep\n\t.ly/poweredby\nLOCATION:FINAL: 49ers 26 - 20 Bears\nDTSTAMP:20151209T104620Z\nLAST-MODIFIED:20151209T104620Z\nSEQUENCE:58\nBEGIN:VALARM\nACTION:DISPLAY\nDESCRIPTION:Reminder\nTRIGGER:-PT15M\nEND:VALARM\nEND:VEVENT\nBEGIN:VEVENT\nEND:VCALENDAR"}]},"settings":"","url":"/webcal/:subscriptionId","auth":"required","examples":{"codes":[{"name":"","language":"curl","code":"curl -X GET --header \"Accept: application/json\" \"http://api.calreply.net/v1/webcal/b78b79ba607b4f7a9f4aa46646f5a52e\""},{"name":"Request URL","language":"text","code":"http://api.calreply.net/v1/webcal/{subscriptionId}"}]},"method":"get"},"link_external":false,"link_url":"","order":2,"childrenPages":[]}

getGet Subscription

Use the API to programatically Get Subscription Details in ICS format

Path Params

subscriptionId:
string
This is a GUID and represents the unique identifier for a specific subscription. The subscriptionId is returned as part of the webcal URL in the response from the [Create New Webcal Subscription](doc:create-new-subscription) function.
This API function is used to generate an iCalendar response in ICS format for a specific calendar subscriber by specifying the subscriberId. **Returns** An iCalendar output in ICS format for this specific subscription.

Definition

{{ api_url }}{{ page_api_url }}

Examples



This API function is used to generate an iCalendar response in ICS format for a specific calendar subscriber by specifying the subscriberId. **Returns** An iCalendar output in ICS format for this specific subscription.
{"_id":"5902cba243050c0f00d23087","category":"565fc671b182df0d00d4e448","isReference":true,"link_url":"","project":"565fc2d2649b951900c89858","sync_unique":"","version":"565fc2d2649b951900c8985b","user":"555d323987ebf70d002aded4","__v":2,"body":"###Tag Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"**id**\\n\\n*Required*\",\n    \"1-0\": \"**name** \\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier for the calendar tag\",\n    \"1-2\": \"Display name of the tag\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n### EventDetail Model\n[block:parameters]\n{\n  \"data\": {\n    \"9-0\": \"\",\n    \"0-0\": \"**eventId**\\n\\n*Required*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"A unique identifier for the event.\",\n    \"1-0\": \"**title**\\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Summary/Title of the event.\",\n    \"2-0\": \"**description**\\n\\n*Required*\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Text that will appear in the events Description field.\",\n    \"3-0\": \"**Location**\\n\\n*Optional*\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Text that will appear in the event Location field.\",\n    \"4-0\": \"**timezone**\\n\\n*Optional*\",\n    \"4-1\": \"String\",\n    \"4-2\": \"A Windows timezone identifier. Indicates the timezone that an event occurs in.\",\n    \"5-0\": \"**start**\\n\\n*Required*\",\n    \"5-1\": \"DateTime (ISO 8601)\",\n    \"5-2\": \"Date and time the event will start in Timezone that it is occurs in.\",\n    \"6-0\": \"**end**\\n\\n*Required*\",\n    \"6-1\": \"DateTime (ISO 8601)\",\n    \"6-2\": \"Date and time the event will end in Timezone that it is occurs in.\",\n    \"7-0\": \"**allDayEvent**\\n\\n*Optional*\",\n    \"7-1\": \"Boolean\",\n    \"7-2\": \"Indicated if the event runs all day.\",\n    \"8-0\": \"**notifyBefore**\\n\\n*Optional*\",\n    \"8-1\": \"Number\",\n    \"8-2\": \"Indicates how many minutes before the event the subscriber should be notified.\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]","createdAt":"2017-04-28T04:57:06.381Z","excerpt":"","order":3,"type":"basic","hidden":false,"parentDoc":null,"slug":"webcal-resource-models","updates":[],"api":{"method":"get","results":{"codes":[{"language":"json","status":200,"name":"","code":"{\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"calendar\": {\n    \"code\": \"acmecal_1\",\n    \"name\": \"Calendar 1\",\n    \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n  },\n  \"tags\": [\n  \t\"id\": \"652c382f-09cf-4924-875a-d10873d4032d\",\n    \"name: \"All Teams\"\n  ],\n  \"timezoneId\": \"Eastern Standard Time\",\n  \"subscriptionType\": \"webcal\",\n  \"subscriberId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"emailAddress\": \"jsmith@gmail.com\",\n  \"createdAt\": \"2016-11-01 10:01:00\",\n  \"isActive\": true,\n}"},{"status":400,"name":"","code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}","language":"text"}]},"settings":"","auth":"required","params":[{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":false,"desc":"This is the subscriptionId returned from the Create New subscription API function.","default":"","type":"string","name":"subscriptionId"},{"_id":"5835120cb85f2f0f00463919","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5835120cb85f2f0f00463918","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"url":"/subscription/:subscriptionId","examples":{"codes":[{"language":"curl","code":"curl -X GET --header \"Accept: application/json\" \"https://api.calreply.net/v1/subscription/:subscriptionId\"","name":""}]}},"githubsync":"","link_external":false,"next":{"pages":[],"description":""},"title":"Webcal Resource Models","childrenPages":[]}

Webcal Resource Models


###Tag Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ### EventDetail Model [block:parameters] { "data": { "9-0": "", "0-0": "**eventId**\n\n*Required*", "0-1": "String", "0-2": "A unique identifier for the event.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events Description field.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event Location field.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "h-0": "Parameter", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 9 } [/block]
###Tag Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ### EventDetail Model [block:parameters] { "data": { "9-0": "", "0-0": "**eventId**\n\n*Required*", "0-1": "String", "0-2": "A unique identifier for the event.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events Description field.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event Location field.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "h-0": "Parameter", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 9 } [/block]
{"_id":"5845faabe055290f00c02ac8","updates":[],"next":{"description":"","pages":[]},"sync_unique":"","type":"basic","version":"565fc2d2649b951900c8985b","isReference":true,"link_external":false,"order":0,"createdAt":"2016-12-05T23:39:23.674Z","excerpt":"This page will help you get started with the CalReply Google API","githubsync":"","slug":"introduction-google-resource","title":"Introduction","api":{"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"Use the CalReply Google API to programmatically create a calendar subscription using Google calendar only. CalReply will automatically follow the Google OAuth path using the user's nominated Google account to create the subscription. \n\nThis API will be useful if you are wanting to create subscriptions for Google calendar only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .","user":"555d323987ebf70d002aded4","link_url":"","parentDoc":null,"project":"565fc2d2649b951900c89858","__v":0,"category":"583b5d5bb81ff02300127f64","hidden":false,"childrenPages":[]}

Introduction

This page will help you get started with the CalReply Google API

Use the CalReply Google API to programmatically create a calendar subscription using Google calendar only. CalReply will automatically follow the Google OAuth path using the user's nominated Google account to create the subscription. This API will be useful if you are wanting to create subscriptions for Google calendar only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .
Use the CalReply Google API to programmatically create a calendar subscription using Google calendar only. CalReply will automatically follow the Google OAuth path using the user's nominated Google account to create the subscription. This API will be useful if you are wanting to create subscriptions for Google calendar only, but there is less flexibility and limited control of the look and feel than the [Subscription API](doc:subscribe-resource-introduction) .
{"_id":"583b63a1dac28023008e6cd8","next":{"pages":[],"description":""},"type":"post","updates":[],"category":"583b5d5bb81ff02300127f64","link_external":false,"hidden":false,"link_url":"","parentDoc":null,"sync_unique":"","version":"565fc2d2649b951900c8985b","__v":5,"api":{"auth":"required","examples":{"codes":[{"name":null,"code":"curl -X POST --header \"Content-Type: application/json\" --header \"Accept: application/json\" -d \"{\n  \"calendarTags\": [\n  \t\t{\"internalId\":\"0000000-0000-0000-0000-000000000001\"},\n      {\"internalId\":\"0000000-0000-0000-0000-000000000002\"},\n      {\"externalId\":\"TeamA\"}],\n  \"TimeZoneId\": \"Eastern Standard Time\",\n  \"EmailAddress\": \"jsmith@gmail.com\",\n  \"additionalOptIn\":False,\n  \"MarketingAllowed\": false,\n  \"Referer\": \"http://m.facebook.com/\",\n  \"UserAgent\": \"Mozilla/5.0 (Linux; Android 4.4.4; SM-G360P Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.85 Mobile Safari/537.36\",\n  \"ChannelFinderZipCode\": \"90210\",\n  \"ChannelFinderLineUpId\": \"USA-CA00053-DEFAULT\",\n  \"ClickId\": \"ada0c00e-835a-4638-bb38-0873478f0d38\",\n  \"SourceId\": 1,\n  \"NetworkDevice\": \"CABLE\",\n  \"ProviderName\": \"Time Warner Cable\",\n  \"ProviderLocation\": \"Beverly Hills\",\n  \"StationNum\": \"10741\",\n  \"StationName\": \"KTTV\",\n  \"UtmSource\": \"Facebook\",\n  \"UtmMedium\": \"Display\",\n  \"UtmCampaign\": \"2016\",\n  \"UtmContent\": \"Mobile_320x50\",\n  \"RequestEventIds\": [\"8e71077bc7f242b8acb9bda8f804c0d7\"],\n  \"ExternalEventIds\": [\"90712\",\"37818\"],\n  \"UserName\": \"jsmith\"\n}\" \"http://api.calreply.net/v1/google/{merchantCode}/{calCode}\"","language":"curl"}]},"method":"post","params":[{"_id":"565fca04bca87d0d006bc7b4","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"No default","type":"string","name":"merchantCode"},{"_id":"565fca04bca87d0d006bc7b3","ref":"","in":"path","required":true,"desc":"This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.","default":"No default","type":"string","name":"calCode"},{"_id":"565fca04bca87d0d006bc7b2","ref":"","in":"body","required":false,"desc":"The list of parameters which can be passed through when creating a new Google subscription. Parameters are listed in the table below.","default":"No default","type":"object","name":"calendarParams"}],"results":{"codes":[{"status":302,"language":"json","code":"Location Header:\nhttps://accounts.google.com/o/oauth2/auth?response_typ\ne=code&client_id=xxx&redirect_uri=yyy&scope=https:%2f%\n2fwww.googleapis.com%2fauth%2fcalendar+https:%2f%2fwww\n.googleapis.com%2fauth%2fuserinfo.email&access_type=of\nfline&approval_prompt=force&state=xxx==&hl=en­AU\n \n ","name":null},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/google/:merchantCode/:calCode"},"createdAt":"2016-11-27T22:52:17.533Z","slug":"google-create-new-subscription","githubsync":"","isReference":true,"project":"565fc2d2649b951900c89858","title":"Create New Google Subscription","user":"555d323987ebf70d002aded4","body":"This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction).\n\n###calendarParams\n[block:parameters]\n{\n  \"data\": {\n    \"3-0\": \"**calendarTags** \\n\\n*Optional*\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"h-0\": \"Parameter\",\n    \"3-1\": \"CalendarTags[]\",\n    \"3-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\\n\\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.\",\n    \"6-0\": \"**externalEventIds**\\n\\n*Optional*\",\n    \"7-0\": \"**utmSource**\\n\\n*Optional*\",\n    \"11-0\": \"**userAgent**\\n\\n*Optional*\",\n    \"12-0\": \"**urlReferrer**\\n\\n*Optional*\",\n    \"13-0\": \"**ipAddress**\\n\\n*Optional*\",\n    \"14-0\": \"**events**\\n\\n*Optional*\",\n    \"15-0\": \"**redirectTo**\\n\\n*Required*\",\n    \"16-0\": \"**ProviderName**\\n\\n*Optional*\",\n    \"17-0\": \"**ProviderLocation**\\n\\n*Optional*\",\n    \"18-0\": \"**StationNum**\\n\\n*Optional*\",\n    \"19-0\": \"**StationName**\\n\\n*Optional*\",\n    \"20-0\": \"\",\n    \"21-0\": \"\",\n    \"22-0\": \"\",\n    \"23-0\": \"\",\n    \"24-0\": \"\",\n    \"26-0\": \"**UserName**\\n\\n*required for protected calendars only*\",\n    \"27-0\": \"**SubscriptionPlatformType**\\n\\n*Optional*[](http://google.com) \",\n    \"6-2\": \"One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.\",\n    \"7-2\": \"Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics.  e.g. Newsletter-December.\",\n    \"11-2\": \"The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.\",\n    \"12-2\": \"Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook\",\n    \"26-2\": \"We recommend using the unique identifier that represents this user in your system. Required for protected calendars.\",\n    \"6-1\": \"String[]\",\n    \"7-1\": \"String\",\n    \"11-1\": \"String\",\n    \"12-1\": \"String\",\n    \"13-1\": \"String\",\n    \"13-2\": \"IP Address of the user. Used for monitoring and logging purposes\",\n    \"14-2\": \"You can add manual events to this subscription that belong solely to this subscription.\",\n    \"14-1\": \"EventDetails[]\",\n    \"20-2\": \"\",\n    \"20-1\": \"\",\n    \"21-2\": \"\",\n    \"22-2\": \"\",\n    \"23-2\": \"\",\n    \"26-1\": \"String\",\n    \"21-1\": \"\",\n    \"22-1\": \"String\",\n    \"23-1\": \"String\",\n    \"15-1\": \"String\",\n    \"16-1\": \"String\",\n    \"17-1\": \"String\",\n    \"18-1\": \"Integer\",\n    \"19-1\": \"String\",\n    \"24-1\": \"\",\n    \"27-1\": \"String\",\n    \"15-2\": \"The url to redirect the user to after the subscription has been created.\",\n    \"16-2\": \"The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.\",\n    \"17-2\": \"The location of the provider based on the specified zip code e.g. Beverly Hills\",\n    \"18-2\": \"The station number of television provider airing a specific show, as used by the channel finder.\",\n    \"19-2\": \"The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV\",\n    \"27-2\": \"Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook\",\n    \"24-2\": \"\",\n    \"25-0\": \"\",\n    \"25-1\": \"\",\n    \"25-2\": \"\",\n    \"8-0\": \"**utmMedium**\\n\\n*Optional*\",\n    \"8-1\": \"String\",\n    \"8-2\": \"Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email\",\n    \"0-0\": \"**subscriberId**\\n\\n*Optional*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.\",\n    \"1-0\": \"**emailAddress**\\n\\n*Optional*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.\",\n    \"2-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\",\n    \"4-0\": \"**timezoneId**\\n\\n*Optional*\",\n    \"4-1\": \"String\",\n    \"4-2\": \"Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\\n\\n[See Timezones](doc:timezones) for available list.\",\n    \"5-0\": \"**requestEventIds**\\n\\n*Optional*\",\n    \"5-1\": \"String[]\\n(UUID/GUID)\",\n    \"5-2\": \"An array of event identifiers. Identifiers that do not match will be ignored.\",\n    \"9-1\": \"String\",\n    \"10-1\": \"String\",\n    \"9-0\": \"**utmCampaign**\\n\\n*Optional*\",\n    \"9-2\": \"Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign\",\n    \"10-0\": \"**utmContent**\\n\\n*Optional*\",\n    \"10-2\": \"Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner\"\n  },\n  \"cols\": 3,\n  \"rows\": 16\n}\n[/block]\n###Response\n\nA Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal.\n\n**New Subscription**\nBefore we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. The response will be 302 (content found) with a redirect link to Google OAuth page.\n\nAfter the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request and the result as query parameters.\n\n**Result Query Parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**success**\\n\\n*Always present*\",\n    \"0-1\": \"Boolean\",\n    \"0-2\": \"Indicates if the subscription was created successfully.\",\n    \"1-0\": \"**subscriberId**\\n\\n*Sometimes present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Identifier that represents a unique user to you given to us in initial request.\",\n    \"2-0\": \"**new**\\n\\n*Sometimes present*\",\n    \"2-1\": \"Boolean\",\n    \"2-2\": \"Indicates if it is a new subscription was created. If false an existing subscription has been updated.\",\n    \"3-0\": \"**subscriptionId**\\n\\n*Sometimes present*\",\n    \"3-1\": \"UUID/GUID\",\n    \"3-2\": \"Unique identifier of the subscription.\",\n    \"4-0\": \"**errors**\\n\\n*Sometimes present*\",\n    \"4-1\": \"Errors[]\\n(Json)\",\n    \"4-2\": \"Json serialize array of Errors\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)\",\n  \"title\": \"Tip\"\n}\n[/block]","excerpt":"Use the API to programatically create a calendar subscription using the Google Calendar","order":1,"childrenPages":[]}

postCreate New Google Subscription

Use the API to programatically create a calendar subscription using the Google Calendar

Path Params

merchantCode:
required
stringNo default
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.
calCode:
required
stringNo default
This is a unique identifier of a specific calendar in your CalReply account. It is the URL slug that appears directly after the domain. For example if your calendar URL is http://youraccount.calreply.net/my-calendar then the calCode will be `my-calendar`.

Body Params

calendarParams:
objectNo default
The list of parameters which can be passed through when creating a new Google subscription. Parameters are listed in the table below.
This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###calendarParams [block:parameters] { "data": { "3-0": "**calendarTags** \n\n*Optional*", "h-1": "Type", "h-2": "Description", "h-0": "Parameter", "3-1": "CalendarTags[]", "3-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.", "6-0": "**externalEventIds**\n\n*Optional*", "7-0": "**utmSource**\n\n*Optional*", "11-0": "**userAgent**\n\n*Optional*", "12-0": "**urlReferrer**\n\n*Optional*", "13-0": "**ipAddress**\n\n*Optional*", "14-0": "**events**\n\n*Optional*", "15-0": "**redirectTo**\n\n*Required*", "16-0": "**ProviderName**\n\n*Optional*", "17-0": "**ProviderLocation**\n\n*Optional*", "18-0": "**StationNum**\n\n*Optional*", "19-0": "**StationName**\n\n*Optional*", "20-0": "", "21-0": "", "22-0": "", "23-0": "", "24-0": "", "26-0": "**UserName**\n\n*required for protected calendars only*", "27-0": "**SubscriptionPlatformType**\n\n*Optional*[](http://google.com) ", "6-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "7-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "11-2": "The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.", "12-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "26-2": "We recommend using the unique identifier that represents this user in your system. Required for protected calendars.", "6-1": "String[]", "7-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "13-2": "IP Address of the user. Used for monitoring and logging purposes", "14-2": "You can add manual events to this subscription that belong solely to this subscription.", "14-1": "EventDetails[]", "20-2": "", "20-1": "", "21-2": "", "22-2": "", "23-2": "", "26-1": "String", "21-1": "", "22-1": "String", "23-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "Integer", "19-1": "String", "24-1": "", "27-1": "String", "15-2": "The url to redirect the user to after the subscription has been created.", "16-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "17-2": "The location of the provider based on the specified zip code e.g. Beverly Hills", "18-2": "The station number of television provider airing a specific show, as used by the channel finder.", "19-2": "The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV", "27-2": "Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook", "24-2": "", "25-0": "", "25-1": "", "25-2": "", "8-0": "**utmMedium**\n\n*Optional*", "8-1": "String", "8-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "0-0": "**subscriberId**\n\n*Optional*", "0-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.", "1-0": "**emailAddress**\n\n*Optional*", "1-1": "String", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "4-0": "**timezoneId**\n\n*Optional*", "4-1": "String", "4-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\n[See Timezones](doc:timezones) for available list.", "5-0": "**requestEventIds**\n\n*Optional*", "5-1": "String[]\n(UUID/GUID)", "5-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "9-1": "String", "10-1": "String", "9-0": "**utmCampaign**\n\n*Optional*", "9-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "10-0": "**utmContent**\n\n*Optional*", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner" }, "cols": 3, "rows": 16 } [/block] ###Response A Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal. **New Subscription** Before we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. The response will be 302 (content found) with a redirect link to Google OAuth page. After the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request and the result as query parameters. **Result Query Parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "0-1": "Boolean", "0-2": "Indicates if the subscription was created successfully.", "1-0": "**subscriberId**\n\n*Sometimes present*", "1-1": "String", "1-2": "Identifier that represents a unique user to you given to us in initial request.", "2-0": "**new**\n\n*Sometimes present*", "2-1": "Boolean", "2-2": "Indicates if it is a new subscription was created. If false an existing subscription has been updated.", "3-0": "**subscriptionId**\n\n*Sometimes present*", "3-1": "UUID/GUID", "3-2": "Unique identifier of the subscription.", "4-0": "**errors**\n\n*Sometimes present*", "4-1": "Errors[]\n(Json)", "4-2": "Json serialize array of Errors" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "body": "To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)", "title": "Tip" } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API function requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction). ###calendarParams [block:parameters] { "data": { "3-0": "**calendarTags** \n\n*Optional*", "h-1": "Type", "h-2": "Description", "h-0": "Parameter", "3-1": "CalendarTags[]", "3-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team/topic can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\n\n[See Calendar Tag Model](https://calreply-api.readme.io/docs/webcal-resource-models#section-tag-model) for complete schema.", "6-0": "**externalEventIds**\n\n*Optional*", "7-0": "**utmSource**\n\n*Optional*", "11-0": "**userAgent**\n\n*Optional*", "12-0": "**urlReferrer**\n\n*Optional*", "13-0": "**ipAddress**\n\n*Optional*", "14-0": "**events**\n\n*Optional*", "15-0": "**redirectTo**\n\n*Required*", "16-0": "**ProviderName**\n\n*Optional*", "17-0": "**ProviderLocation**\n\n*Optional*", "18-0": "**StationNum**\n\n*Optional*", "19-0": "**StationName**\n\n*Optional*", "20-0": "", "21-0": "", "22-0": "", "23-0": "", "24-0": "", "26-0": "**UserName**\n\n*required for protected calendars only*", "27-0": "**SubscriptionPlatformType**\n\n*Optional*[](http://google.com) ", "6-2": "One or more identifiers that represents unique events to you. Identifiers that do not match will be ignored.", "7-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "11-2": "The user agent string extracted from the Http header of the API request. This is used to identify the users operating system, device and other important parameters.", "12-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "26-2": "We recommend using the unique identifier that represents this user in your system. Required for protected calendars.", "6-1": "String[]", "7-1": "String", "11-1": "String", "12-1": "String", "13-1": "String", "13-2": "IP Address of the user. Used for monitoring and logging purposes", "14-2": "You can add manual events to this subscription that belong solely to this subscription.", "14-1": "EventDetails[]", "20-2": "", "20-1": "", "21-2": "", "22-2": "", "23-2": "", "26-1": "String", "21-1": "", "22-1": "String", "23-1": "String", "15-1": "String", "16-1": "String", "17-1": "String", "18-1": "Integer", "19-1": "String", "24-1": "", "27-1": "String", "15-2": "The url to redirect the user to after the subscription has been created.", "16-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "17-2": "The location of the provider based on the specified zip code e.g. Beverly Hills", "18-2": "The station number of television provider airing a specific show, as used by the channel finder.", "19-2": "The station name of the television provider airing a specific show as used by the channel finder. e.g. KTTV", "27-2": "Used to identify end-user's calendar platform to allow for platform specific formatted response. e.g. Outlook", "24-2": "", "25-0": "", "25-1": "", "25-2": "", "8-0": "**utmMedium**\n\n*Optional*", "8-1": "String", "8-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "0-0": "**subscriberId**\n\n*Optional*", "0-1": "String", "0-2": "Identifier that represents a unique user to you. E.g. email address, device id, anonymous id.", "1-0": "**emailAddress**\n\n*Optional*", "1-1": "String", "1-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "2-0": "**additionalOptIn**\n\n*Optional*", "2-1": "Boolean", "2-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "4-0": "**timezoneId**\n\n*Optional*", "4-1": "String", "4-2": "Windows timezone identifier to filter events by. If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\n\n[See Timezones](doc:timezones) for available list.", "5-0": "**requestEventIds**\n\n*Optional*", "5-1": "String[]\n(UUID/GUID)", "5-2": "An array of event identifiers. Identifiers that do not match will be ignored.", "9-1": "String", "10-1": "String", "9-0": "**utmCampaign**\n\n*Optional*", "9-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "10-0": "**utmContent**\n\n*Optional*", "10-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner" }, "cols": 3, "rows": 16 } [/block] ###Response A Google subscription initially requires the user to authorize us to have access to their Google Calendar, once this is done the flow will be essentially the same as a WebCal. **New Subscription** Before we can create the subscription, the user must be redirected to Google OAuth Consent Form, to authorize us. The response will be 302 (content found) with a redirect link to Google OAuth page. After the user has selected an option on the consent form we will redirect the user back to the caller using the redirectTo url provided in the request and the result as query parameters. **Result Query Parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**success**\n\n*Always present*", "0-1": "Boolean", "0-2": "Indicates if the subscription was created successfully.", "1-0": "**subscriberId**\n\n*Sometimes present*", "1-1": "String", "1-2": "Identifier that represents a unique user to you given to us in initial request.", "2-0": "**new**\n\n*Sometimes present*", "2-1": "Boolean", "2-2": "Indicates if it is a new subscription was created. If false an existing subscription has been updated.", "3-0": "**subscriptionId**\n\n*Sometimes present*", "3-1": "UUID/GUID", "3-2": "Unique identifier of the subscription.", "4-0": "**errors**\n\n*Sometimes present*", "4-1": "Errors[]\n(Json)", "4-2": "Json serialize array of Errors" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "body": "To deactivate subscribers please see the information in this section [Deactivate an Existing Subscription](doc:deactivate-an-existing-subscription)", "title": "Tip" } [/block]
{"_id":"5902d02043050c0f00d2308a","user":"555d323987ebf70d002aded4","api":{"settings":"","results":{"codes":[{"name":"","code":"{\n  \"subscriptionId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"calendar\": {\n    \"code\": \"acmecal_1\",\n    \"name\": \"Calendar 1\",\n    \"image\": \"//s3-us-west-1.amazonaws.com/buyreply-app-qa/Upload/2015-11/87bb3bd2-1807-4eff-95f2-bd8f6275f195_lrg.jpg\"\n  },\n  \"tags\": [\n  \t\"id\": \"652c382f-09cf-4924-875a-d10873d4032d\",\n    \"name: \"All Teams\"\n  ],\n  \"timezoneId\": \"Eastern Standard Time\",\n  \"subscriptionType\": \"webcal\",\n  \"subscriberId\": \"705dbb47-f710-4529-b5a1-776f67e0083f\",\n  \"emailAddress\": \"jsmith@gmail.com\",\n  \"createdAt\": \"2016-11-01 10:01:00\",\n  \"isActive\": true,\n}","language":"json","status":200},{"name":"","code":"{\n  \"success\": false,\n  \"statusCode\": 400,\n  \"errors\": [\n    [\"invalidParameter\",\"calendar code is required\"]\n  ]\n}","language":"text","status":400}]},"method":"get","examples":{"codes":[{"language":"curl","code":"curl -X GET --header \"Accept: application/json\" \"https://api.calreply.net/v1/subscription/:subscriptionId\"","name":""}]},"auth":"required","params":[{"_id":"565fd98b13f6680d0022df6b","ref":"","in":"path","required":false,"desc":"This is the subscriptionId returned from the Create New subscription API function.","default":"","type":"string","name":"subscriptionId"},{"_id":"5835120cb85f2f0f00463919","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5835120cb85f2f0f00463918","ref":"","in":"header","required":false,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"}],"url":"/subscription/:subscriptionId"},"hidden":false,"link_external":false,"order":2,"parentDoc":null,"project":"565fc2d2649b951900c89858","excerpt":"","slug":"google-resource-models","sync_unique":"","type":"basic","version":"565fc2d2649b951900c8985b","next":{"pages":[],"description":""},"title":"Google Resource Models","body":"###Tag Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"0-0\": \"**id**\\n\\n*Required*\",\n    \"1-0\": \"**name** \\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier for the calendar tag\",\n    \"1-2\": \"Display name of the tag\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n### EventDetail Model\n[block:parameters]\n{\n  \"data\": {\n    \"9-0\": \"\",\n    \"0-0\": \"**eventId**\\n\\n*Required*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"A unique identifier for the event.\",\n    \"1-0\": \"**title**\\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Summary/Title of the event.\",\n    \"2-0\": \"**description**\\n\\n*Required*\",\n    \"2-1\": \"String\",\n    \"2-2\": \"Text that will appear in the events Description field.\",\n    \"3-0\": \"**Location**\\n\\n*Optional*\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Text that will appear in the event Location field.\",\n    \"4-0\": \"**timezone**\\n\\n*Optional*\",\n    \"4-1\": \"String\",\n    \"4-2\": \"A Windows timezone identifier. Indicates the timezone that an event occurs in.\",\n    \"5-0\": \"**start**\\n\\n*Required*\",\n    \"5-1\": \"DateTime (ISO 8601)\",\n    \"5-2\": \"Date and time the event will start in Timezone that it is occurs in.\",\n    \"6-0\": \"**end**\\n\\n*Required*\",\n    \"6-1\": \"DateTime (ISO 8601)\",\n    \"6-2\": \"Date and time the event will end in Timezone that it is occurs in.\",\n    \"7-0\": \"**allDayEvent**\\n\\n*Optional*\",\n    \"7-1\": \"Boolean\",\n    \"7-2\": \"Indicated if the event runs all day.\",\n    \"8-0\": \"**notifyBefore**\\n\\n*Optional*\",\n    \"8-1\": \"Number\",\n    \"8-2\": \"Indicates how many minutes before the event the subscriber should be notified.\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]\n### Error Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**code**\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Error code indicating what the error was.\",\n    \"1-0\": \"**reason**\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Text explaining the error.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","category":"583b5d5bb81ff02300127f64","createdAt":"2017-04-28T05:16:16.794Z","isReference":true,"link_url":"","updates":[],"__v":2,"githubsync":"","childrenPages":[]}

Google Resource Models


###Tag Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ### EventDetail Model [block:parameters] { "data": { "9-0": "", "0-0": "**eventId**\n\n*Required*", "0-1": "String", "0-2": "A unique identifier for the event.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events Description field.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event Location field.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "h-0": "Parameter", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 9 } [/block] ### Error Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**code**", "0-1": "String", "0-2": "Error code indicating what the error was.", "1-0": "**reason**", "1-1": "String", "1-2": "Text explaining the error." }, "cols": 3, "rows": 2 } [/block]
###Tag Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "0-0": "**id**\n\n*Required*", "1-0": "**name** \n\n*Required*", "1-1": "String", "0-1": "UUID/GUID", "0-2": "Identifier for the calendar tag", "1-2": "Display name of the tag", "h-2": "Description" }, "cols": 3, "rows": 2 } [/block] ### EventDetail Model [block:parameters] { "data": { "9-0": "", "0-0": "**eventId**\n\n*Required*", "0-1": "String", "0-2": "A unique identifier for the event.", "1-0": "**title**\n\n*Required*", "1-1": "String", "1-2": "Summary/Title of the event.", "2-0": "**description**\n\n*Required*", "2-1": "String", "2-2": "Text that will appear in the events Description field.", "3-0": "**Location**\n\n*Optional*", "3-1": "String", "3-2": "Text that will appear in the event Location field.", "4-0": "**timezone**\n\n*Optional*", "4-1": "String", "4-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "5-0": "**start**\n\n*Required*", "5-1": "DateTime (ISO 8601)", "5-2": "Date and time the event will start in Timezone that it is occurs in.", "6-0": "**end**\n\n*Required*", "6-1": "DateTime (ISO 8601)", "6-2": "Date and time the event will end in Timezone that it is occurs in.", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "7-2": "Indicated if the event runs all day.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "8-2": "Indicates how many minutes before the event the subscriber should be notified.", "h-0": "Parameter", "h-1": "Type", "h-2": "Description" }, "cols": 3, "rows": 9 } [/block] ### Error Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**code**", "0-1": "String", "0-2": "Error code indicating what the error was.", "1-0": "**reason**", "1-1": "String", "1-2": "Text explaining the error." }, "cols": 3, "rows": 2 } [/block]
{"_id":"58bdfc80a36fdf0f000a332e","order":0,"title":"Introduction","body":"Webhooks let you register a URL that we will notify anytime an event happens in your account. When the event occurs—for example, when a successful subscription is created, CalReply creates an Event object. This object contains all the relevant information about the event occurrence, including the type of event and the data associated with that event. CalReply then sends the Event object to any URLs in your account's webhooks settings via an HTTP POST request.","category":"58bdfbde89730d0f00fb10ed","createdAt":"2017-03-07T00:19:12.131Z","excerpt":"This page will help you get started with CalReply Webhooks","githubsync":"","hidden":false,"type":"basic","__v":0,"link_external":false,"sync_unique":"","updates":[],"user":"555d323987ebf70d002aded4","api":{"params":[],"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required"},"isReference":false,"next":{"pages":[],"description":""},"parentDoc":null,"project":"565fc2d2649b951900c89858","link_url":"","slug":"webhooks-introduction","version":"565fc2d2649b951900c8985b","childrenPages":[]}

Introduction

This page will help you get started with CalReply Webhooks

Webhooks let you register a URL that we will notify anytime an event happens in your account. When the event occurs—for example, when a successful subscription is created, CalReply creates an Event object. This object contains all the relevant information about the event occurrence, including the type of event and the data associated with that event. CalReply then sends the Event object to any URLs in your account's webhooks settings via an HTTP POST request.
Webhooks let you register a URL that we will notify anytime an event happens in your account. When the event occurs—for example, when a successful subscription is created, CalReply creates an Event object. This object contains all the relevant information about the event occurrence, including the type of event and the data associated with that event. CalReply then sends the Event object to any URLs in your account's webhooks settings via an HTTP POST request.
{"_id":"58bdfd645106d5190076e2bd","__v":0,"body":"Webhooks are configured in the webhooks settings section of CalReply account. Clicking Add Webhook reveals a form to add a new endpoint URL for receiving webhooks as well as the type of event(s) you would like to subscribe to.\n\nYou can enter any URL you'd like to have events sent to, but this should be a dedicated page on your server, as per the instructions below. You can also choose to be notified of multiple event types, or only specific ones.\n\n**Subscription event types:**\n\n  * *Subscribe Event*- A user subscribes to a calendar\n  * *Unsubscribe Event* - A user unsubscribes from a calendar\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b73daae-Webhooks___CalReply.png\",\n        \"Webhooks___CalReply.png\",\n        772,\n        351,\n        \"#eceded\"\n      ],\n      \"sizing\": \"smart\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n**Common webhook mistakes**\n\n  * Providing the wrong URL in the Dashboard\n  * The webhook endpoint not returning a 200 status code","createdAt":"2017-03-07T00:23:00.732Z","order":1,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","auth":"required","params":[],"url":""},"link_external":false,"next":{"pages":[],"description":""},"sync_unique":"","updates":[],"excerpt":"This page will help you configure Webhooks","hidden":false,"isReference":false,"link_url":"","parentDoc":null,"slug":"configuring-webhook","title":"Configuring Webhook Settings","type":"basic","category":"58bdfbde89730d0f00fb10ed","githubsync":"","project":"565fc2d2649b951900c89858","user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","childrenPages":[]}

Configuring Webhook Settings

This page will help you configure Webhooks

Webhooks are configured in the webhooks settings section of CalReply account. Clicking Add Webhook reveals a form to add a new endpoint URL for receiving webhooks as well as the type of event(s) you would like to subscribe to. You can enter any URL you'd like to have events sent to, but this should be a dedicated page on your server, as per the instructions below. You can also choose to be notified of multiple event types, or only specific ones. **Subscription event types:** * *Subscribe Event*- A user subscribes to a calendar * *Unsubscribe Event* - A user unsubscribes from a calendar [block:image] { "images": [ { "image": [ "https://files.readme.io/b73daae-Webhooks___CalReply.png", "Webhooks___CalReply.png", 772, 351, "#eceded" ], "sizing": "smart" } ], "sidebar": true } [/block] **Common webhook mistakes** * Providing the wrong URL in the Dashboard * The webhook endpoint not returning a 200 status code
Webhooks are configured in the webhooks settings section of CalReply account. Clicking Add Webhook reveals a form to add a new endpoint URL for receiving webhooks as well as the type of event(s) you would like to subscribe to. You can enter any URL you'd like to have events sent to, but this should be a dedicated page on your server, as per the instructions below. You can also choose to be notified of multiple event types, or only specific ones. **Subscription event types:** * *Subscribe Event*- A user subscribes to a calendar * *Unsubscribe Event* - A user unsubscribes from a calendar [block:image] { "images": [ { "image": [ "https://files.readme.io/b73daae-Webhooks___CalReply.png", "Webhooks___CalReply.png", 772, 351, "#eceded" ], "sizing": "smart" } ], "sidebar": true } [/block] **Common webhook mistakes** * Providing the wrong URL in the Dashboard * The webhook endpoint not returning a 200 status code
{"_id":"58bdfddf89730d0f00fb113e","link_url":"","slug":"receiving-a-webhook-notification","type":"basic","updates":[],"hidden":false,"excerpt":"This page will help you get setup to receive Webhook notifications","githubsync":"","isReference":false,"link_external":false,"next":{"pages":[],"description":""},"order":2,"__v":0,"sync_unique":"","version":"565fc2d2649b951900c8985b","project":"565fc2d2649b951900c89858","body":"Creating a webhook endpoint on your server is no different from creating any page on your website. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.","category":"58bdfbde89730d0f00fb10ed","createdAt":"2017-03-07T00:25:03.932Z","parentDoc":null,"title":"Receiving a Webhook Notification","user":"555d323987ebf70d002aded4","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"childrenPages":[]}

Receiving a Webhook Notification

This page will help you get setup to receive Webhook notifications

Creating a webhook endpoint on your server is no different from creating any page on your website. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.
Creating a webhook endpoint on your server is no different from creating any page on your website. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.
{"_id":"58bdfe855106d5190076e2e3","title":"Responding to a Webhook","link_url":"","project":"565fc2d2649b951900c89858","version":"565fc2d2649b951900c8985b","api":{"params":[],"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required"},"body":"To acknowledge receipt of a webhook, your endpoint should return a 2xx HTTP status code. Any other information returned in the request headers or request body is ignored. All response codes outside this range, including 3xx codes, will indicate to CalReply that you did not receive the webhook. This does mean that a URL redirection or a \"Not Modified\" response will be treated as a failure.\n\nIf a webhook is not successfully received for any reason, CalReply will continue trying to send the webhook for 30 minutes with a few minutes interval between each attempt. \n\nWhen viewing a specific event information through the Dashboard, you can check how many times we've attempted to send an event to an endpoint by clicking on that endpoint URL in the Webhook details section. This will show you the latest response we received from your endpoint, along with a list of all attempted webhooks and the respective HTTP status codes we received. Any failed event can also be retried from the Dashboard after the 30 minutes have expired.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7acf6dc-Webhooks___CalReply.png\",\n        \"Webhooks___CalReply.png\",\n        766,\n        551,\n        \"#f7f7e6\"\n      ]\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","isReference":false,"next":{"pages":[],"description":""},"order":3,"parentDoc":null,"slug":"responding-to-a-webhook","sync_unique":"","excerpt":"This page will help you setup responses to Webhooks","hidden":false,"link_external":false,"type":"basic","createdAt":"2017-03-07T00:27:49.751Z","githubsync":"","updates":[],"user":"555d323987ebf70d002aded4","__v":0,"category":"58bdfbde89730d0f00fb10ed","childrenPages":[]}

Responding to a Webhook

This page will help you setup responses to Webhooks

To acknowledge receipt of a webhook, your endpoint should return a 2xx HTTP status code. Any other information returned in the request headers or request body is ignored. All response codes outside this range, including 3xx codes, will indicate to CalReply that you did not receive the webhook. This does mean that a URL redirection or a "Not Modified" response will be treated as a failure. If a webhook is not successfully received for any reason, CalReply will continue trying to send the webhook for 30 minutes with a few minutes interval between each attempt. When viewing a specific event information through the Dashboard, you can check how many times we've attempted to send an event to an endpoint by clicking on that endpoint URL in the Webhook details section. This will show you the latest response we received from your endpoint, along with a list of all attempted webhooks and the respective HTTP status codes we received. Any failed event can also be retried from the Dashboard after the 30 minutes have expired. [block:image] { "images": [ { "image": [ "https://files.readme.io/7acf6dc-Webhooks___CalReply.png", "Webhooks___CalReply.png", 766, 551, "#f7f7e6" ] } ], "sidebar": true } [/block]
To acknowledge receipt of a webhook, your endpoint should return a 2xx HTTP status code. Any other information returned in the request headers or request body is ignored. All response codes outside this range, including 3xx codes, will indicate to CalReply that you did not receive the webhook. This does mean that a URL redirection or a "Not Modified" response will be treated as a failure. If a webhook is not successfully received for any reason, CalReply will continue trying to send the webhook for 30 minutes with a few minutes interval between each attempt. When viewing a specific event information through the Dashboard, you can check how many times we've attempted to send an event to an endpoint by clicking on that endpoint URL in the Webhook details section. This will show you the latest response we received from your endpoint, along with a list of all attempted webhooks and the respective HTTP status codes we received. Any failed event can also be retried from the Dashboard after the 30 minutes have expired. [block:image] { "images": [ { "image": [ "https://files.readme.io/7acf6dc-Webhooks___CalReply.png", "Webhooks___CalReply.png", 766, 551, "#f7f7e6" ] } ], "sidebar": true } [/block]
{"_id":"58bdfeb489730d0f00fb1141","excerpt":"This page will provide you with Webhook best practices","hidden":false,"parentDoc":null,"project":"565fc2d2649b951900c89858","sync_unique":"","githubsync":"","link_url":"","next":{"pages":[],"description":""},"api":{"settings":"","auth":"required","params":[],"url":"","results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]}},"createdAt":"2017-03-07T00:28:36.661Z","isReference":false,"order":4,"title":"Best Practices","user":"555d323987ebf70d002aded4","__v":0,"body":"* Before going live, test that your webhook is working properly. You can do so by sending dummy [test events](https://calreply-api.readme.io/docs/event-object-output#section-test-event-object) from the webhooks settings pane. Please note that as these are fake, test events, they will not map to real objects in your account.  \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/dca3348-Webhooks___CalReply.png\",\n        \"Webhooks___CalReply.png\",\n        907,\n        90,\n        \"#eaeae8\"\n      ],\n      \"caption\": \"Trigger test event\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n \n  * If your webhook script performs complex logic, or makes network calls, it's possible the script would timeout before CalReply sees its complete execution. For that reason, you may want to have your webhook endpoint immediately acknowledge receipt by returning a 2xx HTTP status code, and then perform the rest of its duties.  \n  \n  * Webhook endpoints may occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you've processed, and then not processing already-logged events.","category":"58bdfbde89730d0f00fb10ed","link_external":false,"slug":"webhooks-best-practices","type":"basic","updates":[],"version":"565fc2d2649b951900c8985b","childrenPages":[]}

Best Practices

This page will provide you with Webhook best practices

* Before going live, test that your webhook is working properly. You can do so by sending dummy [test events](https://calreply-api.readme.io/docs/event-object-output#section-test-event-object) from the webhooks settings pane. Please note that as these are fake, test events, they will not map to real objects in your account. [block:image] { "images": [ { "image": [ "https://files.readme.io/dca3348-Webhooks___CalReply.png", "Webhooks___CalReply.png", 907, 90, "#eaeae8" ], "caption": "Trigger test event" } ], "sidebar": true } [/block] * If your webhook script performs complex logic, or makes network calls, it's possible the script would timeout before CalReply sees its complete execution. For that reason, you may want to have your webhook endpoint immediately acknowledge receipt by returning a 2xx HTTP status code, and then perform the rest of its duties. * Webhook endpoints may occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you've processed, and then not processing already-logged events.
* Before going live, test that your webhook is working properly. You can do so by sending dummy [test events](https://calreply-api.readme.io/docs/event-object-output#section-test-event-object) from the webhooks settings pane. Please note that as these are fake, test events, they will not map to real objects in your account. [block:image] { "images": [ { "image": [ "https://files.readme.io/dca3348-Webhooks___CalReply.png", "Webhooks___CalReply.png", 907, 90, "#eaeae8" ], "caption": "Trigger test event" } ], "sidebar": true } [/block] * If your webhook script performs complex logic, or makes network calls, it's possible the script would timeout before CalReply sees its complete execution. For that reason, you may want to have your webhook endpoint immediately acknowledge receipt by returning a 2xx HTTP status code, and then perform the rest of its duties. * Webhook endpoints may occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you've processed, and then not processing already-logged events.
{"_id":"58bf3a13d8c2820f005c3ae6","isReference":false,"link_url":"","project":"565fc2d2649b951900c89858","title":"Object Data","type":"basic","body":"## Event Object Data\n\nThe following are the event details makes up the event object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**eventId**\\n\\n*Always Present*\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier that represents a unique event.\",\n    \"1-0\": \"**eventType**\\n\\n*Always Present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Value that represents the type of event that occurred. \\nCurrently supported values are:\\n*Subscribe, Unsubscribe*\",\n    \"2-0\": \"**eventDetails**\\n\\n*Always Present*\",\n    \"2-1\": \"Object\",\n    \"2-2\": \"Details about the event that occurred, see below for more information on what is sent for each event type.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n        \\\"eventId\\\": \\\"0f1d5918-052d-4915-89a7-8cc9c4d33492\\\",   \\n        \\\"eventType\\\": \\\"Subscribe\\\"   \\n }\",\n      \"language\": \"json\",\n      \"name\": \"Event Object\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n## Subscribe Event Object\n\nThe following are the event details sent on a subscribe event. \n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" {\\n        \\\"actionType\\\": \\\"SubscriptionViaCalendarPage\\\",\\n        \\\"calendarSubscriptionId\\\": \\\"0f1d5918-052d-4915-89a7-8cc9c4d33492\\\",\\n        \\\"merchantId\\\": \\\"0b98ef2c-f739-45f1-81e3-b2def2bb868f\\\",\\n        \\\"merchantName\\\": \\\"Your Account\\\",\\n        \\\"calendarId\\\": \\\"4a2d4acb-bd05-e511-af43-067f1c947754\\\",\\n        \\\"calendarTitle\\\": \\\"My Sports Calendar\\\",\\n        \\\"subscriptionMethod\\\": \\\"Google\\\",\\n        \\\"calendarTags\\\": [\\n            {\\n                \\\"tagId\\\": \\\"6513319e-d3e1-4497-89ee-b5dcee9a58bc\\\",\\n                \\\"tagText\\\": \\\"Team G\\\"\\n            }\\n        ],\\n        \\\"timeZoneTag\\\": {\\n          \\t\\t\\t\\\"windowsName\\\": \\\"Eastern Standard Time\\\"\\n        },              \\n        \\\"createdDateTimeUtc\\\": \\\"2017-03-15 03:48:24.822495\\\",\\n        \\\"emailAddress\\\": \\\"john.smith@gmail.com\\\",\\n        \\\"additionalOptIn\\\": false,\\n        \\\"isMarketingAllowed\\\": true,\\n        \\\"remoteIpAddress\\\": \\\"150.101.114.215\\\",\\n        \\\"userAgent\\\": \\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3)     AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\\\",\\n        \\\"Referer\\\": \\\"http://google.com/\\\",\\n        \\\"enteredPostCode\\\": \\\"90210\\\",\\n        \\\"cableProvider\\\": \\\"DIRECTV\\\",\\n        \\\"cableProviderLocation\\\": \\\"New York\\\",\\n        \\\"countryCode\\\": \\\"US\\\",\\n        \\\"geoCountry\\\": \\\"United States\\\",\\n        \\\"deviceName\\\": \\\"Desktop\\\",\\n     \\t\\t\\\"utmSource\\\": \\\"Facebook\\\",\\n \\t\\t\\t  \\\"utmMedium\\\": \\\"Display\\\",\\n  \\t\\t\\t\\\"utmCampaign\\\": \\\"2017\\\",\\n \\t\\t\\t  \\\"utmContent\\\": \\\"Mobile_320x50\\\",\\n        \\\"source\\\": \\\"youraccount.calreply.net\\\"\\n }\",\n      \"language\": \"json\",\n      \"name\": \" Subscribe Event Object\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"8-0\": \"**calendarTags**\\n\\n*Sometimes Present* \",\n    \"24-0\": \"**utmSource** \\n\\n*Sometimes Present*\",\n    \"25-0\": \"**utmMedium** \\n\\n*Sometimes Present*\",\n    \"27-0\": \"**utmContent** \\n\\n*Sometimes Present*\",\n    \"8-1\": \"[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)\",\n    \"24-1\": \"String\",\n    \"25-1\": \"String\",\n    \"27-1\": \"String\",\n    \"8-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\",\n    \"24-2\": \"Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics.  e.g. Newsletter-December.\",\n    \"25-2\": \"Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email\",\n    \"27-2\": \"Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner\",\n    \"26-0\": \"**utmCampaign** \\n\\n*Sometimes Present*\",\n    \"26-1\": \"String\",\n    \"26-2\": \"Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign\",\n    \"2-0\": \"**merchantId**\\n\\n*Always Present* \",\n    \"2-1\": \"UUID/GUID\",\n    \"2-2\": \"Identifier that represents a unique CalReply account.\",\n    \"3-0\": \"**merchantName**\\n\\n*Always Present*\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Name of the CalReply account that the subscription belongs to.\",\n    \"4-0\": \"**calendarId**\\n\\n*Always Present*\",\n    \"4-1\": \"UUID/GUID\",\n    \"4-2\": \"Identifier that represents the calendar a subscription was for.\",\n    \"5-0\": \"**CalendarTitle**\\n\\n*Always Present*\",\n    \"5-1\": \"String\",\n    \"5-2\": \"The name of the calendar the user has subscribed to.\",\n    \"6-0\": \"**subscriptionMethod** \\n\\n*Sometimes Present*\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Value that represents the type of subscription created.\\nCurrently supported values:\\n*Webcal, Google, Chrome Notifications and Safari Notifications.*\",\n    \"7-0\": \"**createdDateTimeUtc**\\n\\n*Always Present*\",\n    \"7-1\": \"String\",\n    \"7-2\": \"Date and time in UTC that the subscription was created.\",\n    \"9-0\": \"**timeZoneTag**\\n\\n*Sometimes Present* \",\n    \"9-1\": \"TimeZoneTag\",\n    \"9-2\": \"Time Zone to filter events by, If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.\",\n    \"10-0\": \"**subscriberExternalId** \\n\\n*Sometimes Present* \",\n    \"10-1\": \"String\",\n    \"10-2\": \"Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id\",\n    \"11-0\": \"**emailAddress** \\n\\n*Sometimes Present*\",\n    \"11-1\": \"String\",\n    \"11-2\": \"Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.\",\n    \"13-0\": \"**isMarketingAllowed** \\n\\n*Sometimes Present*\",\n    \"13-1\": \"Boolean\",\n    \"13-2\": \"Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.\",\n    \"14-0\": \"**enteredPostCode** \\n\\n*Sometimes Present*\",\n    \"14-1\": \"String\",\n    \"14-2\": \"An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.\",\n    \"15-0\": \"**cableProvider** \\n\\n*Sometimes Present*\",\n    \"15-1\": \"String\",\n    \"15-2\": \"The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.\",\n    \"16-0\": \"**CableProviderLocation**\\n\\n*Sometimes Present*\",\n    \"16-1\": \"String\",\n    \"16-2\": \"The location of the TV provider as selected by the end-user during the subscription process.\",\n    \"17-0\": \"**remoteIpAddress**\\n\\n*Sometimes Present* \",\n    \"17-1\": \"String\",\n    \"17-2\": \"IP Address of the user. Used for monitoring and logging purposes\",\n    \"18-0\": \"**userAgent** \\n\\n*Always Present*\",\n    \"18-1\": \"String\",\n    \"18-2\": \"User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.\",\n    \"19-0\": \"**referrer** \\n\\n*Sometimes Present*\",\n    \"19-1\": \"String\",\n    \"19-2\": \"Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook\",\n    \"20-0\": \"**Country Code** \\n\\n*Sometimes Present*\",\n    \"20-1\": \"String\",\n    \"20-2\": \"The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.\",\n    \"21-0\": \"**GeoCountry** \\n\\n*Sometimes Present*\",\n    \"21-1\": \"String\",\n    \"21-2\": \"indicating the country from which the subscription was initiated.\",\n    \"22-0\": \"**Source** \\n\\n*Sometimes Present*\",\n    \"22-1\": \"String\",\n    \"22-2\": \"A consolidated view of the subscription referrer grouped at the domain level.\",\n    \"23-0\": \"** deviceName** \\n\\n*Always Present*\",\n    \"23-1\": \"String\",\n    \"23-2\": \"The device type from which the subscription was initiated.\",\n    \"0-0\": \"**calendarSubscriptionId**\\n\\n*Always Present*\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier that represents a unique user that has subscribed to a calendar.\",\n    \"1-0\": \"**actionType**\\n\\n*Always Present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Value that represents the type of subscription event that occurred.\\nCurrently supported values:\\n*Unknown, SubscriptionViaOneClickLink, SubscriptionViaSms, SubscriptionViaShowsPage, SubscriptionViaCalendarPage, SubscriptionViaWebApi, SubscriptionWithEventsViaWebApi, SubscriptionViaCalReplyNotificationPage*\",\n    \"12-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"12-1\": \"Boolean\",\n    \"12-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\"\n  },\n  \"cols\": 3,\n  \"rows\": 28\n}\n[/block]\n\n## Unsubscribe Event Object\n\nThe following are the event details sent on a unsubscribe event.\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"actionType\\\": \\\"UnsubscribeUserAction\\\",\\n    \\\"calendarSubscriptionid\\\": \\\"a3811c49-2589-4f4b-870c-b883fe0c1e17\\\",\\n    \\\"merchantId\\\": \\\"0b98ef2c-f739-45f1-81e3-b2def2bb868f\\\",\\n    \\\"merchantName\\\": \\\"Your Account\\\",\\n    \\\"calendarId\\\": \\\"4a2d4acb-bd05-e511-af43-067f1c947754\\\",\\n    \\\"calendarTitle\\\": \\\"My Sports Calendar\\\",\\n    \\\"calendarTags\\\": [\\n        {\\n            \\\"tagId\\\": \\\"6513319e-d3e1-4497-89ee-b5dcee9a58bc\\\",\\n            \\\"tagText\\\": \\\"TeamG\\\"\\n        }\\n    ],\\n  \\t\\\"timeZoneTag\\\": {\\n    \\t\\t\\t\\t\\\"windowsName\\\": \\\"Eastern Standard Time\\\"\\n        }, \\n    \\\"createdDateTimeUtc\\\": \\\"2017-03-09 23:52:28.683000\\\",\\n    \\\"emailAddress\\\": \\\"john.smith@gmail.com\\\",\\n    \\\"additionalOptIn\\\": False,\\n    \\\"isMarketingAllowed\\\": true,\\n    \\\"remoteIpAddress\\\": \\\"150.101.114.215\\\",\\n    \\\"userAgent\\\": \\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\\\",\\n    \\\"Referer\\\": \\\"http://google.com/\\\",\\n    \\\"enteredPostCode\\\": \\\"90210\\\",\\n    \\\"cableProvider\\\": \\\"DIRECTV\\\",\\n    \\\"providerLocation\\\": \\\"New York\\\",\\n    \\\"removedDateTimeUtc\\\": \\\"2017-03-09 23:57:00.607846\\\",\\n    \\\"unsubscribeResonText\\\": \\\"The events have come to an end\\\",\\n    \\\"countryCode\\\": \\\"US\\\",\\n    \\\"geoCountry\\\": \\\"United States\\\",\\n    \\\"deviceName\\\": \\\"Desktop\\\",\\n    \\\"utmSource\\\": \\\"Facebook\\\",\\n \\t  \\\"utmMedium\\\": \\\"Display\\\",\\n    \\\"utmCampaign\\\": \\\"2017\\\",\\n\\t  \\\"utmContent\\\": \\\"Mobile_320x50\\\",\\n    \\\"source\\\": \\\"youraccount.calreply.net\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Unsubscribe Event Object\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"9-0\": \"**calendarTags**\\n\\n*Sometimes Present* \",\n    \"26-0\": \"**utmSource** \\n\\n*Sometimes Present*\",\n    \"27-0\": \"**utmMedium** \\n\\n*Sometimes Present*\",\n    \"29-0\": \"**utmContent** \\n\\n*Sometimes Present*\",\n    \"9-1\": \"[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)\",\n    \"26-1\": \"String\",\n    \"27-1\": \"String\",\n    \"29-1\": \"String\",\n    \"9-2\": \"Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\\n\\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.\",\n    \"26-2\": \"Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics.  e.g. Newsletter-December.\",\n    \"27-2\": \"Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email\",\n    \"29-2\": \"Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner\",\n    \"28-0\": \"**utmCampaign** \\n\\n*Sometimes Present*\",\n    \"28-1\": \"String\",\n    \"28-2\": \"Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign\",\n    \"2-0\": \"**merchantId**\\n\\n*Always Present* \",\n    \"2-1\": \"UUID/GUID\",\n    \"2-2\": \"Identifier that represents a unique CalReply account.\",\n    \"3-0\": \"**merchantName**\\n\\n*Always Present*\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Name of the CalReply account that the subscription belongs to.\",\n    \"4-0\": \"**calendarId**\\n\\n*Always Present*\",\n    \"4-1\": \"UUID/GUID\",\n    \"4-2\": \"Identifier that represents the calendar a subscription was for.\",\n    \"5-0\": \"**CalendarTitle**\\n\\n*Always Present*\",\n    \"5-1\": \"String\",\n    \"5-2\": \"The name of the calendar the user has subscribed to.\",\n    \"6-0\": \"**subscriptionMethod** \\n\\n*Sometimes Present*\",\n    \"6-1\": \"String\",\n    \"6-2\": \"Value that represents the type of subscription created.\\nCurrently supported values:\\n*Webcal, Google, Chrome Notifications and Safari Notifications.*\",\n    \"7-0\": \"**createdDateTimeUtc**\\n\\n*Always Present*\",\n    \"7-1\": \"String\",\n    \"7-2\": \"Date and time in UTC that the subscription was created.\",\n    \"10-0\": \"**timeZoneTag**\\n\\n*Sometimes Present* \",\n    \"10-1\": \"String\",\n    \"10-2\": \"Time Zone tag used to filter events by.\",\n    \"12-0\": \"**subscriberExternalId** \\n\\n*Sometimes Present* \",\n    \"12-1\": \"String\",\n    \"12-2\": \"Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id\",\n    \"13-0\": \"**emailAddress** \\n\\n*Sometimes Present*\",\n    \"13-1\": \"String\",\n    \"13-2\": \"Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.\",\n    \"15-0\": \"**isMarketingAllowed** \\n\\n*Sometimes Present*\",\n    \"15-1\": \"Boolean\",\n    \"15-2\": \"Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.\",\n    \"16-0\": \"**enteredPostCode** \\n\\n*Sometimes Present*\",\n    \"16-1\": \"String\",\n    \"16-2\": \"An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.\",\n    \"17-0\": \"**CableProvider** \\n\\n*Sometimes Present*\",\n    \"17-1\": \"String\",\n    \"17-2\": \"The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.\",\n    \"18-0\": \"**providerLocation**\\n\\n*Sometimes Present* \",\n    \"18-1\": \"String\",\n    \"18-2\": \"The location of the TV provider as selected by the end-user during the subscription process.\",\n    \"19-0\": \"**remoteIpAddress**\\n\\n*Sometimes Present*\",\n    \"19-1\": \"String\",\n    \"19-2\": \"IP Address of the user. Used for monitoring and logging purposes\",\n    \"20-0\": \"**userAgent** \\n\\n*Always Present*\",\n    \"20-1\": \"String\",\n    \"20-2\": \"User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.\",\n    \"21-0\": \"**referrer** \\n\\n*Sometimes Present*\",\n    \"21-1\": \"String\",\n    \"21-2\": \"Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook\",\n    \"22-0\": \"**Country Code** \\n\\n*Sometimes Present*\",\n    \"22-1\": \"String\",\n    \"22-2\": \"The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.\",\n    \"23-0\": \"**GeoCountry** \\n\\n*Sometimes Present*\",\n    \"23-1\": \"String\",\n    \"23-2\": \"indicating the country from which the subscription was initiated.\",\n    \"24-0\": \"**Source** \\n\\n*Sometimes Present*\",\n    \"24-1\": \"String\",\n    \"24-2\": \"A consolidated view of the subscription referrer grouped at the domain level.\",\n    \"25-0\": \"**deviceName** \\n\\n*Always Present*\",\n    \"25-1\": \"String\",\n    \"25-2\": \"The device type from which the subscription was initiated.\",\n    \"8-0\": \"**removedDateTimeUtc**\\n\\n*Sometimes Present* \",\n    \"8-1\": \"String\",\n    \"8-2\": \"Date and time in UTC that the subscription was deactivated.\",\n    \"11-0\": \"**unsubscribeResonText**\\n\\n*Sometimes Present* \",\n    \"11-1\": \"String\",\n    \"11-2\": \"The reason as selected by the end-user for unsubscribing from a calendar.\",\n    \"0-0\": \"**actionType**\\n\\n*Always Present*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Value that represents the type of unsubscribe event that occurred.\\n\\nCurrently supported values:\\n\\n*UnsubscribeUserAction, DeactivatedById, DeactivatedByUsername, RemovedViaSafariDeviceId*\",\n    \"1-0\": \"**calendarSubscriptionId**\\n\\n*Always Present*\",\n    \"1-1\": \"UUID/GUID\",\n    \"1-2\": \"Identifier that represents a unique user that has subscribed to a calendar.\",\n    \"14-0\": \"**additionalOptIn**\\n\\n*Optional*\",\n    \"14-1\": \"Boolean\",\n    \"14-2\": \"Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.\",\n    \"30-0\": \"**requestEventIds**\\n\\n*Sometimes Present*\",\n    \"30-1\": \"String\",\n    \"30-2\": \"Comma delimited list of event identifiers that were included in the calendar subscription.\",\n    \"31-0\": \"**excludeRequestEventIds**\\n\\n*Sometimes Present*\",\n    \"31-1\": \"String\",\n    \"31-2\": \"Comma delimited list of event identifiers that were excluded from the calendar subscription.\"\n  },\n  \"cols\": 3,\n  \"rows\": 32\n}\n[/block]\n##Test Event Object\n\nThe following are the event details that will be sent for a Test event.\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**message**\\n\\n*Always Present*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"The  message always sent by the  Test Event  e.g “This is a test payload”\",\n    \"1-0\": \"**date**\\n\\n*Always Present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Date and time in UTC that the test was sent.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"message\\\":\\\"This is a test payload\\\",\\\"date\\\":\\\"2017-03-15 06:21:21.318943\\\"}\",\n      \"language\": \"json\",\n      \"name\": \"Test Event Object\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n##Calendar Tag Object\n\nThe following are the details of the Calendar Tag object.\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**tagId**\\n\\n*Always Present*\",\n    \"0-1\": \"UUID/GUID\",\n    \"0-2\": \"Identifier that represents a unique tag created for the calendar.\",\n    \"1-0\": \"**tagText**\\n\\n*Always Present*\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Text that represents the tag. When the tag is created it is given custom text. If the custom text is changed please allow 30 mins for the updated text to reflect in the webhooks payload.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"tagId\\\": \\\"6513319e-d3e1-4497-89ee-b5dcee9a58bc\\\",\\n  \\\"tagText\\\": \\\"TeamG\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Calendar Tag Object\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n##Time Zone Tag Object\n\nThe following are the details of the Time Zone Tag object.\n\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**windowsName** \\n\\n*Always Present*\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Value matches a [Windows Time Zones Name.](https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx?f=255&MSPPError=-2147217396)\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"windowsName\\\": \\\"Eastern Standard Time\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Time Zone Tag Object\"\n    }\n  ]\n}\n[/block]","category":"58bdfbde89730d0f00fb10ed","hidden":false,"user":"555d323987ebf70d002aded4","version":"565fc2d2649b951900c8985b","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","auth":"required","params":[],"url":""},"slug":"event-object-output","sync_unique":"","__v":0,"githubsync":"","parentDoc":null,"link_external":false,"next":{"pages":[],"description":""},"order":5,"updates":[],"createdAt":"2017-03-07T22:54:11.506Z","excerpt":"This page will provide you with detail about the data that makes up the object","childrenPages":[]}

Object Data

This page will provide you with detail about the data that makes up the object

## Event Object Data The following are the event details makes up the event object [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**eventId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique event.", "1-0": "**eventType**\n\n*Always Present*", "1-1": "String", "1-2": "Value that represents the type of event that occurred. \nCurrently supported values are:\n*Subscribe, Unsubscribe*", "2-0": "**eventDetails**\n\n*Always Present*", "2-1": "Object", "2-2": "Details about the event that occurred, see below for more information on what is sent for each event type." }, "cols": 3, "rows": 3 } [/block] [block:code] { "codes": [ { "code": "{\n \"eventId\": \"0f1d5918-052d-4915-89a7-8cc9c4d33492\", \n \"eventType\": \"Subscribe\" \n }", "language": "json", "name": "Event Object" } ], "sidebar": true } [/block] ## Subscribe Event Object The following are the event details sent on a subscribe event. [block:code] { "codes": [ { "code": " {\n \"actionType\": \"SubscriptionViaCalendarPage\",\n \"calendarSubscriptionId\": \"0f1d5918-052d-4915-89a7-8cc9c4d33492\",\n \"merchantId\": \"0b98ef2c-f739-45f1-81e3-b2def2bb868f\",\n \"merchantName\": \"Your Account\",\n \"calendarId\": \"4a2d4acb-bd05-e511-af43-067f1c947754\",\n \"calendarTitle\": \"My Sports Calendar\",\n \"subscriptionMethod\": \"Google\",\n \"calendarTags\": [\n {\n \"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"Team G\"\n }\n ],\n \"timeZoneTag\": {\n \t\t\t\"windowsName\": \"Eastern Standard Time\"\n }, \n \"createdDateTimeUtc\": \"2017-03-15 03:48:24.822495\",\n \"emailAddress\": \"john.smith@gmail.com\",\n \"additionalOptIn\": false,\n \"isMarketingAllowed\": true,\n \"remoteIpAddress\": \"150.101.114.215\",\n \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\n \"Referer\": \"http://google.com/\",\n \"enteredPostCode\": \"90210\",\n \"cableProvider\": \"DIRECTV\",\n \"cableProviderLocation\": \"New York\",\n \"countryCode\": \"US\",\n \"geoCountry\": \"United States\",\n \"deviceName\": \"Desktop\",\n \t\t\"utmSource\": \"Facebook\",\n \t\t\t \"utmMedium\": \"Display\",\n \t\t\t\"utmCampaign\": \"2017\",\n \t\t\t \"utmContent\": \"Mobile_320x50\",\n \"source\": \"youraccount.calreply.net\"\n }", "language": "json", "name": " Subscribe Event Object" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "8-0": "**calendarTags**\n\n*Sometimes Present* ", "24-0": "**utmSource** \n\n*Sometimes Present*", "25-0": "**utmMedium** \n\n*Sometimes Present*", "27-0": "**utmContent** \n\n*Sometimes Present*", "8-1": "[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)", "24-1": "String", "25-1": "String", "27-1": "String", "8-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.", "24-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "25-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "27-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "26-0": "**utmCampaign** \n\n*Sometimes Present*", "26-1": "String", "26-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "2-0": "**merchantId**\n\n*Always Present* ", "2-1": "UUID/GUID", "2-2": "Identifier that represents a unique CalReply account.", "3-0": "**merchantName**\n\n*Always Present*", "3-1": "String", "3-2": "Name of the CalReply account that the subscription belongs to.", "4-0": "**calendarId**\n\n*Always Present*", "4-1": "UUID/GUID", "4-2": "Identifier that represents the calendar a subscription was for.", "5-0": "**CalendarTitle**\n\n*Always Present*", "5-1": "String", "5-2": "The name of the calendar the user has subscribed to.", "6-0": "**subscriptionMethod** \n\n*Sometimes Present*", "6-1": "String", "6-2": "Value that represents the type of subscription created.\nCurrently supported values:\n*Webcal, Google, Chrome Notifications and Safari Notifications.*", "7-0": "**createdDateTimeUtc**\n\n*Always Present*", "7-1": "String", "7-2": "Date and time in UTC that the subscription was created.", "9-0": "**timeZoneTag**\n\n*Sometimes Present* ", "9-1": "TimeZoneTag", "9-2": "Time Zone to filter events by, If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.", "10-0": "**subscriberExternalId** \n\n*Sometimes Present* ", "10-1": "String", "10-2": "Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id", "11-0": "**emailAddress** \n\n*Sometimes Present*", "11-1": "String", "11-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "13-0": "**isMarketingAllowed** \n\n*Sometimes Present*", "13-1": "Boolean", "13-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "14-0": "**enteredPostCode** \n\n*Sometimes Present*", "14-1": "String", "14-2": "An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.", "15-0": "**cableProvider** \n\n*Sometimes Present*", "15-1": "String", "15-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "16-0": "**CableProviderLocation**\n\n*Sometimes Present*", "16-1": "String", "16-2": "The location of the TV provider as selected by the end-user during the subscription process.", "17-0": "**remoteIpAddress**\n\n*Sometimes Present* ", "17-1": "String", "17-2": "IP Address of the user. Used for monitoring and logging purposes", "18-0": "**userAgent** \n\n*Always Present*", "18-1": "String", "18-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.", "19-0": "**referrer** \n\n*Sometimes Present*", "19-1": "String", "19-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "20-0": "**Country Code** \n\n*Sometimes Present*", "20-1": "String", "20-2": "The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.", "21-0": "**GeoCountry** \n\n*Sometimes Present*", "21-1": "String", "21-2": "indicating the country from which the subscription was initiated.", "22-0": "**Source** \n\n*Sometimes Present*", "22-1": "String", "22-2": "A consolidated view of the subscription referrer grouped at the domain level.", "23-0": "** deviceName** \n\n*Always Present*", "23-1": "String", "23-2": "The device type from which the subscription was initiated.", "0-0": "**calendarSubscriptionId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique user that has subscribed to a calendar.", "1-0": "**actionType**\n\n*Always Present*", "1-1": "String", "1-2": "Value that represents the type of subscription event that occurred.\nCurrently supported values:\n*Unknown, SubscriptionViaOneClickLink, SubscriptionViaSms, SubscriptionViaShowsPage, SubscriptionViaCalendarPage, SubscriptionViaWebApi, SubscriptionWithEventsViaWebApi, SubscriptionViaCalReplyNotificationPage*", "12-0": "**additionalOptIn**\n\n*Optional*", "12-1": "Boolean", "12-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox." }, "cols": 3, "rows": 28 } [/block] ## Unsubscribe Event Object The following are the event details sent on a unsubscribe event. [block:code] { "codes": [ { "code": "{\n \"actionType\": \"UnsubscribeUserAction\",\n \"calendarSubscriptionid\": \"a3811c49-2589-4f4b-870c-b883fe0c1e17\",\n \"merchantId\": \"0b98ef2c-f739-45f1-81e3-b2def2bb868f\",\n \"merchantName\": \"Your Account\",\n \"calendarId\": \"4a2d4acb-bd05-e511-af43-067f1c947754\",\n \"calendarTitle\": \"My Sports Calendar\",\n \"calendarTags\": [\n {\n \"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"TeamG\"\n }\n ],\n \t\"timeZoneTag\": {\n \t\t\t\t\"windowsName\": \"Eastern Standard Time\"\n }, \n \"createdDateTimeUtc\": \"2017-03-09 23:52:28.683000\",\n \"emailAddress\": \"john.smith@gmail.com\",\n \"additionalOptIn\": False,\n \"isMarketingAllowed\": true,\n \"remoteIpAddress\": \"150.101.114.215\",\n \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\n \"Referer\": \"http://google.com/\",\n \"enteredPostCode\": \"90210\",\n \"cableProvider\": \"DIRECTV\",\n \"providerLocation\": \"New York\",\n \"removedDateTimeUtc\": \"2017-03-09 23:57:00.607846\",\n \"unsubscribeResonText\": \"The events have come to an end\",\n \"countryCode\": \"US\",\n \"geoCountry\": \"United States\",\n \"deviceName\": \"Desktop\",\n \"utmSource\": \"Facebook\",\n \t \"utmMedium\": \"Display\",\n \"utmCampaign\": \"2017\",\n\t \"utmContent\": \"Mobile_320x50\",\n \"source\": \"youraccount.calreply.net\"\n}", "language": "json", "name": "Unsubscribe Event Object" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "9-0": "**calendarTags**\n\n*Sometimes Present* ", "26-0": "**utmSource** \n\n*Sometimes Present*", "27-0": "**utmMedium** \n\n*Sometimes Present*", "29-0": "**utmContent** \n\n*Sometimes Present*", "9-1": "[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)", "26-1": "String", "27-1": "String", "29-1": "String", "9-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.", "26-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "27-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "29-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "28-0": "**utmCampaign** \n\n*Sometimes Present*", "28-1": "String", "28-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "2-0": "**merchantId**\n\n*Always Present* ", "2-1": "UUID/GUID", "2-2": "Identifier that represents a unique CalReply account.", "3-0": "**merchantName**\n\n*Always Present*", "3-1": "String", "3-2": "Name of the CalReply account that the subscription belongs to.", "4-0": "**calendarId**\n\n*Always Present*", "4-1": "UUID/GUID", "4-2": "Identifier that represents the calendar a subscription was for.", "5-0": "**CalendarTitle**\n\n*Always Present*", "5-1": "String", "5-2": "The name of the calendar the user has subscribed to.", "6-0": "**subscriptionMethod** \n\n*Sometimes Present*", "6-1": "String", "6-2": "Value that represents the type of subscription created.\nCurrently supported values:\n*Webcal, Google, Chrome Notifications and Safari Notifications.*", "7-0": "**createdDateTimeUtc**\n\n*Always Present*", "7-1": "String", "7-2": "Date and time in UTC that the subscription was created.", "10-0": "**timeZoneTag**\n\n*Sometimes Present* ", "10-1": "String", "10-2": "Time Zone tag used to filter events by.", "12-0": "**subscriberExternalId** \n\n*Sometimes Present* ", "12-1": "String", "12-2": "Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id", "13-0": "**emailAddress** \n\n*Sometimes Present*", "13-1": "String", "13-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "15-0": "**isMarketingAllowed** \n\n*Sometimes Present*", "15-1": "Boolean", "15-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "16-0": "**enteredPostCode** \n\n*Sometimes Present*", "16-1": "String", "16-2": "An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.", "17-0": "**CableProvider** \n\n*Sometimes Present*", "17-1": "String", "17-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "18-0": "**providerLocation**\n\n*Sometimes Present* ", "18-1": "String", "18-2": "The location of the TV provider as selected by the end-user during the subscription process.", "19-0": "**remoteIpAddress**\n\n*Sometimes Present*", "19-1": "String", "19-2": "IP Address of the user. Used for monitoring and logging purposes", "20-0": "**userAgent** \n\n*Always Present*", "20-1": "String", "20-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.", "21-0": "**referrer** \n\n*Sometimes Present*", "21-1": "String", "21-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "22-0": "**Country Code** \n\n*Sometimes Present*", "22-1": "String", "22-2": "The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.", "23-0": "**GeoCountry** \n\n*Sometimes Present*", "23-1": "String", "23-2": "indicating the country from which the subscription was initiated.", "24-0": "**Source** \n\n*Sometimes Present*", "24-1": "String", "24-2": "A consolidated view of the subscription referrer grouped at the domain level.", "25-0": "**deviceName** \n\n*Always Present*", "25-1": "String", "25-2": "The device type from which the subscription was initiated.", "8-0": "**removedDateTimeUtc**\n\n*Sometimes Present* ", "8-1": "String", "8-2": "Date and time in UTC that the subscription was deactivated.", "11-0": "**unsubscribeResonText**\n\n*Sometimes Present* ", "11-1": "String", "11-2": "The reason as selected by the end-user for unsubscribing from a calendar.", "0-0": "**actionType**\n\n*Always Present*", "0-1": "String", "0-2": "Value that represents the type of unsubscribe event that occurred.\n\nCurrently supported values:\n\n*UnsubscribeUserAction, DeactivatedById, DeactivatedByUsername, RemovedViaSafariDeviceId*", "1-0": "**calendarSubscriptionId**\n\n*Always Present*", "1-1": "UUID/GUID", "1-2": "Identifier that represents a unique user that has subscribed to a calendar.", "14-0": "**additionalOptIn**\n\n*Optional*", "14-1": "Boolean", "14-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "30-0": "**requestEventIds**\n\n*Sometimes Present*", "30-1": "String", "30-2": "Comma delimited list of event identifiers that were included in the calendar subscription.", "31-0": "**excludeRequestEventIds**\n\n*Sometimes Present*", "31-1": "String", "31-2": "Comma delimited list of event identifiers that were excluded from the calendar subscription." }, "cols": 3, "rows": 32 } [/block] ##Test Event Object The following are the event details that will be sent for a Test event. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**message**\n\n*Always Present*", "0-1": "String", "0-2": "The message always sent by the Test Event e.g “This is a test payload”", "1-0": "**date**\n\n*Always Present*", "1-1": "String", "1-2": "Date and time in UTC that the test was sent." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "{\"message\":\"This is a test payload\",\"date\":\"2017-03-15 06:21:21.318943\"}", "language": "json", "name": "Test Event Object" } ], "sidebar": true } [/block] ##Calendar Tag Object The following are the details of the Calendar Tag object. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**tagId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique tag created for the calendar.", "1-0": "**tagText**\n\n*Always Present*", "1-1": "String", "1-2": "Text that represents the tag. When the tag is created it is given custom text. If the custom text is changed please allow 30 mins for the updated text to reflect in the webhooks payload." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "{\n\t\"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"TeamG\"\n}", "language": "json", "name": "Calendar Tag Object" } ], "sidebar": true } [/block] ##Time Zone Tag Object The following are the details of the Time Zone Tag object. [block:parameters] { "data": { "0-0": "**windowsName** \n\n*Always Present*", "0-1": "String", "0-2": "Value matches a [Windows Time Zones Name.](https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx?f=255&MSPPError=-2147217396)" }, "cols": 3, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "{\n\t\"windowsName\": \"Eastern Standard Time\"\n}", "language": "json", "name": "Time Zone Tag Object" } ] } [/block]
## Event Object Data The following are the event details makes up the event object [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**eventId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique event.", "1-0": "**eventType**\n\n*Always Present*", "1-1": "String", "1-2": "Value that represents the type of event that occurred. \nCurrently supported values are:\n*Subscribe, Unsubscribe*", "2-0": "**eventDetails**\n\n*Always Present*", "2-1": "Object", "2-2": "Details about the event that occurred, see below for more information on what is sent for each event type." }, "cols": 3, "rows": 3 } [/block] [block:code] { "codes": [ { "code": "{\n \"eventId\": \"0f1d5918-052d-4915-89a7-8cc9c4d33492\", \n \"eventType\": \"Subscribe\" \n }", "language": "json", "name": "Event Object" } ], "sidebar": true } [/block] ## Subscribe Event Object The following are the event details sent on a subscribe event. [block:code] { "codes": [ { "code": " {\n \"actionType\": \"SubscriptionViaCalendarPage\",\n \"calendarSubscriptionId\": \"0f1d5918-052d-4915-89a7-8cc9c4d33492\",\n \"merchantId\": \"0b98ef2c-f739-45f1-81e3-b2def2bb868f\",\n \"merchantName\": \"Your Account\",\n \"calendarId\": \"4a2d4acb-bd05-e511-af43-067f1c947754\",\n \"calendarTitle\": \"My Sports Calendar\",\n \"subscriptionMethod\": \"Google\",\n \"calendarTags\": [\n {\n \"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"Team G\"\n }\n ],\n \"timeZoneTag\": {\n \t\t\t\"windowsName\": \"Eastern Standard Time\"\n }, \n \"createdDateTimeUtc\": \"2017-03-15 03:48:24.822495\",\n \"emailAddress\": \"john.smith@gmail.com\",\n \"additionalOptIn\": false,\n \"isMarketingAllowed\": true,\n \"remoteIpAddress\": \"150.101.114.215\",\n \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\n \"Referer\": \"http://google.com/\",\n \"enteredPostCode\": \"90210\",\n \"cableProvider\": \"DIRECTV\",\n \"cableProviderLocation\": \"New York\",\n \"countryCode\": \"US\",\n \"geoCountry\": \"United States\",\n \"deviceName\": \"Desktop\",\n \t\t\"utmSource\": \"Facebook\",\n \t\t\t \"utmMedium\": \"Display\",\n \t\t\t\"utmCampaign\": \"2017\",\n \t\t\t \"utmContent\": \"Mobile_320x50\",\n \"source\": \"youraccount.calreply.net\"\n }", "language": "json", "name": " Subscribe Event Object" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "8-0": "**calendarTags**\n\n*Sometimes Present* ", "24-0": "**utmSource** \n\n*Sometimes Present*", "25-0": "**utmMedium** \n\n*Sometimes Present*", "27-0": "**utmContent** \n\n*Sometimes Present*", "8-1": "[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)", "24-1": "String", "25-1": "String", "27-1": "String", "8-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.", "24-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "25-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "27-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "26-0": "**utmCampaign** \n\n*Sometimes Present*", "26-1": "String", "26-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "2-0": "**merchantId**\n\n*Always Present* ", "2-1": "UUID/GUID", "2-2": "Identifier that represents a unique CalReply account.", "3-0": "**merchantName**\n\n*Always Present*", "3-1": "String", "3-2": "Name of the CalReply account that the subscription belongs to.", "4-0": "**calendarId**\n\n*Always Present*", "4-1": "UUID/GUID", "4-2": "Identifier that represents the calendar a subscription was for.", "5-0": "**CalendarTitle**\n\n*Always Present*", "5-1": "String", "5-2": "The name of the calendar the user has subscribed to.", "6-0": "**subscriptionMethod** \n\n*Sometimes Present*", "6-1": "String", "6-2": "Value that represents the type of subscription created.\nCurrently supported values:\n*Webcal, Google, Chrome Notifications and Safari Notifications.*", "7-0": "**createdDateTimeUtc**\n\n*Always Present*", "7-1": "String", "7-2": "Date and time in UTC that the subscription was created.", "9-0": "**timeZoneTag**\n\n*Sometimes Present* ", "9-1": "TimeZoneTag", "9-2": "Time Zone to filter events by, If used, the subscription will include events that are tagged with this time zone and any events that are not tagged with a time zone.", "10-0": "**subscriberExternalId** \n\n*Sometimes Present* ", "10-1": "String", "10-2": "Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id", "11-0": "**emailAddress** \n\n*Sometimes Present*", "11-1": "String", "11-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "13-0": "**isMarketingAllowed** \n\n*Sometimes Present*", "13-1": "Boolean", "13-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "14-0": "**enteredPostCode** \n\n*Sometimes Present*", "14-1": "String", "14-2": "An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.", "15-0": "**cableProvider** \n\n*Sometimes Present*", "15-1": "String", "15-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "16-0": "**CableProviderLocation**\n\n*Sometimes Present*", "16-1": "String", "16-2": "The location of the TV provider as selected by the end-user during the subscription process.", "17-0": "**remoteIpAddress**\n\n*Sometimes Present* ", "17-1": "String", "17-2": "IP Address of the user. Used for monitoring and logging purposes", "18-0": "**userAgent** \n\n*Always Present*", "18-1": "String", "18-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.", "19-0": "**referrer** \n\n*Sometimes Present*", "19-1": "String", "19-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "20-0": "**Country Code** \n\n*Sometimes Present*", "20-1": "String", "20-2": "The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.", "21-0": "**GeoCountry** \n\n*Sometimes Present*", "21-1": "String", "21-2": "indicating the country from which the subscription was initiated.", "22-0": "**Source** \n\n*Sometimes Present*", "22-1": "String", "22-2": "A consolidated view of the subscription referrer grouped at the domain level.", "23-0": "** deviceName** \n\n*Always Present*", "23-1": "String", "23-2": "The device type from which the subscription was initiated.", "0-0": "**calendarSubscriptionId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique user that has subscribed to a calendar.", "1-0": "**actionType**\n\n*Always Present*", "1-1": "String", "1-2": "Value that represents the type of subscription event that occurred.\nCurrently supported values:\n*Unknown, SubscriptionViaOneClickLink, SubscriptionViaSms, SubscriptionViaShowsPage, SubscriptionViaCalendarPage, SubscriptionViaWebApi, SubscriptionWithEventsViaWebApi, SubscriptionViaCalReplyNotificationPage*", "12-0": "**additionalOptIn**\n\n*Optional*", "12-1": "Boolean", "12-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox." }, "cols": 3, "rows": 28 } [/block] ## Unsubscribe Event Object The following are the event details sent on a unsubscribe event. [block:code] { "codes": [ { "code": "{\n \"actionType\": \"UnsubscribeUserAction\",\n \"calendarSubscriptionid\": \"a3811c49-2589-4f4b-870c-b883fe0c1e17\",\n \"merchantId\": \"0b98ef2c-f739-45f1-81e3-b2def2bb868f\",\n \"merchantName\": \"Your Account\",\n \"calendarId\": \"4a2d4acb-bd05-e511-af43-067f1c947754\",\n \"calendarTitle\": \"My Sports Calendar\",\n \"calendarTags\": [\n {\n \"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"TeamG\"\n }\n ],\n \t\"timeZoneTag\": {\n \t\t\t\t\"windowsName\": \"Eastern Standard Time\"\n }, \n \"createdDateTimeUtc\": \"2017-03-09 23:52:28.683000\",\n \"emailAddress\": \"john.smith@gmail.com\",\n \"additionalOptIn\": False,\n \"isMarketingAllowed\": true,\n \"remoteIpAddress\": \"150.101.114.215\",\n \"userAgent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36\",\n \"Referer\": \"http://google.com/\",\n \"enteredPostCode\": \"90210\",\n \"cableProvider\": \"DIRECTV\",\n \"providerLocation\": \"New York\",\n \"removedDateTimeUtc\": \"2017-03-09 23:57:00.607846\",\n \"unsubscribeResonText\": \"The events have come to an end\",\n \"countryCode\": \"US\",\n \"geoCountry\": \"United States\",\n \"deviceName\": \"Desktop\",\n \"utmSource\": \"Facebook\",\n \t \"utmMedium\": \"Display\",\n \"utmCampaign\": \"2017\",\n\t \"utmContent\": \"Mobile_320x50\",\n \"source\": \"youraccount.calreply.net\"\n}", "language": "json", "name": "Unsubscribe Event Object" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "9-0": "**calendarTags**\n\n*Sometimes Present* ", "26-0": "**utmSource** \n\n*Sometimes Present*", "27-0": "**utmMedium** \n\n*Sometimes Present*", "29-0": "**utmContent** \n\n*Sometimes Present*", "9-1": "[CalendarTags[] ](https://calreply-api.readme.io/docs/event-object-output#section-calendar-tag-object)", "26-1": "String", "27-1": "String", "29-1": "String", "9-2": "Array of calendar tags to filter events by. Tags are used to group similar events. For example all events that belong to the same sporting team can be tagged with a team name.\n\nWhen a tagId is used, the subscription will only include events tagged with the selected tag.", "26-2": "Value used to identify the referring subscriber Source. This is used as the UTM Source in Dashboard Analytics. e.g. Newsletter-December.", "27-2": "Value used to identify the referring subscriber Medium. This is used as the UTM Source in Dashboard Analytics. e.g. Email", "29-2": "Value used to identify the referring subscriber Content. Used for Dashboard Analytics. in Dashboard Analytics. e.g. 400x300 banner", "28-0": "**utmCampaign** \n\n*Sometimes Present*", "28-1": "String", "28-2": "Value used to identify the referring subscriber Campaign. in Dashboard Analytics. e.g. Summer Campaign", "2-0": "**merchantId**\n\n*Always Present* ", "2-1": "UUID/GUID", "2-2": "Identifier that represents a unique CalReply account.", "3-0": "**merchantName**\n\n*Always Present*", "3-1": "String", "3-2": "Name of the CalReply account that the subscription belongs to.", "4-0": "**calendarId**\n\n*Always Present*", "4-1": "UUID/GUID", "4-2": "Identifier that represents the calendar a subscription was for.", "5-0": "**CalendarTitle**\n\n*Always Present*", "5-1": "String", "5-2": "The name of the calendar the user has subscribed to.", "6-0": "**subscriptionMethod** \n\n*Sometimes Present*", "6-1": "String", "6-2": "Value that represents the type of subscription created.\nCurrently supported values:\n*Webcal, Google, Chrome Notifications and Safari Notifications.*", "7-0": "**createdDateTimeUtc**\n\n*Always Present*", "7-1": "String", "7-2": "Date and time in UTC that the subscription was created.", "10-0": "**timeZoneTag**\n\n*Sometimes Present* ", "10-1": "String", "10-2": "Time Zone tag used to filter events by.", "12-0": "**subscriberExternalId** \n\n*Sometimes Present* ", "12-1": "String", "12-2": "Identifier that represents the subscriber for the account, as received from a 3rd party system. E.g. email address, device id, anonymous id", "13-0": "**emailAddress** \n\n*Sometimes Present*", "13-1": "String", "13-2": "Email address linked to the subscription. CalReply allows you to capture the the email address of a subscriber so that you can market to the subscriber at a later date.", "15-0": "**isMarketingAllowed** \n\n*Sometimes Present*", "15-1": "Boolean", "15-2": "Marketing opt-in allows the subscriber to specify if they give permission for their email address to be used for marketing purposes.", "16-0": "**enteredPostCode** \n\n*Sometimes Present*", "16-1": "String", "16-2": "An optional field for calendars that utilise channel ID. This is a US Zip Code or Canadian Postal Code.", "17-0": "**CableProvider** \n\n*Sometimes Present*", "17-1": "String", "17-2": "The name of the TV provider as selected by the end-user during the subscription process. This is based on available providers in a specified zip code.", "18-0": "**providerLocation**\n\n*Sometimes Present* ", "18-1": "String", "18-2": "The location of the TV provider as selected by the end-user during the subscription process.", "19-0": "**remoteIpAddress**\n\n*Sometimes Present*", "19-1": "String", "19-2": "IP Address of the user. Used for monitoring and logging purposes", "20-0": "**userAgent** \n\n*Always Present*", "20-1": "String", "20-2": "User agent of the user. This is required to determine the if it should be a WebCal or Google subscription. The user agent string extracted from the http header of the API request. This is used to identify the users operating system, device and other important parameters.", "21-0": "**referrer** \n\n*Sometimes Present*", "21-1": "String", "21-2": "Url referrer of the user. Used for Dashboard Analytics. The place from which the subscriber navigated to the calendar page. e.g. Facebook", "22-0": "**Country Code** \n\n*Sometimes Present*", "22-1": "String", "22-2": "The country code indicating the country from which the subscription was initiated, in format: ISO Alpha-2.", "23-0": "**GeoCountry** \n\n*Sometimes Present*", "23-1": "String", "23-2": "indicating the country from which the subscription was initiated.", "24-0": "**Source** \n\n*Sometimes Present*", "24-1": "String", "24-2": "A consolidated view of the subscription referrer grouped at the domain level.", "25-0": "**deviceName** \n\n*Always Present*", "25-1": "String", "25-2": "The device type from which the subscription was initiated.", "8-0": "**removedDateTimeUtc**\n\n*Sometimes Present* ", "8-1": "String", "8-2": "Date and time in UTC that the subscription was deactivated.", "11-0": "**unsubscribeResonText**\n\n*Sometimes Present* ", "11-1": "String", "11-2": "The reason as selected by the end-user for unsubscribing from a calendar.", "0-0": "**actionType**\n\n*Always Present*", "0-1": "String", "0-2": "Value that represents the type of unsubscribe event that occurred.\n\nCurrently supported values:\n\n*UnsubscribeUserAction, DeactivatedById, DeactivatedByUsername, RemovedViaSafariDeviceId*", "1-0": "**calendarSubscriptionId**\n\n*Always Present*", "1-1": "UUID/GUID", "1-2": "Identifier that represents a unique user that has subscribed to a calendar.", "14-0": "**additionalOptIn**\n\n*Optional*", "14-1": "Boolean", "14-2": "Additional opt-in allows the subscriber to specify if they are opting-in to the question/statement as defined by the copy associated with the checkbox.", "30-0": "**requestEventIds**\n\n*Sometimes Present*", "30-1": "String", "30-2": "Comma delimited list of event identifiers that were included in the calendar subscription.", "31-0": "**excludeRequestEventIds**\n\n*Sometimes Present*", "31-1": "String", "31-2": "Comma delimited list of event identifiers that were excluded from the calendar subscription." }, "cols": 3, "rows": 32 } [/block] ##Test Event Object The following are the event details that will be sent for a Test event. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**message**\n\n*Always Present*", "0-1": "String", "0-2": "The message always sent by the Test Event e.g “This is a test payload”", "1-0": "**date**\n\n*Always Present*", "1-1": "String", "1-2": "Date and time in UTC that the test was sent." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "{\"message\":\"This is a test payload\",\"date\":\"2017-03-15 06:21:21.318943\"}", "language": "json", "name": "Test Event Object" } ], "sidebar": true } [/block] ##Calendar Tag Object The following are the details of the Calendar Tag object. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**tagId**\n\n*Always Present*", "0-1": "UUID/GUID", "0-2": "Identifier that represents a unique tag created for the calendar.", "1-0": "**tagText**\n\n*Always Present*", "1-1": "String", "1-2": "Text that represents the tag. When the tag is created it is given custom text. If the custom text is changed please allow 30 mins for the updated text to reflect in the webhooks payload." }, "cols": 3, "rows": 2 } [/block] [block:code] { "codes": [ { "code": "{\n\t\"tagId\": \"6513319e-d3e1-4497-89ee-b5dcee9a58bc\",\n \"tagText\": \"TeamG\"\n}", "language": "json", "name": "Calendar Tag Object" } ], "sidebar": true } [/block] ##Time Zone Tag Object The following are the details of the Time Zone Tag object. [block:parameters] { "data": { "0-0": "**windowsName** \n\n*Always Present*", "0-1": "String", "0-2": "Value matches a [Windows Time Zones Name.](https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx?f=255&MSPPError=-2147217396)" }, "cols": 3, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "{\n\t\"windowsName\": \"Eastern Standard Time\"\n}", "language": "json", "name": "Time Zone Tag Object" } ] } [/block]
{"_id":"58351c57501f060f001f53e6","sync_unique":"","user":"555d323987ebf70d002aded4","githubsync":"","next":{"pages":[],"description":""},"excerpt":"","hidden":false,"parentDoc":null,"slug":"timezones","type":"basic","category":"58351c40b4e4250f00c9ddf0","link_external":false,"link_url":"","order":0,"project":"565fc2d2649b951900c89858","updates":[],"version":"565fc2d2649b951900c8985b","api":{"params":[],"url":"","results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","auth":"required"},"createdAt":"2016-11-23T04:34:31.445Z","isReference":false,"title":"Timezones","__v":0,"body":"Use the table below to identify the Timezone id's used by the CalReply API\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Id\",\n    \"h-1\": \"DisplayName\",\n    \"h-2\": \"BaseUtcOffset\",\n    \"0-0\": \"Dateline Standard Time\",\n    \"0-1\": \"(UTC-12:00) International Date Line West\",\n    \"0-2\": \"-12:00:00\",\n    \"h-3\": \"BaseUtcOffset\",\n    \"0-3\": \"-12:00:00\",\n    \"1-0\": \"UTC-11\",\n    \"2-0\": \"Hawaiian Standard Time\",\n    \"17-0\": \"Venezuela Standard Time\",\n    \"1-1\": \"(UTC-11:00) Coordinated Universal Time-11\",\n    \"1-2\": \"-11:00:00\",\n    \"2-1\": \"(UTC-10:00) Hawaii\",\n    \"2-2\": \"-10:00:00\",\n    \"3-0\": \"Alaskan Standard Time\",\n    \"3-1\": \"(UTC-09:00) Alaska\",\n    \"3-2\": \"-09:00:00\",\n    \"4-0\": \"Pacific Standard Time (Mexico)\",\n    \"4-1\": \"(UTC-08:00) Baja California\",\n    \"4-2\": \"-08:00:00\",\n    \"5-0\": \"Pacific Standard Time\",\n    \"5-1\": \"(UTC-08:00) Pacific Time (US & Canada)\",\n    \"5-2\": \"-08:00:00\",\n    \"6-0\": \"US Mountain Standard Time\",\n    \"6-1\": \"(UTC-07:00) Arizona\",\n    \"6-2\": \"-07:00:00\",\n    \"7-0\": \"Mountain Standard Time (Mexico)\",\n    \"7-1\": \"(UTC-07:00) Chihuahua, La Paz, Mazatlan\",\n    \"7-2\": \"-07:00:00\",\n    \"8-0\": \"Mountain Standard Time\",\n    \"8-1\": \"(UTC-07:00) Mountain Time (US & Canada)\",\n    \"8-2\": \"-07:00:00\",\n    \"9-0\": \"Central America Standard Time\",\n    \"9-1\": \"(UTC-06:00) Central America\",\n    \"9-2\": \"-06:00:00\",\n    \"10-0\": \"Central Standard Time\",\n    \"10-1\": \"(UTC-06:00) Central Time (US & Canada)\",\n    \"10-2\": \"-06:00:00\",\n    \"11-0\": \"Central Standard Time (Mexico)\",\n    \"11-1\": \"(UTC-06:00) Guadalajara, Mexico City, Monterrey\",\n    \"11-2\": \"-06:00:00\",\n    \"12-0\": \"Canada Central Standard Time\",\n    \"12-1\": \"(UTC-06:00) Saskatchewan\",\n    \"12-2\": \"-06:00:00\",\n    \"13-0\": \"SA Pacific Standard Time\",\n    \"13-1\": \"(UTC-05:00) Bogota, Lima, Quito, Rio Branco\",\n    \"13-2\": \"-05:00:00\",\n    \"14-0\": \"Eastern Standard Time (Mexico)\",\n    \"14-1\": \"(UTC-05:00) Chetumal\",\n    \"14-2\": \"-05:00:00\",\n    \"15-0\": \"Eastern Standard Time\",\n    \"15-1\": \"(UTC-05:00) Eastern Time (US & Canada)\",\n    \"15-2\": \"-05:00:00\",\n    \"16-0\": \"US Eastern Standard Time\",\n    \"16-1\": \"(UTC-05:00) Indiana (East)\",\n    \"16-2\": \"-05:00:00\",\n    \"17-1\": \"(UTC-04:30) Caracas\",\n    \"17-2\": \"-04:30:00\",\n    \"18-0\": \"Paraguay Standard Time\",\n    \"18-1\": \"(UTC-04:00) Asuncion\",\n    \"18-2\": \"-04:00:00\",\n    \"19-0\": \"Atlantic Standard Time\",\n    \"19-1\": \"(UTC-04:00) Atlantic Time (Canada)\",\n    \"19-2\": \"-04:00:00\",\n    \"20-0\": \"Central Brazilian Standard Time\",\n    \"20-1\": \"(UTC-04:00) Cuiaba\",\n    \"20-2\": \"-04:00:00\",\n    \"21-0\": \"SA Western Standard Time\",\n    \"21-1\": \"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan\",\n    \"21-2\": \"-04:00:00\",\n    \"22-0\": \"Newfoundland Standard Time\",\n    \"22-1\": \"(UTC-03:30) Newfoundland\",\n    \"22-2\": \"-03:30:00\",\n    \"23-0\": \"E. South America Standard Time\",\n    \"23-1\": \"(UTC-03:00) Brasilia\",\n    \"23-2\": \"-03:00:00\",\n    \"24-0\": \"SA Eastern Standard Time\",\n    \"24-1\": \"(UTC-03:00) Cayenne, Fortaleza\",\n    \"24-2\": \"-03:00:00\",\n    \"25-0\": \"Argentina Standard Time\",\n    \"25-1\": \"(UTC-03:00) City of Buenos Aires\",\n    \"25-2\": \"-03:00:00\",\n    \"26-0\": \"Greenland Standard Time\",\n    \"26-1\": \"(UTC-03:00) Greenland\",\n    \"26-2\": \"-03:00:00\",\n    \"27-0\": \"Montevideo Standard Time\",\n    \"27-1\": \"(UTC-03:00) Montevideo\",\n    \"27-2\": \"-03:00:00\",\n    \"28-0\": \"Bahia Standard Time\",\n    \"28-1\": \"(UTC-03:00) Salvador\",\n    \"28-2\": \"-03:00:00\",\n    \"29-0\": \"Pacific SA Standard Time\",\n    \"29-1\": \"(UTC-03:00) Santiago\",\n    \"29-2\": \"-03:00:00\",\n    \"30-0\": \"UTC-02\",\n    \"30-1\": \"(UTC-02:00) Coordinated Universal Time-02\",\n    \"30-2\": \"-02:00:00\",\n    \"31-0\": \"Mid-Atlantic Standard Time\",\n    \"31-1\": \"(UTC-02:00) Mid-Atlantic - Old\",\n    \"31-2\": \"-02:00:00\",\n    \"32-0\": \"Azores Standard Time\",\n    \"32-1\": \"(UTC-01:00) Azores\",\n    \"32-2\": \"-01:00:00\",\n    \"33-0\": \"Cape Verde Standard Time\",\n    \"33-1\": \"(UTC-01:00) Cabo Verde Is.\",\n    \"33-2\": \"-01:00:00\",\n    \"34-0\": \"Morocco Standard Time\",\n    \"34-1\": \"(UTC) Casablanca\",\n    \"34-2\": \"00:00:00\",\n    \"35-0\": \"UTC\",\n    \"35-1\": \"(UTC) Coordinated Universal Time\",\n    \"35-2\": \"00:00:00\",\n    \"36-0\": \"GMT Standard Time\",\n    \"36-1\": \"(UTC) Dublin, Edinburgh, Lisbon, London\",\n    \"36-2\": \"00:00:00\",\n    \"37-0\": \"Greenwich Standard Time\",\n    \"37-1\": \"(UTC) Monrovia, Reykjavik\",\n    \"37-2\": \"00:00:00\",\n    \"38-0\": \"W. Europe Standard Time\",\n    \"38-1\": \"(UTC+01:00) Amsterdam, Berlin, Bern, Rome,  Stockholm, Vienna\",\n    \"38-2\": \"01:00:00\",\n    \"39-0\": \"Central Europe Standard Time\",\n    \"39-1\": \"(UTC+01:00) Belgrade, Bratislava, Budapest,  Ljubljana, Prague\",\n    \"39-2\": \"01:00:00\",\n    \"40-0\": \"Romance Standard Time\",\n    \"40-1\": \"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris\",\n    \"40-2\": \"01:00:00\",\n    \"41-0\": \"Central European Standard Time\",\n    \"41-1\": \"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb\",\n    \"41-2\": \"01:00:00\",\n    \"42-0\": \"W. Central Africa Standard Time\",\n    \"42-1\": \"(UTC+01:00) West Central Africa\",\n    \"42-2\": \"01:00:00\",\n    \"43-0\": \"Namibia Standard Time\",\n    \"43-1\": \"(UTC+01:00) Windhoek\",\n    \"43-2\": \"01:00:00\",\n    \"44-0\": \"Jordan Standard Time\",\n    \"44-1\": \"(UTC+02:00) Amman\",\n    \"44-2\": \"02:00:00\",\n    \"45-0\": \"GTB Standard Time\",\n    \"45-1\": \"(UTC+02:00) Athens, Bucharest\",\n    \"45-2\": \"02:00:00\",\n    \"46-0\": \"Middle East Standard Time\",\n    \"46-1\": \"(UTC+02:00) Beirut\",\n    \"46-2\": \"02:00:00\",\n    \"47-0\": \"Egypt Standard Time\",\n    \"47-1\": \"(UTC+02:00) Cairo\",\n    \"47-2\": \"02:00:00\",\n    \"48-0\": \"Syria Standard Time\",\n    \"48-1\": \"(UTC+02:00) Damascus\",\n    \"48-2\": \"02:00:00\",\n    \"49-0\": \"E. Europe Standard Time\",\n    \"49-1\": \"(UTC+02:00) E. Europe\",\n    \"49-2\": \"02:00:00\",\n    \"50-0\": \"South Africa Standard Time\",\n    \"50-1\": \"(UTC+02:00) Harare, Pretoria\",\n    \"50-2\": \"02:00:00\",\n    \"51-0\": \"FLE Standard Time\",\n    \"51-1\": \"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius\",\n    \"51-2\": \"02:00:00\",\n    \"52-0\": \"Turkey Standard Time\",\n    \"52-1\": \"(UTC+02:00) Istanbul\",\n    \"52-2\": \"02:00:00\",\n    \"53-0\": \"Israel Standard Time\",\n    \"53-1\": \"(UTC+02:00) Jerusalem\",\n    \"53-2\": \"02:00:00\",\n    \"54-0\": \"Kaliningrad Standard Time\",\n    \"54-1\": \"(UTC+02:00) Kaliningrad (RTZ 1)\",\n    \"54-2\": \"02:00:00\",\n    \"55-0\": \"Libya Standard Time\",\n    \"55-1\": \"(UTC+02:00) Tripoli\",\n    \"55-2\": \"02:00:00\",\n    \"56-0\": \"Arabic Standard Time\",\n    \"56-1\": \"(UTC+03:00) Baghdad\",\n    \"56-2\": \"03:00:00\",\n    \"57-0\": \"Arab Standard Time\",\n    \"57-1\": \"(UTC+03:00) Kuwait, Riyadh\",\n    \"57-2\": \"03:00:00\",\n    \"58-0\": \"Belarus Standard Time\",\n    \"58-1\": \"(UTC+03:00) Minsk\",\n    \"58-2\": \"03:00:00\",\n    \"59-0\": \"Russian Standard Time\",\n    \"59-1\": \"(UTC+03:00) Moscow, St. Petersburg, Volgograd (RTZ 2)\",\n    \"59-2\": \"03:00:00\",\n    \"60-0\": \"E. Africa Standard Time\",\n    \"60-1\": \"(UTC+03:00) Nairobi\",\n    \"60-2\": \"03:00:00\",\n    \"61-0\": \"Iran Standard Time\",\n    \"61-1\": \"(UTC+03:30) Tehran\",\n    \"61-2\": \"03:30:00\",\n    \"62-0\": \"Arabian Standard Time\",\n    \"62-1\": \"(UTC+04:00) Abu Dhabi, Muscat\",\n    \"62-2\": \"04:00:00\",\n    \"63-0\": \"Azerbaijan Standard Time\",\n    \"63-1\": \"(UTC+04:00) Baku\",\n    \"63-2\": \"04:00:00\",\n    \"64-0\": \"Russia Time Zone 3\",\n    \"64-1\": \"(UTC+04:00) Izhevsk, Samara (RTZ 3)\",\n    \"64-2\": \"04:00:00\",\n    \"65-0\": \"Mauritius Standard Time\",\n    \"65-1\": \"(UTC+04:00) Port Louis\",\n    \"65-2\": \"04:00:00\",\n    \"66-0\": \"Georgian Standard Time\",\n    \"66-1\": \"(UTC+04:00) Tbilisi\",\n    \"66-2\": \"04:00:00\",\n    \"67-0\": \"Caucasus Standard Time\",\n    \"67-1\": \"(UTC+04:00) Yerevan\",\n    \"67-2\": \"04:00:00\",\n    \"68-0\": \"Afghanistan Standard Time\",\n    \"68-1\": \"(UTC+04:30) Kabul\",\n    \"68-2\": \"04:30:00\",\n    \"69-0\": \"West Asia Standard Time\",\n    \"69-1\": \"(UTC+05:00) Ashgabat, Tashkent\",\n    \"69-2\": \"05:00:00\",\n    \"70-0\": \"Ekaterinburg Standard Time\",\n    \"70-1\": \"(UTC+05:00) Ekaterinburg (RTZ 4)\",\n    \"70-2\": \"05:00:00\",\n    \"71-0\": \"Pakistan Standard Time\",\n    \"71-1\": \"(UTC+05:00) Islamabad, Karachi\",\n    \"71-2\": \"05:00:00\",\n    \"72-0\": \"India Standard Time\",\n    \"72-1\": \"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi\",\n    \"72-2\": \"05:30:00\",\n    \"73-0\": \"Sri Lanka Standard Time\",\n    \"73-1\": \"(UTC+05:30) Sri Jayawardenepura\",\n    \"73-2\": \"05:30:00\",\n    \"74-0\": \"Nepal Standard Time\",\n    \"74-1\": \"(UTC+05:45) Kathmandu\",\n    \"74-2\": \"05:45:00\",\n    \"75-0\": \"Central Asia Standard Time\",\n    \"75-1\": \"(UTC+06:00) Astana\",\n    \"75-2\": \"06:00:00\",\n    \"76-0\": \"Bangladesh Standard Time\",\n    \"76-1\": \"(UTC+06:00) Dhaka\",\n    \"76-2\": \"06:00:00\",\n    \"77-0\": \"N. Central Asia Standard Time\",\n    \"77-1\": \"(UTC+06:00) Novosibirsk (RTZ 5)\",\n    \"77-2\": \"06:00:00\",\n    \"78-0\": \"Myanmar Standard Time\",\n    \"78-1\": \"(UTC+06:30) Yangon (Rangoon)\",\n    \"78-2\": \"06:30:00\",\n    \"79-0\": \"SE Asia Standard Time\",\n    \"79-1\": \"(UTC+07:00) Bangkok, Hanoi, Jakarta\",\n    \"79-2\": \"07:00:00\",\n    \"80-0\": \"North Asia Standard Time\",\n    \"80-1\": \"(UTC+07:00) Krasnoyarsk (RTZ 6)\",\n    \"80-2\": \"07:00:00\",\n    \"81-0\": \"China Standard Time\",\n    \"81-1\": \"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi\",\n    \"81-2\": \"08:00:00\",\n    \"82-0\": \"North Asia East Standard Time\",\n    \"82-1\": \"(UTC+08:00) Irkutsk (RTZ 7)\",\n    \"82-2\": \"08:00:00\",\n    \"83-0\": \"Singapore Standard Time\",\n    \"83-1\": \"(UTC+08:00) Kuala Lumpur, Singapore\",\n    \"83-2\": \"08:00:00\",\n    \"84-0\": \"W. Australia Standard Time\",\n    \"84-1\": \"(UTC+08:00) Perth\",\n    \"84-2\": \"08:00:00\",\n    \"85-0\": \"Taipei Standard Time\",\n    \"85-1\": \"(UTC+08:00) Taipei\",\n    \"85-2\": \"08:00:00\",\n    \"86-0\": \"Ulaanbaatar Standard Time\",\n    \"86-1\": \"(UTC+08:00) Ulaanbaatar\",\n    \"86-2\": \"08:00:00\",\n    \"87-0\": \"North Korea Standard Time\",\n    \"87-1\": \"(UTC+08:30) Pyongyang\",\n    \"87-2\": \"08:30:00\",\n    \"88-0\": \"Tokyo Standard Time\",\n    \"88-1\": \"(UTC+09:00) Osaka, Sapporo, Tokyo\",\n    \"88-2\": \"09:00:00\",\n    \"89-0\": \"Korea Standard Time\",\n    \"89-1\": \"(UTC+09:00) Seoul\",\n    \"89-2\": \"09:00:00\",\n    \"90-0\": \"Yakutsk Standard Time\",\n    \"90-1\": \"(UTC+09:00) Yakutsk (RTZ 8)\",\n    \"90-2\": \"09:00:00\",\n    \"91-0\": \"Cen. Australia Standard Time\",\n    \"91-1\": \"(UTC+09:30) Adelaide\",\n    \"91-2\": \"09:30:00\",\n    \"92-0\": \"AUS Central Standard Time\",\n    \"92-1\": \"(UTC+09:30) Darwin\",\n    \"92-2\": \"09:30:00\",\n    \"93-0\": \"E. Australia Standard Time\",\n    \"93-1\": \"(UTC+10:00) Brisbane\",\n    \"93-2\": \"10:00:00\",\n    \"94-0\": \"AUS Eastern Standard Time\",\n    \"94-1\": \"(UTC+10:00) Canberra, Melbourne, Sydney\",\n    \"94-2\": \"10:00:00\",\n    \"95-0\": \"West Pacific Standard Time\",\n    \"95-1\": \"(UTC+10:00) Guam, Port Moresby\",\n    \"95-2\": \"10:00:00\",\n    \"96-0\": \"Tasmania Standard Time\",\n    \"96-1\": \"(UTC+10:00) Hobart\",\n    \"96-2\": \"10:00:00\",\n    \"97-0\": \"Magadan Standard Time\",\n    \"97-1\": \"(UTC+10:00) Magadan\",\n    \"97-2\": \"10:00:00\",\n    \"98-0\": \"Vladivostok Standard Time\",\n    \"98-1\": \"(UTC+10:00) Vladivostok, Magadan (RTZ 9)\",\n    \"98-2\": \"10:00:00\",\n    \"99-0\": \"Russia Time Zone 10\",\n    \"99-1\": \"(UTC+11:00) Chokurdakh (RTZ 10)\",\n    \"99-2\": \"11:00:00\",\n    \"100-0\": \"Central Pacific Standard Time\",\n    \"100-1\": \"(UTC+11:00) Solomon Is., New Caledonia\",\n    \"100-2\": \"11:00:00\",\n    \"101-0\": \"Russia Time Zone 11\",\n    \"101-1\": \"(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)\",\n    \"101-2\": \"12:00:00\",\n    \"102-0\": \"New Zealand Standard Time\",\n    \"102-1\": \"(UTC+12:00) Auckland, Wellington\",\n    \"102-2\": \"12:00:00\",\n    \"103-0\": \"UTC+12\",\n    \"103-1\": \"(UTC+12:00) Coordinated Universal Time+12\",\n    \"103-2\": \"12:00:00\",\n    \"104-0\": \"Fiji Standard Time\",\n    \"104-1\": \"(UTC+12:00) Fiji\",\n    \"104-2\": \"12:00:00\",\n    \"105-0\": \"Kamchatka Standard Time\",\n    \"105-1\": \"(UTC+12:00) Petropavlovsk-Kamchatsky - Old\",\n    \"105-2\": \"12:00:00\",\n    \"106-0\": \"Tonga Standard Time\",\n    \"106-1\": \"(UTC+13:00) Nuku'alofa\",\n    \"106-2\": \"13:00:00\",\n    \"107-0\": \"Samoa Standard Time\",\n    \"107-1\": \"(UTC+13:00) Samoa\",\n    \"107-2\": \"13:00:00\",\n    \"108-0\": \"Line Islands Standard Time\",\n    \"108-1\": \"(UTC+14:00) Kiritimati Island\",\n    \"108-2\": \"14:00:00\"\n  },\n  \"cols\": 3,\n  \"rows\": 109\n}\n[/block]","childrenPages":[]}

Timezones


Use the table below to identify the Timezone id's used by the CalReply API [block:parameters] { "data": { "h-0": "Id", "h-1": "DisplayName", "h-2": "BaseUtcOffset", "0-0": "Dateline Standard Time", "0-1": "(UTC-12:00) International Date Line West", "0-2": "-12:00:00", "h-3": "BaseUtcOffset", "0-3": "-12:00:00", "1-0": "UTC-11", "2-0": "Hawaiian Standard Time", "17-0": "Venezuela Standard Time", "1-1": "(UTC-11:00) Coordinated Universal Time-11", "1-2": "-11:00:00", "2-1": "(UTC-10:00) Hawaii", "2-2": "-10:00:00", "3-0": "Alaskan Standard Time", "3-1": "(UTC-09:00) Alaska", "3-2": "-09:00:00", "4-0": "Pacific Standard Time (Mexico)", "4-1": "(UTC-08:00) Baja California", "4-2": "-08:00:00", "5-0": "Pacific Standard Time", "5-1": "(UTC-08:00) Pacific Time (US & Canada)", "5-2": "-08:00:00", "6-0": "US Mountain Standard Time", "6-1": "(UTC-07:00) Arizona", "6-2": "-07:00:00", "7-0": "Mountain Standard Time (Mexico)", "7-1": "(UTC-07:00) Chihuahua, La Paz, Mazatlan", "7-2": "-07:00:00", "8-0": "Mountain Standard Time", "8-1": "(UTC-07:00) Mountain Time (US & Canada)", "8-2": "-07:00:00", "9-0": "Central America Standard Time", "9-1": "(UTC-06:00) Central America", "9-2": "-06:00:00", "10-0": "Central Standard Time", "10-1": "(UTC-06:00) Central Time (US & Canada)", "10-2": "-06:00:00", "11-0": "Central Standard Time (Mexico)", "11-1": "(UTC-06:00) Guadalajara, Mexico City, Monterrey", "11-2": "-06:00:00", "12-0": "Canada Central Standard Time", "12-1": "(UTC-06:00) Saskatchewan", "12-2": "-06:00:00", "13-0": "SA Pacific Standard Time", "13-1": "(UTC-05:00) Bogota, Lima, Quito, Rio Branco", "13-2": "-05:00:00", "14-0": "Eastern Standard Time (Mexico)", "14-1": "(UTC-05:00) Chetumal", "14-2": "-05:00:00", "15-0": "Eastern Standard Time", "15-1": "(UTC-05:00) Eastern Time (US & Canada)", "15-2": "-05:00:00", "16-0": "US Eastern Standard Time", "16-1": "(UTC-05:00) Indiana (East)", "16-2": "-05:00:00", "17-1": "(UTC-04:30) Caracas", "17-2": "-04:30:00", "18-0": "Paraguay Standard Time", "18-1": "(UTC-04:00) Asuncion", "18-2": "-04:00:00", "19-0": "Atlantic Standard Time", "19-1": "(UTC-04:00) Atlantic Time (Canada)", "19-2": "-04:00:00", "20-0": "Central Brazilian Standard Time", "20-1": "(UTC-04:00) Cuiaba", "20-2": "-04:00:00", "21-0": "SA Western Standard Time", "21-1": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", "21-2": "-04:00:00", "22-0": "Newfoundland Standard Time", "22-1": "(UTC-03:30) Newfoundland", "22-2": "-03:30:00", "23-0": "E. South America Standard Time", "23-1": "(UTC-03:00) Brasilia", "23-2": "-03:00:00", "24-0": "SA Eastern Standard Time", "24-1": "(UTC-03:00) Cayenne, Fortaleza", "24-2": "-03:00:00", "25-0": "Argentina Standard Time", "25-1": "(UTC-03:00) City of Buenos Aires", "25-2": "-03:00:00", "26-0": "Greenland Standard Time", "26-1": "(UTC-03:00) Greenland", "26-2": "-03:00:00", "27-0": "Montevideo Standard Time", "27-1": "(UTC-03:00) Montevideo", "27-2": "-03:00:00", "28-0": "Bahia Standard Time", "28-1": "(UTC-03:00) Salvador", "28-2": "-03:00:00", "29-0": "Pacific SA Standard Time", "29-1": "(UTC-03:00) Santiago", "29-2": "-03:00:00", "30-0": "UTC-02", "30-1": "(UTC-02:00) Coordinated Universal Time-02", "30-2": "-02:00:00", "31-0": "Mid-Atlantic Standard Time", "31-1": "(UTC-02:00) Mid-Atlantic - Old", "31-2": "-02:00:00", "32-0": "Azores Standard Time", "32-1": "(UTC-01:00) Azores", "32-2": "-01:00:00", "33-0": "Cape Verde Standard Time", "33-1": "(UTC-01:00) Cabo Verde Is.", "33-2": "-01:00:00", "34-0": "Morocco Standard Time", "34-1": "(UTC) Casablanca", "34-2": "00:00:00", "35-0": "UTC", "35-1": "(UTC) Coordinated Universal Time", "35-2": "00:00:00", "36-0": "GMT Standard Time", "36-1": "(UTC) Dublin, Edinburgh, Lisbon, London", "36-2": "00:00:00", "37-0": "Greenwich Standard Time", "37-1": "(UTC) Monrovia, Reykjavik", "37-2": "00:00:00", "38-0": "W. Europe Standard Time", "38-1": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", "38-2": "01:00:00", "39-0": "Central Europe Standard Time", "39-1": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", "39-2": "01:00:00", "40-0": "Romance Standard Time", "40-1": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", "40-2": "01:00:00", "41-0": "Central European Standard Time", "41-1": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", "41-2": "01:00:00", "42-0": "W. Central Africa Standard Time", "42-1": "(UTC+01:00) West Central Africa", "42-2": "01:00:00", "43-0": "Namibia Standard Time", "43-1": "(UTC+01:00) Windhoek", "43-2": "01:00:00", "44-0": "Jordan Standard Time", "44-1": "(UTC+02:00) Amman", "44-2": "02:00:00", "45-0": "GTB Standard Time", "45-1": "(UTC+02:00) Athens, Bucharest", "45-2": "02:00:00", "46-0": "Middle East Standard Time", "46-1": "(UTC+02:00) Beirut", "46-2": "02:00:00", "47-0": "Egypt Standard Time", "47-1": "(UTC+02:00) Cairo", "47-2": "02:00:00", "48-0": "Syria Standard Time", "48-1": "(UTC+02:00) Damascus", "48-2": "02:00:00", "49-0": "E. Europe Standard Time", "49-1": "(UTC+02:00) E. Europe", "49-2": "02:00:00", "50-0": "South Africa Standard Time", "50-1": "(UTC+02:00) Harare, Pretoria", "50-2": "02:00:00", "51-0": "FLE Standard Time", "51-1": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", "51-2": "02:00:00", "52-0": "Turkey Standard Time", "52-1": "(UTC+02:00) Istanbul", "52-2": "02:00:00", "53-0": "Israel Standard Time", "53-1": "(UTC+02:00) Jerusalem", "53-2": "02:00:00", "54-0": "Kaliningrad Standard Time", "54-1": "(UTC+02:00) Kaliningrad (RTZ 1)", "54-2": "02:00:00", "55-0": "Libya Standard Time", "55-1": "(UTC+02:00) Tripoli", "55-2": "02:00:00", "56-0": "Arabic Standard Time", "56-1": "(UTC+03:00) Baghdad", "56-2": "03:00:00", "57-0": "Arab Standard Time", "57-1": "(UTC+03:00) Kuwait, Riyadh", "57-2": "03:00:00", "58-0": "Belarus Standard Time", "58-1": "(UTC+03:00) Minsk", "58-2": "03:00:00", "59-0": "Russian Standard Time", "59-1": "(UTC+03:00) Moscow, St. Petersburg, Volgograd (RTZ 2)", "59-2": "03:00:00", "60-0": "E. Africa Standard Time", "60-1": "(UTC+03:00) Nairobi", "60-2": "03:00:00", "61-0": "Iran Standard Time", "61-1": "(UTC+03:30) Tehran", "61-2": "03:30:00", "62-0": "Arabian Standard Time", "62-1": "(UTC+04:00) Abu Dhabi, Muscat", "62-2": "04:00:00", "63-0": "Azerbaijan Standard Time", "63-1": "(UTC+04:00) Baku", "63-2": "04:00:00", "64-0": "Russia Time Zone 3", "64-1": "(UTC+04:00) Izhevsk, Samara (RTZ 3)", "64-2": "04:00:00", "65-0": "Mauritius Standard Time", "65-1": "(UTC+04:00) Port Louis", "65-2": "04:00:00", "66-0": "Georgian Standard Time", "66-1": "(UTC+04:00) Tbilisi", "66-2": "04:00:00", "67-0": "Caucasus Standard Time", "67-1": "(UTC+04:00) Yerevan", "67-2": "04:00:00", "68-0": "Afghanistan Standard Time", "68-1": "(UTC+04:30) Kabul", "68-2": "04:30:00", "69-0": "West Asia Standard Time", "69-1": "(UTC+05:00) Ashgabat, Tashkent", "69-2": "05:00:00", "70-0": "Ekaterinburg Standard Time", "70-1": "(UTC+05:00) Ekaterinburg (RTZ 4)", "70-2": "05:00:00", "71-0": "Pakistan Standard Time", "71-1": "(UTC+05:00) Islamabad, Karachi", "71-2": "05:00:00", "72-0": "India Standard Time", "72-1": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", "72-2": "05:30:00", "73-0": "Sri Lanka Standard Time", "73-1": "(UTC+05:30) Sri Jayawardenepura", "73-2": "05:30:00", "74-0": "Nepal Standard Time", "74-1": "(UTC+05:45) Kathmandu", "74-2": "05:45:00", "75-0": "Central Asia Standard Time", "75-1": "(UTC+06:00) Astana", "75-2": "06:00:00", "76-0": "Bangladesh Standard Time", "76-1": "(UTC+06:00) Dhaka", "76-2": "06:00:00", "77-0": "N. Central Asia Standard Time", "77-1": "(UTC+06:00) Novosibirsk (RTZ 5)", "77-2": "06:00:00", "78-0": "Myanmar Standard Time", "78-1": "(UTC+06:30) Yangon (Rangoon)", "78-2": "06:30:00", "79-0": "SE Asia Standard Time", "79-1": "(UTC+07:00) Bangkok, Hanoi, Jakarta", "79-2": "07:00:00", "80-0": "North Asia Standard Time", "80-1": "(UTC+07:00) Krasnoyarsk (RTZ 6)", "80-2": "07:00:00", "81-0": "China Standard Time", "81-1": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", "81-2": "08:00:00", "82-0": "North Asia East Standard Time", "82-1": "(UTC+08:00) Irkutsk (RTZ 7)", "82-2": "08:00:00", "83-0": "Singapore Standard Time", "83-1": "(UTC+08:00) Kuala Lumpur, Singapore", "83-2": "08:00:00", "84-0": "W. Australia Standard Time", "84-1": "(UTC+08:00) Perth", "84-2": "08:00:00", "85-0": "Taipei Standard Time", "85-1": "(UTC+08:00) Taipei", "85-2": "08:00:00", "86-0": "Ulaanbaatar Standard Time", "86-1": "(UTC+08:00) Ulaanbaatar", "86-2": "08:00:00", "87-0": "North Korea Standard Time", "87-1": "(UTC+08:30) Pyongyang", "87-2": "08:30:00", "88-0": "Tokyo Standard Time", "88-1": "(UTC+09:00) Osaka, Sapporo, Tokyo", "88-2": "09:00:00", "89-0": "Korea Standard Time", "89-1": "(UTC+09:00) Seoul", "89-2": "09:00:00", "90-0": "Yakutsk Standard Time", "90-1": "(UTC+09:00) Yakutsk (RTZ 8)", "90-2": "09:00:00", "91-0": "Cen. Australia Standard Time", "91-1": "(UTC+09:30) Adelaide", "91-2": "09:30:00", "92-0": "AUS Central Standard Time", "92-1": "(UTC+09:30) Darwin", "92-2": "09:30:00", "93-0": "E. Australia Standard Time", "93-1": "(UTC+10:00) Brisbane", "93-2": "10:00:00", "94-0": "AUS Eastern Standard Time", "94-1": "(UTC+10:00) Canberra, Melbourne, Sydney", "94-2": "10:00:00", "95-0": "West Pacific Standard Time", "95-1": "(UTC+10:00) Guam, Port Moresby", "95-2": "10:00:00", "96-0": "Tasmania Standard Time", "96-1": "(UTC+10:00) Hobart", "96-2": "10:00:00", "97-0": "Magadan Standard Time", "97-1": "(UTC+10:00) Magadan", "97-2": "10:00:00", "98-0": "Vladivostok Standard Time", "98-1": "(UTC+10:00) Vladivostok, Magadan (RTZ 9)", "98-2": "10:00:00", "99-0": "Russia Time Zone 10", "99-1": "(UTC+11:00) Chokurdakh (RTZ 10)", "99-2": "11:00:00", "100-0": "Central Pacific Standard Time", "100-1": "(UTC+11:00) Solomon Is., New Caledonia", "100-2": "11:00:00", "101-0": "Russia Time Zone 11", "101-1": "(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)", "101-2": "12:00:00", "102-0": "New Zealand Standard Time", "102-1": "(UTC+12:00) Auckland, Wellington", "102-2": "12:00:00", "103-0": "UTC+12", "103-1": "(UTC+12:00) Coordinated Universal Time+12", "103-2": "12:00:00", "104-0": "Fiji Standard Time", "104-1": "(UTC+12:00) Fiji", "104-2": "12:00:00", "105-0": "Kamchatka Standard Time", "105-1": "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", "105-2": "12:00:00", "106-0": "Tonga Standard Time", "106-1": "(UTC+13:00) Nuku'alofa", "106-2": "13:00:00", "107-0": "Samoa Standard Time", "107-1": "(UTC+13:00) Samoa", "107-2": "13:00:00", "108-0": "Line Islands Standard Time", "108-1": "(UTC+14:00) Kiritimati Island", "108-2": "14:00:00" }, "cols": 3, "rows": 109 } [/block]
Use the table below to identify the Timezone id's used by the CalReply API [block:parameters] { "data": { "h-0": "Id", "h-1": "DisplayName", "h-2": "BaseUtcOffset", "0-0": "Dateline Standard Time", "0-1": "(UTC-12:00) International Date Line West", "0-2": "-12:00:00", "h-3": "BaseUtcOffset", "0-3": "-12:00:00", "1-0": "UTC-11", "2-0": "Hawaiian Standard Time", "17-0": "Venezuela Standard Time", "1-1": "(UTC-11:00) Coordinated Universal Time-11", "1-2": "-11:00:00", "2-1": "(UTC-10:00) Hawaii", "2-2": "-10:00:00", "3-0": "Alaskan Standard Time", "3-1": "(UTC-09:00) Alaska", "3-2": "-09:00:00", "4-0": "Pacific Standard Time (Mexico)", "4-1": "(UTC-08:00) Baja California", "4-2": "-08:00:00", "5-0": "Pacific Standard Time", "5-1": "(UTC-08:00) Pacific Time (US & Canada)", "5-2": "-08:00:00", "6-0": "US Mountain Standard Time", "6-1": "(UTC-07:00) Arizona", "6-2": "-07:00:00", "7-0": "Mountain Standard Time (Mexico)", "7-1": "(UTC-07:00) Chihuahua, La Paz, Mazatlan", "7-2": "-07:00:00", "8-0": "Mountain Standard Time", "8-1": "(UTC-07:00) Mountain Time (US & Canada)", "8-2": "-07:00:00", "9-0": "Central America Standard Time", "9-1": "(UTC-06:00) Central America", "9-2": "-06:00:00", "10-0": "Central Standard Time", "10-1": "(UTC-06:00) Central Time (US & Canada)", "10-2": "-06:00:00", "11-0": "Central Standard Time (Mexico)", "11-1": "(UTC-06:00) Guadalajara, Mexico City, Monterrey", "11-2": "-06:00:00", "12-0": "Canada Central Standard Time", "12-1": "(UTC-06:00) Saskatchewan", "12-2": "-06:00:00", "13-0": "SA Pacific Standard Time", "13-1": "(UTC-05:00) Bogota, Lima, Quito, Rio Branco", "13-2": "-05:00:00", "14-0": "Eastern Standard Time (Mexico)", "14-1": "(UTC-05:00) Chetumal", "14-2": "-05:00:00", "15-0": "Eastern Standard Time", "15-1": "(UTC-05:00) Eastern Time (US & Canada)", "15-2": "-05:00:00", "16-0": "US Eastern Standard Time", "16-1": "(UTC-05:00) Indiana (East)", "16-2": "-05:00:00", "17-1": "(UTC-04:30) Caracas", "17-2": "-04:30:00", "18-0": "Paraguay Standard Time", "18-1": "(UTC-04:00) Asuncion", "18-2": "-04:00:00", "19-0": "Atlantic Standard Time", "19-1": "(UTC-04:00) Atlantic Time (Canada)", "19-2": "-04:00:00", "20-0": "Central Brazilian Standard Time", "20-1": "(UTC-04:00) Cuiaba", "20-2": "-04:00:00", "21-0": "SA Western Standard Time", "21-1": "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan", "21-2": "-04:00:00", "22-0": "Newfoundland Standard Time", "22-1": "(UTC-03:30) Newfoundland", "22-2": "-03:30:00", "23-0": "E. South America Standard Time", "23-1": "(UTC-03:00) Brasilia", "23-2": "-03:00:00", "24-0": "SA Eastern Standard Time", "24-1": "(UTC-03:00) Cayenne, Fortaleza", "24-2": "-03:00:00", "25-0": "Argentina Standard Time", "25-1": "(UTC-03:00) City of Buenos Aires", "25-2": "-03:00:00", "26-0": "Greenland Standard Time", "26-1": "(UTC-03:00) Greenland", "26-2": "-03:00:00", "27-0": "Montevideo Standard Time", "27-1": "(UTC-03:00) Montevideo", "27-2": "-03:00:00", "28-0": "Bahia Standard Time", "28-1": "(UTC-03:00) Salvador", "28-2": "-03:00:00", "29-0": "Pacific SA Standard Time", "29-1": "(UTC-03:00) Santiago", "29-2": "-03:00:00", "30-0": "UTC-02", "30-1": "(UTC-02:00) Coordinated Universal Time-02", "30-2": "-02:00:00", "31-0": "Mid-Atlantic Standard Time", "31-1": "(UTC-02:00) Mid-Atlantic - Old", "31-2": "-02:00:00", "32-0": "Azores Standard Time", "32-1": "(UTC-01:00) Azores", "32-2": "-01:00:00", "33-0": "Cape Verde Standard Time", "33-1": "(UTC-01:00) Cabo Verde Is.", "33-2": "-01:00:00", "34-0": "Morocco Standard Time", "34-1": "(UTC) Casablanca", "34-2": "00:00:00", "35-0": "UTC", "35-1": "(UTC) Coordinated Universal Time", "35-2": "00:00:00", "36-0": "GMT Standard Time", "36-1": "(UTC) Dublin, Edinburgh, Lisbon, London", "36-2": "00:00:00", "37-0": "Greenwich Standard Time", "37-1": "(UTC) Monrovia, Reykjavik", "37-2": "00:00:00", "38-0": "W. Europe Standard Time", "38-1": "(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna", "38-2": "01:00:00", "39-0": "Central Europe Standard Time", "39-1": "(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague", "39-2": "01:00:00", "40-0": "Romance Standard Time", "40-1": "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris", "40-2": "01:00:00", "41-0": "Central European Standard Time", "41-1": "(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb", "41-2": "01:00:00", "42-0": "W. Central Africa Standard Time", "42-1": "(UTC+01:00) West Central Africa", "42-2": "01:00:00", "43-0": "Namibia Standard Time", "43-1": "(UTC+01:00) Windhoek", "43-2": "01:00:00", "44-0": "Jordan Standard Time", "44-1": "(UTC+02:00) Amman", "44-2": "02:00:00", "45-0": "GTB Standard Time", "45-1": "(UTC+02:00) Athens, Bucharest", "45-2": "02:00:00", "46-0": "Middle East Standard Time", "46-1": "(UTC+02:00) Beirut", "46-2": "02:00:00", "47-0": "Egypt Standard Time", "47-1": "(UTC+02:00) Cairo", "47-2": "02:00:00", "48-0": "Syria Standard Time", "48-1": "(UTC+02:00) Damascus", "48-2": "02:00:00", "49-0": "E. Europe Standard Time", "49-1": "(UTC+02:00) E. Europe", "49-2": "02:00:00", "50-0": "South Africa Standard Time", "50-1": "(UTC+02:00) Harare, Pretoria", "50-2": "02:00:00", "51-0": "FLE Standard Time", "51-1": "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius", "51-2": "02:00:00", "52-0": "Turkey Standard Time", "52-1": "(UTC+02:00) Istanbul", "52-2": "02:00:00", "53-0": "Israel Standard Time", "53-1": "(UTC+02:00) Jerusalem", "53-2": "02:00:00", "54-0": "Kaliningrad Standard Time", "54-1": "(UTC+02:00) Kaliningrad (RTZ 1)", "54-2": "02:00:00", "55-0": "Libya Standard Time", "55-1": "(UTC+02:00) Tripoli", "55-2": "02:00:00", "56-0": "Arabic Standard Time", "56-1": "(UTC+03:00) Baghdad", "56-2": "03:00:00", "57-0": "Arab Standard Time", "57-1": "(UTC+03:00) Kuwait, Riyadh", "57-2": "03:00:00", "58-0": "Belarus Standard Time", "58-1": "(UTC+03:00) Minsk", "58-2": "03:00:00", "59-0": "Russian Standard Time", "59-1": "(UTC+03:00) Moscow, St. Petersburg, Volgograd (RTZ 2)", "59-2": "03:00:00", "60-0": "E. Africa Standard Time", "60-1": "(UTC+03:00) Nairobi", "60-2": "03:00:00", "61-0": "Iran Standard Time", "61-1": "(UTC+03:30) Tehran", "61-2": "03:30:00", "62-0": "Arabian Standard Time", "62-1": "(UTC+04:00) Abu Dhabi, Muscat", "62-2": "04:00:00", "63-0": "Azerbaijan Standard Time", "63-1": "(UTC+04:00) Baku", "63-2": "04:00:00", "64-0": "Russia Time Zone 3", "64-1": "(UTC+04:00) Izhevsk, Samara (RTZ 3)", "64-2": "04:00:00", "65-0": "Mauritius Standard Time", "65-1": "(UTC+04:00) Port Louis", "65-2": "04:00:00", "66-0": "Georgian Standard Time", "66-1": "(UTC+04:00) Tbilisi", "66-2": "04:00:00", "67-0": "Caucasus Standard Time", "67-1": "(UTC+04:00) Yerevan", "67-2": "04:00:00", "68-0": "Afghanistan Standard Time", "68-1": "(UTC+04:30) Kabul", "68-2": "04:30:00", "69-0": "West Asia Standard Time", "69-1": "(UTC+05:00) Ashgabat, Tashkent", "69-2": "05:00:00", "70-0": "Ekaterinburg Standard Time", "70-1": "(UTC+05:00) Ekaterinburg (RTZ 4)", "70-2": "05:00:00", "71-0": "Pakistan Standard Time", "71-1": "(UTC+05:00) Islamabad, Karachi", "71-2": "05:00:00", "72-0": "India Standard Time", "72-1": "(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi", "72-2": "05:30:00", "73-0": "Sri Lanka Standard Time", "73-1": "(UTC+05:30) Sri Jayawardenepura", "73-2": "05:30:00", "74-0": "Nepal Standard Time", "74-1": "(UTC+05:45) Kathmandu", "74-2": "05:45:00", "75-0": "Central Asia Standard Time", "75-1": "(UTC+06:00) Astana", "75-2": "06:00:00", "76-0": "Bangladesh Standard Time", "76-1": "(UTC+06:00) Dhaka", "76-2": "06:00:00", "77-0": "N. Central Asia Standard Time", "77-1": "(UTC+06:00) Novosibirsk (RTZ 5)", "77-2": "06:00:00", "78-0": "Myanmar Standard Time", "78-1": "(UTC+06:30) Yangon (Rangoon)", "78-2": "06:30:00", "79-0": "SE Asia Standard Time", "79-1": "(UTC+07:00) Bangkok, Hanoi, Jakarta", "79-2": "07:00:00", "80-0": "North Asia Standard Time", "80-1": "(UTC+07:00) Krasnoyarsk (RTZ 6)", "80-2": "07:00:00", "81-0": "China Standard Time", "81-1": "(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi", "81-2": "08:00:00", "82-0": "North Asia East Standard Time", "82-1": "(UTC+08:00) Irkutsk (RTZ 7)", "82-2": "08:00:00", "83-0": "Singapore Standard Time", "83-1": "(UTC+08:00) Kuala Lumpur, Singapore", "83-2": "08:00:00", "84-0": "W. Australia Standard Time", "84-1": "(UTC+08:00) Perth", "84-2": "08:00:00", "85-0": "Taipei Standard Time", "85-1": "(UTC+08:00) Taipei", "85-2": "08:00:00", "86-0": "Ulaanbaatar Standard Time", "86-1": "(UTC+08:00) Ulaanbaatar", "86-2": "08:00:00", "87-0": "North Korea Standard Time", "87-1": "(UTC+08:30) Pyongyang", "87-2": "08:30:00", "88-0": "Tokyo Standard Time", "88-1": "(UTC+09:00) Osaka, Sapporo, Tokyo", "88-2": "09:00:00", "89-0": "Korea Standard Time", "89-1": "(UTC+09:00) Seoul", "89-2": "09:00:00", "90-0": "Yakutsk Standard Time", "90-1": "(UTC+09:00) Yakutsk (RTZ 8)", "90-2": "09:00:00", "91-0": "Cen. Australia Standard Time", "91-1": "(UTC+09:30) Adelaide", "91-2": "09:30:00", "92-0": "AUS Central Standard Time", "92-1": "(UTC+09:30) Darwin", "92-2": "09:30:00", "93-0": "E. Australia Standard Time", "93-1": "(UTC+10:00) Brisbane", "93-2": "10:00:00", "94-0": "AUS Eastern Standard Time", "94-1": "(UTC+10:00) Canberra, Melbourne, Sydney", "94-2": "10:00:00", "95-0": "West Pacific Standard Time", "95-1": "(UTC+10:00) Guam, Port Moresby", "95-2": "10:00:00", "96-0": "Tasmania Standard Time", "96-1": "(UTC+10:00) Hobart", "96-2": "10:00:00", "97-0": "Magadan Standard Time", "97-1": "(UTC+10:00) Magadan", "97-2": "10:00:00", "98-0": "Vladivostok Standard Time", "98-1": "(UTC+10:00) Vladivostok, Magadan (RTZ 9)", "98-2": "10:00:00", "99-0": "Russia Time Zone 10", "99-1": "(UTC+11:00) Chokurdakh (RTZ 10)", "99-2": "11:00:00", "100-0": "Central Pacific Standard Time", "100-1": "(UTC+11:00) Solomon Is., New Caledonia", "100-2": "11:00:00", "101-0": "Russia Time Zone 11", "101-1": "(UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky (RTZ 11)", "101-2": "12:00:00", "102-0": "New Zealand Standard Time", "102-1": "(UTC+12:00) Auckland, Wellington", "102-2": "12:00:00", "103-0": "UTC+12", "103-1": "(UTC+12:00) Coordinated Universal Time+12", "103-2": "12:00:00", "104-0": "Fiji Standard Time", "104-1": "(UTC+12:00) Fiji", "104-2": "12:00:00", "105-0": "Kamchatka Standard Time", "105-1": "(UTC+12:00) Petropavlovsk-Kamchatsky - Old", "105-2": "12:00:00", "106-0": "Tonga Standard Time", "106-1": "(UTC+13:00) Nuku'alofa", "106-2": "13:00:00", "107-0": "Samoa Standard Time", "107-1": "(UTC+13:00) Samoa", "107-2": "13:00:00", "108-0": "Line Islands Standard Time", "108-1": "(UTC+14:00) Kiritimati Island", "108-2": "14:00:00" }, "cols": 3, "rows": 109 } [/block]
{"_id":"5bea1488b53da00018d731b6","project":"565fc2d2649b951900c89858","version":"565fc2d2649b951900c8985b","category":"5bea146abaafbd0362523be6","user":"555d323987ebf70d002aded4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-13T00:02:16.555Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"Use the CalReply Subscription Events API to programmatically manage events for calendar subscriptions. This API will be useful in managing personalised calendar events for one or more calendar subscriptions.","excerpt":"This page will help you get started with integrating via the Subscription Events API","slug":"subscription-event-introduction","type":"basic","title":"Introduction","__v":0,"childrenPages":[]}

Introduction

This page will help you get started with integrating via the Subscription Events API

Use the CalReply Subscription Events API to programmatically manage events for calendar subscriptions. This API will be useful in managing personalised calendar events for one or more calendar subscriptions.
Use the CalReply Subscription Events API to programmatically manage events for calendar subscriptions. This API will be useful in managing personalised calendar events for one or more calendar subscriptions.
{"_id":"5bea1f5afefc7000506c3b51","project":"565fc2d2649b951900c89858","version":"565fc2d2649b951900c8985b","category":"5bea146abaafbd0362523be6","user":"555d323987ebf70d002aded4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-13T00:48:26.862Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"name":"cURL - Standard Event","code":"curl -X POST \\\n  https://api.calreply.net/v1/subscriptionevent/:accountCode \\\n  -H 'authorization: Bearer {access token}' \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -d '{\n\t\"event\":{\n\t\t\"eventId\":\"my event\",\n\t\t\"title\":\"Title of my event\",\n\t\t\"description\":\"description of my event\",\n\t\t\"location\":\"location of my event\",\n\t\t\"start\":\"2018-10-24T16:33:00\",\n\t\t\"end\":\"2018-10-24T17:33:00\",\n\t\t\"timezone\":\"AUS Eastern Standard Time\",\n\t\t\"notifyBefore\":\"15\"\n\t},\n\t\"subscriptionIds\":[\n\t\t\"fcaf2d43-bcbd-4c5a-a7c0-2eb480bb4fd3\",\n\t\t\"46388f6f-5941-48da-914c-22fed81209dd\",\n\t]\n}'","language":"curl"},{"name":"cURL - All Day Event","language":"curl","code":"curl -X POST \\\n  https://api.calreply.dev/v1/subscriptionevent/:accountCode \\\n  -H 'authorization: Bearer {access token}' \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/json' \\\n  -d '{\n\t\"event\":{\n\t\t\"eventId\":\"my event\",\n\t\t\"title\":\"Title of my event\",\n\t\t\"description\":\"description of my event\",\n\t\t\"location\":\"location of my event\",\n\t\t\"start\":\"2018-10-24T00:00:00\",\n\t\t\"timezone\":\"AUS Eastern Standard Time\",\n    \"allDayEvent\":true\n\t},\n\t\"subscriptionIds\":[\n\t\t\"fcaf2d43-bcbd-4c5a-a7c0-2eb480bb4fd3\",\n\t\t\"46388f6f-5941-48da-914c-22fed81209dd\",\n\t]\n}'"}]},"results":{"codes":[{"status":202,"language":"text","code":"No Content","name":""},{"status":400,"language":"json","code":"{\n\t\"success\": false,\n  \"statusCode\": 404,\n  \"errors\": [\n    { \n      \"code\": \"InvalidRequestParameter\",\n      \"reason\": \"event id parameter is missing\"\n   ]\n}","name":""},{"code":"","language":"text","status":500}]},"settings":"","auth":"required","params":[{"_id":"5bea1f5afefc7000506c3b56","ref":"","in":"path","required":true,"desc":"The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.","default":"","type":"string","name":":accountCode"},{"_id":"5bea1f5afefc7000506c3b55","ref":"","in":"header","required":false,"desc":"","default":"application/json","type":"string","name":"Content-Type"},{"_id":"5bea1f5afefc7000506c3b54","ref":"","in":"header","required":true,"desc":"A Bearer token using your access token received via OAuth authentication","default":"","type":"string","name":"Authorization"},{"_id":"5bea1f5afefc7000506c3b53","ref":"","in":"body","required":true,"desc":"The details of the event to create. Parameters are listed in the table below.","default":"","type":"object","name":"event"},{"_id":"5bea1f5afefc7000506c3b52","ref":"","in":"body","required":false,"desc":"A list of calendar subscription ids (UUID/GUID) to add the event to.","default":"","type":"array_string","name":"subscriptionIds"}],"url":"/v1/subscriptionevent/:accountCode"},"isReference":false,"order":999,"body":"This API endpoint will create an event and attach it to one or more calendar subscriptions. \nThe response of `202 Accepted` indicates that the response was successfully validated and has been accepted for processing. \nEvents are being created in a background process, it can take up to few minutes for changes to propagate to subscribers' calendars.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"This API endpoint requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction).\"\n}\n[/block]\n## Event Details Model\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"**eventId**\\n\\n*Required* \",\n    \"0-1\": \"String\",\n    \"1-0\": \"**title**\\n\\n*Required*\",\n    \"1-1\": \"String\",\n    \"2-0\": \"**description**\\n\\n*Optional*\",\n    \"2-1\": \"String\",\n    \"3-0\": \"**location**\\n\\n*Optional*\",\n    \"3-1\": \"String\",\n    \"4-0\": \"**start**\\n\\n*Required*\",\n    \"4-1\": \"DateTime (ISO 8601)\",\n    \"5-0\": \"**end**\\n\\n*Optional*\",\n    \"5-1\": \"DateTime (ISO 8601)\",\n    \"6-0\": \"**timezone**\\n\\n*Required*\",\n    \"6-1\": \"String\",\n    \"7-0\": \"**allDayEvent**\\n\\n*Optional*\",\n    \"7-1\": \"Boolean\",\n    \"0-2\": \"A unique identifier for the event.\",\n    \"8-0\": \"**notifyBefore**\\n\\n*Optional*\",\n    \"8-1\": \"Number\",\n    \"1-2\": \"Summary/Title of the event.\",\n    \"2-2\": \"Text that will appear in the events `Description` field.\",\n    \"3-2\": \"Text that will appear in the event `Location` field.\",\n    \"4-2\": \"Date and time the event will start in Timezone that it is occurs in.\",\n    \"5-2\": \"Date and time the event will end in Timezone that it is occurs in.\",\n    \"6-2\": \"A Windows timezone identifier. Indicates the timezone that an event occurs in.\",\n    \"7-2\": \"Indicates if the event runs all day.\",\n    \"8-2\": \"Indicates how many minutes before the event the subscriber should be notified.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]","excerpt":"Use the endpoint to programmatically create a calendar subscription event and add it to one or more calendar subscriptions.","slug":"create-new-subscription-event","type":"post","title":"Create New Subscription Event","__v":13,"childrenPages":[]}

postCreate New Subscription Event

Use the endpoint to programmatically create a calendar subscription event and add it to one or more calendar subscriptions.

Path Params

accountCode:
required
string
The CalReply merchant account code, or the subdomain of your CalReply dashboard URL.

Body Params

event:
required
object
The details of the event to create. Parameters are listed in the table below.
subscriptionIds:
array of strings
A list of calendar subscription ids (UUID/GUID) to add the event to.

Headers

Content-Type:
stringapplication/json
Authorization:
required
string
A Bearer token using your access token received via OAuth authentication
This API endpoint will create an event and attach it to one or more calendar subscriptions. The response of `202 Accepted` indicates that the response was successfully validated and has been accepted for processing. Events are being created in a background process, it can take up to few minutes for changes to propagate to subscribers' calendars. [block:callout] { "type": "warning", "body": "This API endpoint requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction)." } [/block] ## Event Details Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**eventId**\n\n*Required* ", "0-1": "String", "1-0": "**title**\n\n*Required*", "1-1": "String", "2-0": "**description**\n\n*Optional*", "2-1": "String", "3-0": "**location**\n\n*Optional*", "3-1": "String", "4-0": "**start**\n\n*Required*", "4-1": "DateTime (ISO 8601)", "5-0": "**end**\n\n*Optional*", "5-1": "DateTime (ISO 8601)", "6-0": "**timezone**\n\n*Required*", "6-1": "String", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "0-2": "A unique identifier for the event.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "1-2": "Summary/Title of the event.", "2-2": "Text that will appear in the events `Description` field.", "3-2": "Text that will appear in the event `Location` field.", "4-2": "Date and time the event will start in Timezone that it is occurs in.", "5-2": "Date and time the event will end in Timezone that it is occurs in.", "6-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "7-2": "Indicates if the event runs all day.", "8-2": "Indicates how many minutes before the event the subscriber should be notified." }, "cols": 3, "rows": 9 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API endpoint will create an event and attach it to one or more calendar subscriptions. The response of `202 Accepted` indicates that the response was successfully validated and has been accepted for processing. Events are being created in a background process, it can take up to few minutes for changes to propagate to subscribers' calendars. [block:callout] { "type": "warning", "body": "This API endpoint requires that your application be authenticated via OAuth. You can learn how to authenticate your application [here](doc:introduction)." } [/block] ## Event Details Model [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Type", "h-2": "Description", "0-0": "**eventId**\n\n*Required* ", "0-1": "String", "1-0": "**title**\n\n*Required*", "1-1": "String", "2-0": "**description**\n\n*Optional*", "2-1": "String", "3-0": "**location**\n\n*Optional*", "3-1": "String", "4-0": "**start**\n\n*Required*", "4-1": "DateTime (ISO 8601)", "5-0": "**end**\n\n*Optional*", "5-1": "DateTime (ISO 8601)", "6-0": "**timezone**\n\n*Required*", "6-1": "String", "7-0": "**allDayEvent**\n\n*Optional*", "7-1": "Boolean", "0-2": "A unique identifier for the event.", "8-0": "**notifyBefore**\n\n*Optional*", "8-1": "Number", "1-2": "Summary/Title of the event.", "2-2": "Text that will appear in the events `Description` field.", "3-2": "Text that will appear in the event `Location` field.", "4-2": "Date and time the event will start in Timezone that it is occurs in.", "5-2": "Date and time the event will end in Timezone that it is occurs in.", "6-2": "A Windows timezone identifier. Indicates the timezone that an event occurs in.", "7-2": "Indicates if the event runs all day.", "8-2": "Indicates how many minutes before the event the subscriber should be notified." }, "cols": 3, "rows": 9 } [/block]