### Recipient Information Response Example Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started This is an example of a JSON response body for a GET request to retrieve information about a recipient. ```APIDOC ## GET /recipients/{recipientId} ### Description Retrieves information about a specific recipient. ### Method GET ### Endpoint `/rest/{clientId}/recipients/{recipientId}` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the recipient. - **created** (string) - The timestamp when the recipient was created. - **modified** (string) - The timestamp when the recipient was last modified. - **links** (array) - A list of related links. - **rel** (string) - The relation type of the link. - **href** (string) - The URL of the link. ### Response Example ```json { "id": "user@example.com", "created": "2020-09-28T18:18:15+02:00", "modified": "2020-09-28T18:18:15+02:00", "links": [ { "rel": "self", "href": "https://api.campaign.episerver.net/rest/123456789/recipients/987654321/user@example.com" } ] } ``` ``` -------------------------------- ### Retrieve Recipient Lists Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started This example demonstrates how to retrieve information about all recipient lists within a client, sorted by creation date. It uses the GET method and requires authentication. ```APIDOC ## GET /rest/{clientId}/recipientlists ### Description Retrieves information about all recipient lists for a given client. ### Method GET ### Endpoint `/rest/{clientId}/recipientlists?sort=created` ### Parameters #### Query Parameters - **sort** (string) - Optional - Specifies the sorting order for the results. Example: `created`. #### Request Header - **Authorization** (string) - Required - Authentication credentials. Example: `BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=` - **accept** (string) - Optional - Specifies the desired response format. Example: `application/json`. ### Request Example ```curl curl -X GET "https://api.campaign.episerver.net/rest/123456789/recipientlists?sort=created " -H "accept: application/json" -H "Authorization: BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=" ``` ### Response #### Success Response (200) - **recipientLists** (array) - Contains a list of recipient list objects. - **id** (string) - The ID of the recipient list. - **name** (string) - The name of the recipient list. - **created** (string) - The creation date of the recipient list. - **modified** (string) - The last modification date of the recipient list. #### Response Example ```json { "recipientLists": [ { "id": "12345", "name": "My List", "created": "2023-10-27T10:00:00Z", "modified": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Add Recipient to Recipient List Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started This example demonstrates how to add a new recipient to a specific recipient list using their email address. It uses the POST method and requires authentication and content type specification. ```APIDOC ## POST /rest/{clientId}/recipients/{recipientListId} ### Description Adds a recipient to a specified recipient list. ### Method POST ### Endpoint `/rest/{clientId}/recipients/{recipientListId}` ### Parameters #### Path Parameters - **clientId** (string) - Required - The ID of the client. - **recipientListId** (string) - Required - The ID of the recipient list to which the recipient will be added. #### Request Header - **Authorization** (string) - Required - Authentication credentials. Example: `BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=` - **accept** (string) - Optional - Specifies the desired response format. Example: `application/json`. - **Content-Type** (string) - Required - Specifies the format of the request body. Example: `application/x-www-form-urlencoded`. #### Request Body - **recipientId** (string) - Required - The email address of the recipient to add. - **address** (string) - Optional - The recipient's full address. - **optinProcessId** (string) - Optional - The ID of the opt-in process to use. - **data** (string) - Optional - Additional data for the recipient. - **returnOptInMailId** (string) - Optional - Specifies whether to return the opt-in mail ID. ### Request Example ```curl curl -X POST "https://api.campaign.episerver.net/rest/123456789/recipients/987654321" -H "accept: application/json" -H "Authorization: BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=" -H "Content-Type: application/x-www-form-urlencoded" -d "address=&optinProcessId=&data=&returnOptInMailId=&recipientId=user%40example.com" ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the recipient was added. - **recipientId** (string) - The ID of the newly added recipient. #### Response Example ```json { "message": "Recipient added successfully.", "recipientId": "user@example.com" } ``` ``` -------------------------------- ### Example JSON Response Body for Recipient Data Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started This JSON object represents the response body when requesting information about a recipient via a GET request. ```json { "id": "user@example.com", "created": "2020-09-28T18:18:15+02:00", "modified": "2020-09-28T18:18:15+02:00", "links": [ { "rel": "self", "href": "https://api.campaign.episerver.net/rest/123456789/recipients/987654321/user@example.com" } ] } ``` -------------------------------- ### Retrieve Recipient Lists (GET) Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started Use this curl command to fetch information about all recipient lists within a specific client. The results are returned in JSON format and sorted by their creation date. Ensure you replace placeholder IDs and authentication tokens with your actual values. ```curl curl -X GET "https://api.campaign.episerver.net/rest/123456789/recipientlists?sort=created " -H "accept: application/json" -H "Authorization: BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=" ``` -------------------------------- ### Add Recipient to List (POST) Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started This curl example demonstrates how to add a new recipient to a specific recipient list. The recipient's details, including their email address, are sent in the request body. Remember to substitute the client ID, recipient list ID, and authentication token with your own credentials. ```curl curl -X POST "https://api.campaign.episerver.net/rest/123456789/recipients/987654321" -H "accept: application/json" -H "Authorization: BASIC k783r3fjn989dhnfjjdr83dgds1383NDfv=" -H "Content-Type: application/x-www-form-urlencoded" -d "address=&optinProcessId=&data=&returnOptInMailId=&recipientId=user%40example.com" ``` -------------------------------- ### Configure Service URL and Default Index in web.config/app.config Source: https://world.optimizely.com/documentation/class-libraries/search-navigation Configure the Optimizely Search & Navigation service URL and default index name using the episerver.find section in your web.config or app.config file. This is the primary method for configuration. ```XML
``` -------------------------------- ### Episerver Profile Store Rest API 1.0 Resources Source: https://world.optimizely.com/documentation/class-libraries/rest-apis/profile-store/episerver-profile-store-rest-api-1-0 This section outlines the primary resources available in the Episerver Profile Store REST API 1.0. These resources allow for managing profile data, including blacklists, scopes, segments, and tracking events. ```APIDOC ## Episerver Profile Store Rest API 1.0 ### Description This API provides access to profile data management functionalities. ### Resources - **Blacklists**: Manage blacklisted entries. - **Profiles**: Access and manage user profiles. - **Scopes**: Define and manage scopes for profile data. - **Segments**: Work with customer segments. - **TrackEvents**: Record and retrieve tracking events. ``` -------------------------------- ### Configure Service URL and Default Index in appSettings Source: https://world.optimizely.com/documentation/class-libraries/search-navigation Alternatively, configure the Optimizely Search & Navigation service URL and default index name using the appSettings section in your web.config or app.config file. Settings in appSettings take higher priority. ```XML ``` -------------------------------- ### Encode Credentials for API Key Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started Use this command on macOS or Linux to Base64-encode your API user and password for creating an API key. Online tools can also be used. ```bash echo -n 'user:password' | base64 ``` -------------------------------- ### Content Delivery API Versions Source: https://world.optimizely.com/documentation/class-libraries/rest-apis/content-delivery-api Lists the available versions of the Content Delivery API. ```APIDOC ## Content Delivery API **REST API version:** 3.0.0. Note that preview APIs may change between minor versions. Older versions of this documentation: * Episerver Content Delivery API 2.9.0 * Episerver Content Delivery API 2.6.1 ``` -------------------------------- ### Content Management API 3.0.0 Source: https://world.optimizely.com/documentation/class-libraries/rest-apis/content-management-api This section details the Content Management API version 3.0.0. Note that preview APIs may change between minor versions. To try preview APIs, set ContentApiConfiguration.EnablePreviewFeatures to true. ```APIDOC ## Content Management API 3.0.0 ### Description This is the main entry point for the Content Management API version 3.0.0. It allows for the creation, retrieval, update, and deletion of content items within the Optimizely DXP. Note that preview APIs may change between minor versions. To try preview APIs, set ContentApiConfiguration.EnablePreviewFeatures to true. ### Endpoint `/api/content/v3.0.0` ### Parameters This API does not explicitly list parameters in the provided documentation. Refer to specific endpoint documentation for details. ``` -------------------------------- ### Content Definitions API 3.0.0 Source: https://world.optimizely.com/documentation/class-libraries/rest-apis/content-definitions-api The Content Definitions API (version 3.0.0) provides endpoints for managing content types, fields, and other definition-related aspects of your Optimizely content. ```APIDOC ## Content Definitions API 3.0.0 ### Description This API version provides functionalities for managing content definitions. ### Version 3.0.0 ``` -------------------------------- ### Optimizely Campaign REST API Base URL Source: https://world.optimizely.com/documentation/class-libraries/rest-apis/campaign The base URL for all API requests to the Optimizely Campaign REST API. Replace placeholders with your specific client ID, component, and path. Parameters can be appended as needed. ```APIDOC ## Base URL ### Description The base URL for all API requests to the Optimizely Campaign REST API. ### Endpoint `https://api.campaign.episerver.net/rest/{clientId}/{component}/{path}?{parameters}` ### Parameters - **clientId** (string) - Required - Your Optimizely Campaign client ID. - **component** (string) - Required - The API component you are accessing (e.g., 'recipients', 'campaigns'). - **path** (string) - Required - The specific path within the component. - **parameters** (string) - Optional - Query parameters for filtering or modifying the request. ``` -------------------------------- ### Status Codes Source: https://world.optimizely.com/documentation/developer-guides/campaign/rest-api/getting-started Understanding the different status codes returned by the API is crucial for handling responses correctly. ```APIDOC ### Status Codes #### Success Status Codes - **200 OK**: The recipient was retrieved successfully. - **201 Created**: The recipient was added successfully. - **202 Accepted**: The recipient history was deleted successfully. #### Error Status Codes - **400 Bad Request**: Recipient ID update is not possible because of a general error. - **404 Not Found**: The recipient could not be found. Ensure that the required parameters such as 'recipientId' and 'recipientListId' are correct and the recipient exists. - **406 Not Acceptable**: The tracking opt-out is not activated for this client. Ensure that the 'clientId' is correct and the required feature is enabled in the indicated client. - **409 Conflict**: The coupon block is not assigned to the indicated client. Ensure that 'clientId' and 'couponBlockId' are correct and that the 'couponBlockId' is assigned to the indicated client. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.