(window.webpackJsonp=window.webpackJsonp||[]).push([[25],{343:function(t,a,e){"use strict";e.r(a);var s=e(28),r=Object(s.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"contacts"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#contacts"}},[t._v("#")]),t._v(" Contacts")]),t._v(" "),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("NOTE")]),t._v(" "),a("p",[t._v("The URI for the API endpoint is often the same for multiple endpoints, the difference being in HTTP methods.")])]),t._v(" "),a("h2",{attrs:{id:"retrieve-contact"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#retrieve-contact"}},[t._v("#")]),t._v(" Retrieve Contact")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("GET https://api.wolfeo.me/v1/contact\n")])])]),a("h3",{attrs:{id:"example-request"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-request"}},[t._v("#")]),t._v(" Example Request")]),t._v(" "),a("div",{staticClass:"language-curl extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('curl --request GET "https://api.wolfeo.me/v1/contact?contact_id=1" \\\n --header "Authorization: Bearer YOUR_API_KEY"\n')])])]),a("h3",{attrs:{id:"parameters"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters"}},[t._v("#")]),t._v(" Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("email**")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("A contact's email address")])]),t._v(" "),a("tr",[a("td",[t._v("contact_id**")]),t._v(" "),a("td",[a("em",[t._v("int")])]),t._v(" "),a("td",[t._v("A contact's ID")])])])]),t._v(" "),a("p",[a("em",[t._v("** at least one of these parameters must be passed")])]),t._v(" "),a("h3",{attrs:{id:"sample-return"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return"}},[t._v("#")]),t._v(" Sample Return")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"email"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"john@ted.com"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"first_name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"John"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"last_name"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Doe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"email_marketing"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"GDPR"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tags"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("59")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"sequences"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("61")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("70")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("72")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("41")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subscriptions"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"status"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"active"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"amount"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("49.00")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"currency"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"EUR"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"payment_source"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"stripe"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rate"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"monthly"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"trial"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"rebill_date"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2024-08-01 00:00:00"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"payments_left"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"unlimited"')]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"created_at"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"2024-01-01 09:00:00"')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),a("p",[a("code",[t._v("tags")]),t._v(" and "),a("code",[t._v("sequences")]),t._v(" are arrays of IDs. "),a("code",[t._v("subscriptions")]),t._v(" is an empty array "),a("code",[t._v("[]")]),t._v(" if the contact has no active subscription.")])]),t._v(" "),a("h3",{attrs:{id:"possible-errors"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#possible-errors"}},[t._v("#")]),t._v(" Possible Errors")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Code")]),t._v(" "),a("th",[t._v("HTTP")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("NOT_FOUND")]),t._v(" "),a("td",[t._v("404")]),t._v(" "),a("td",[t._v("No contact found for given parameters")])])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"create-contact"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#create-contact"}},[t._v("#")]),t._v(" Create Contact")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("POST https://api.wolfeo.me/v1/contact\n")])])]),a("h3",{attrs:{id:"example-request-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-request-2"}},[t._v("#")]),t._v(" Example Request")]),t._v(" "),a("div",{staticClass:"language-curl extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('curl --request POST "https://api.wolfeo.me/v1/contact" \\\n --header "Authorization: Bearer YOUR_API_KEY" \\\n --header "Content-Type: application/json" \\\n --data \'{"email": "john@doe.ie", "first_name": "John"}\'\n')])])]),a("h3",{attrs:{id:"parameters-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-2"}},[t._v("#")]),t._v(" Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("email*")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's email address")])]),t._v(" "),a("tr",[a("td",[t._v("first_name")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's first name")])]),t._v(" "),a("tr",[a("td",[t._v("last_name")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's last/second name")])]),t._v(" "),a("tr",[a("td",[t._v("email_marketing")]),t._v(" "),a("td",[a("em",[t._v("boolean")])]),t._v(" "),a("td",[t._v("Whether the contact has opted in to email marketing")])]),t._v(" "),a("tr",[a("td",[t._v("gdpr")]),t._v(" "),a("td",[a("em",[t._v("boolean")])]),t._v(" "),a("td",[t._v("Whether the contact has given GDPR consent")])]),t._v(" "),a("tr",[a("td",[t._v("tag_ids")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Comma-separated list of tag IDs to apply. Example: "),a("code",[t._v("123,53434,2503")])])]),t._v(" "),a("tr",[a("td",[t._v("sequence_ids")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Comma-separated list of sequence IDs to subscribe to. Example: "),a("code",[t._v("61,70")])])])])]),t._v(" "),a("p",[a("em",[t._v("* denotes a required parameter")])]),t._v(" "),a("h3",{attrs:{id:"sample-return-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return-2"}},[t._v("#")]),t._v(" Sample Return")]),t._v(" "),a("p",[t._v("HTTP "),a("strong",[t._v("201 Created")])]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"contact_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("79")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"possible-errors-2"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#possible-errors-2"}},[t._v("#")]),t._v(" Possible Errors")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Code")]),t._v(" "),a("th",[t._v("HTTP")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("CONTACT_EXISTS")]),t._v(" "),a("td",[t._v("409")]),t._v(" "),a("td",[t._v("A contact with this email already exists in your account")])]),t._v(" "),a("tr",[a("td",[t._v("VALIDATION_ERROR")]),t._v(" "),a("td",[t._v("422")]),t._v(" "),a("td",[a("code",[t._v("email")]),t._v(" is missing or invalid; see "),a("code",[t._v("error.details")])])]),t._v(" "),a("tr",[a("td",[t._v("VALIDATION_ERROR")]),t._v(" "),a("td",[t._v("400")]),t._v(" "),a("td",[a("code",[t._v("tag_ids")]),t._v(" or "),a("code",[t._v("sequence_ids")]),t._v(" list is incorrectly formatted (no "),a("code",[t._v("details")]),t._v(" field)")])])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"update-contact"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#update-contact"}},[t._v("#")]),t._v(" Update Contact")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("PUT https://api.wolfeo.me/v1/contact\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("Upsert behaviour")]),t._v(" "),a("p",[t._v("This endpoint "),a("strong",[t._v("creates the contact if they don't exist yet")]),t._v(". Pass "),a("code",[t._v("email")]),t._v(" to look up an existing contact; if none is found, a new one is created with that email and the provided fields.")])]),t._v(" "),a("h3",{attrs:{id:"example-request-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-request-3"}},[t._v("#")]),t._v(" Example Request")]),t._v(" "),a("div",{staticClass:"language-curl extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('curl --request PUT "https://api.wolfeo.me/v1/contact" \\\n --header "Authorization: Bearer YOUR_API_KEY" \\\n --header "Content-Type: application/json" \\\n --data \'{"email": "john@doe.ie", "first_name": "John"}\'\n')])])]),a("p",[t._v("Only the fields you include are updated.")]),t._v(" "),a("h3",{attrs:{id:"parameters-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-3"}},[t._v("#")]),t._v(" Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("email*")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's email address (used to look up the contact)")])]),t._v(" "),a("tr",[a("td",[t._v("first_name")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's first name")])]),t._v(" "),a("tr",[a("td",[t._v("last_name")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Contact's last/second name")])]),t._v(" "),a("tr",[a("td",[t._v("email_marketing")]),t._v(" "),a("td",[a("em",[t._v("boolean")])]),t._v(" "),a("td",[t._v("Whether the contact has opted in to email marketing")])]),t._v(" "),a("tr",[a("td",[t._v("gdpr")]),t._v(" "),a("td",[a("em",[t._v("boolean")])]),t._v(" "),a("td",[t._v("Whether the contact has given GDPR consent")])]),t._v(" "),a("tr",[a("td",[t._v("tag_ids")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Comma-separated list of tag IDs to apply. Example: "),a("code",[t._v("123,53434,2503")])])]),t._v(" "),a("tr",[a("td",[t._v("sequence_ids")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Comma-separated list of sequence IDs to subscribe to. Example: "),a("code",[t._v("61,70")])])])])]),t._v(" "),a("p",[a("em",[t._v("* denotes a required parameter")])]),t._v(" "),a("h3",{attrs:{id:"sample-return-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return-3"}},[t._v("#")]),t._v(" Sample Return")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"contact_id"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("79")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"possible-errors-3"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#possible-errors-3"}},[t._v("#")]),t._v(" Possible Errors")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Code")]),t._v(" "),a("th",[t._v("HTTP")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("VALIDATION_ERROR")]),t._v(" "),a("td",[t._v("422")]),t._v(" "),a("td",[a("code",[t._v("email")]),t._v(" is missing or invalid; see "),a("code",[t._v("error.details")])])]),t._v(" "),a("tr",[a("td",[t._v("VALIDATION_ERROR")]),t._v(" "),a("td",[t._v("400")]),t._v(" "),a("td",[a("code",[t._v("tag_ids")]),t._v(" or "),a("code",[t._v("sequence_ids")]),t._v(" list is incorrectly formatted (no "),a("code",[t._v("details")]),t._v(" field)")])])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"delete-contact"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#delete-contact"}},[t._v("#")]),t._v(" Delete Contact")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("DELETE https://api.wolfeo.me/v1/contact\n")])])]),a("div",{staticClass:"custom-block warning"},[a("p",{staticClass:"custom-block-title"},[t._v("Contacts with orders or transactions")]),t._v(" "),a("p",[t._v("If the contact has associated orders or transactions, they "),a("strong",[t._v("cannot be fully deleted")]),t._v(" — their financial records must be preserved. Instead, they are automatically opted out of all email marketing and unsubscribed from all sequences. The response will reflect this with "),a("code",[t._v('"deleted": false')]),t._v(" and a "),a("code",[t._v("reason")]),t._v(".")])]),t._v(" "),a("h3",{attrs:{id:"example-request-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-request-4"}},[t._v("#")]),t._v(" Example Request")]),t._v(" "),a("div",{staticClass:"language-curl extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('curl --request DELETE "https://api.wolfeo.me/v1/contact" \\\n --header "Authorization: Bearer YOUR_API_KEY" \\\n --header "Content-Type: application/json" \\\n --data \'{"contact_id": 1}\'\n')])])]),a("h3",{attrs:{id:"parameters-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-4"}},[t._v("#")]),t._v(" Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("email**")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("A contact's email address")])]),t._v(" "),a("tr",[a("td",[t._v("contact_id**")]),t._v(" "),a("td",[a("em",[t._v("int")])]),t._v(" "),a("td",[t._v("A contact's ID")])])])]),t._v(" "),a("p",[a("em",[t._v("** at least one of these parameters must be passed")])]),t._v(" "),a("h3",{attrs:{id:"sample-return-contact-fully-deleted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return-contact-fully-deleted"}},[t._v("#")]),t._v(" Sample Return — contact fully deleted")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"deleted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("h3",{attrs:{id:"sample-return-contact-has-orders-transactions"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return-contact-has-orders-transactions"}},[t._v("#")]),t._v(" Sample Return — contact has orders/transactions")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"deleted"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"reason"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Contact has associated orders or transactions and cannot be fully deleted. They have been opted out of email marketing and all sequences instead."')]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),a("div",{staticClass:"custom-block tip"},[a("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),a("p",[t._v("In both cases "),a("code",[t._v("success")]),t._v(" is "),a("code",[t._v("true")]),t._v(" — the request was handled correctly. Always check "),a("code",[t._v("data.deleted")]),t._v(" to know whether the record was removed or only opted out.")])]),t._v(" "),a("h3",{attrs:{id:"possible-errors-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#possible-errors-4"}},[t._v("#")]),t._v(" Possible Errors")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Code")]),t._v(" "),a("th",[t._v("HTTP")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("NOT_FOUND")]),t._v(" "),a("td",[t._v("404")]),t._v(" "),a("td",[t._v("No contact found for given parameters")])])])]),t._v(" "),a("hr"),t._v(" "),a("h2",{attrs:{id:"retrieve-contact-count"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#retrieve-contact-count"}},[t._v("#")]),t._v(" Retrieve Contact Count")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("GET https://api.wolfeo.me/v1/contact-count\n")])])]),a("p",[t._v("Returns the number of contacts created in your account over a given time range.")]),t._v(" "),a("h3",{attrs:{id:"example-request-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-request-5"}},[t._v("#")]),t._v(" Example Request")]),t._v(" "),a("div",{staticClass:"language-curl extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v('curl --request GET "https://api.wolfeo.me/v1/contact-count?period=last30days" \\\n --header "Authorization: Bearer YOUR_API_KEY"\n')])])]),a("h3",{attrs:{id:"parameters-5"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#parameters-5"}},[t._v("#")]),t._v(" Parameters")]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Parameter")]),t._v(" "),a("th",[t._v("Type")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[t._v("period*")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Time range to filter by (see possible values below)")])]),t._v(" "),a("tr",[a("td",[t._v("range")]),t._v(" "),a("td",[a("em",[t._v("string")])]),t._v(" "),a("td",[t._v("Custom date range — only used when "),a("code",[t._v("period=between")])])])])]),t._v(" "),a("p",[a("em",[t._v("* denotes a required parameter")])]),t._v(" "),a("h3",{attrs:{id:"possible-values-for-period"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#possible-values-for-period"}},[t._v("#")]),t._v(" Possible values for "),a("code",[t._v("period")])]),t._v(" "),a("table",[a("thead",[a("tr",[a("th",[t._v("Value")]),t._v(" "),a("th",[t._v("Description")])])]),t._v(" "),a("tbody",[a("tr",[a("td",[a("code",[t._v("all")])]),t._v(" "),a("td",[t._v("All contacts ever created")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("today")])]),t._v(" "),a("td",[t._v("Contacts created today")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("yesterday")])]),t._v(" "),a("td",[t._v("Contacts created yesterday")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("last7days")])]),t._v(" "),a("td",[t._v("Contacts created in the last 7 days")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("last30days")])]),t._v(" "),a("td",[t._v("Contacts created in the last 30 days")])]),t._v(" "),a("tr",[a("td",[a("code",[t._v("between")])]),t._v(" "),a("td",[t._v("Custom date range (requires "),a("code",[t._v("range")]),t._v(")")])])])]),t._v(" "),a("h3",{attrs:{id:"format-for-range"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#format-for-range"}},[t._v("#")]),t._v(" Format for "),a("code",[t._v("range")])]),t._v(" "),a("p",[t._v("Pass two dates separated by "),a("code",[t._v("to")]),t._v(":")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("2023-06-01to2023-06-29\n")])])]),a("h3",{attrs:{id:"example-urls"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#example-urls"}},[t._v("#")]),t._v(" Example URLs")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("https://api.wolfeo.me/v1/contact-count?period=all\nhttps://api.wolfeo.me/v1/contact-count?period=today\nhttps://api.wolfeo.me/v1/contact-count?period=last7days\nhttps://api.wolfeo.me/v1/contact-count?period=between&range=2023-06-01to2023-06-29\n")])])]),a("h3",{attrs:{id:"sample-return-4"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#sample-return-4"}},[t._v("#")]),t._v(" Sample Return")]),t._v(" "),a("div",{staticClass:"language-json extra-class"},[a("pre",{pre:!0,attrs:{class:"language-json"}},[a("code",[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"success"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("true")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"data"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("906")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]);