{"openapi":"3.0.3","info":{"title":"Activity API","description":"Provides access to Dotdigital Personalization activity data, enabling server-side personalisation workflows. Use this API to retrieve specific experiences — the rules and targeting configuration attached to a page — so you can apply personalisation logic outside of the browser. Covers the getExperience operation for querying experiences by website and experience ID.","version":"1.0.1"},"servers":[{"url":"https://{activity_domain}","variables":{"activity_domain":{"description":"Your activity domain for Dotdigital Personalization.","default":"am.dycdn.net"}}}],"paths":{"/e/":{"get":{"tags":["Activity API"],"summary":"Retrieve a specific experience.","description":"Retrieve a specific experience used on a page, which then can be used to perform custom server-side personalization.","operationId":"getExperience","parameters":[{"name":"w","in":"query","description":"The Dotdigital Personalization website id you want content for.","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Experiences id, the unique id returned in the `_id` field from [the Experiences API call.](ref:getcampaigns)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Experience details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_200"},"examples":{"Experience details":{"value":{"rules":{"welcome - morning":[{"target":{"selector":"#extSvcs"},"ruleid":"tfd3s1","dynamic":true,"pageSpec":{"location":[{"hostname":"www.mysitename.com","pathname":"/"}]},"position":"append"}]},"k":"xxkeyxx"}}}}}},"400":{"description":"Bad request"},"401":{"description":"Unauthorized"}}}}},"components":{"schemas":{"inline_response_200":{"required":["k","rules"],"type":"object","properties":{"rules":{"type":"object","additionalProperties":{"type":"array","items":{"required":["dynamic","pageSpec","position","ruleid","target"],"type":"object","properties":{"target":{"type":"object","properties":{"selector":{"type":"string"}},"description":"How the expereince audience is targeted."},"ruleid":{"type":"string","description":"The unique rule id."},"dynamic":{"type":"boolean","description":"Whether the content is static or dynamically generated."},"pageSpec":{"required":["location"],"type":"object","properties":{"location":{"type":"array","description":"The locations within the website.","items":{"required":["hostname","pathname"],"type":"object","properties":{"hostname":{"type":"string","description":"Domain for the location."},"pathname":{"type":"string","description":"The path for the location."}}}}},"description":"The pages the experience should be displayed on."},"position":{"type":"string","description":"Where the contentis intended to be placed on page."}}}},"description":"The rules for controlling the display of the experience."},"k":{"type":"string","description":"The unique key for the experience."}}}}},"x-samples-languages":["curl","csharp","java","javascript","node","python","php","ruby"]}