(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{345:function(e,t,a){"use strict";a.r(t);var s=a(28),r=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"orders"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#orders"}},[e._v("#")]),e._v(" Orders")]),e._v(" "),t("h2",{attrs:{id:"retrieve-sales-amount"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#retrieve-sales-amount"}},[e._v("#")]),e._v(" Retrieve Sales Amount")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("GET https://api.wolfeo.me/v1/sales-amount\n")])])]),t("p",[e._v("Returns the total revenue from completed and pending orders over a given time range.")]),e._v(" "),t("h3",{attrs:{id:"example-request"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-request"}},[e._v("#")]),e._v(" Example Request")]),e._v(" "),t("div",{staticClass:"language-curl extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('curl --request GET "https://api.wolfeo.me/v1/sales-amount?period=last30days" \\\n --header "Authorization: Bearer YOUR_API_KEY"\n')])])]),t("h3",{attrs:{id:"parameters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#parameters"}},[e._v("#")]),e._v(" Parameters")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Parameter")]),e._v(" "),t("th",[e._v("Type")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("period*")]),e._v(" "),t("td",[t("em",[e._v("string")])]),e._v(" "),t("td",[e._v("Time range to filter by (see possible values below)")])]),e._v(" "),t("tr",[t("td",[e._v("range")]),e._v(" "),t("td",[t("em",[e._v("string")])]),e._v(" "),t("td",[e._v("Custom date range — only used when "),t("code",[e._v("period=between")])])])])]),e._v(" "),t("p",[t("em",[e._v("* denotes a required parameter")])]),e._v(" "),t("h3",{attrs:{id:"possible-values-for-period"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#possible-values-for-period"}},[e._v("#")]),e._v(" Possible values for "),t("code",[e._v("period")])]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Value")]),e._v(" "),t("th",[e._v("Description")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[t("code",[e._v("all")])]),e._v(" "),t("td",[e._v("All orders ever")])]),e._v(" "),t("tr",[t("td",[t("code",[e._v("today")])]),e._v(" "),t("td",[e._v("Orders placed today")])]),e._v(" "),t("tr",[t("td",[t("code",[e._v("yesterday")])]),e._v(" "),t("td",[e._v("Orders placed yesterday")])]),e._v(" "),t("tr",[t("td",[t("code",[e._v("last7days")])]),e._v(" "),t("td",[e._v("Orders placed in the last 7 days")])]),e._v(" "),t("tr",[t("td",[t("code",[e._v("last30days")])]),e._v(" "),t("td",[e._v("Orders placed in the last 30 days")])]),e._v(" "),t("tr",[t("td",[t("code",[e._v("between")])]),e._v(" "),t("td",[e._v("Custom date range (requires "),t("code",[e._v("range")]),e._v(")")])])])]),e._v(" "),t("h3",{attrs:{id:"format-for-range"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#format-for-range"}},[e._v("#")]),e._v(" Format for "),t("code",[e._v("range")])]),e._v(" "),t("p",[e._v("Pass two dates separated by "),t("code",[e._v("to")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("2023-06-01to2023-06-29\n")])])]),t("h3",{attrs:{id:"example-urls"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#example-urls"}},[e._v("#")]),e._v(" Example URLs")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("https://api.wolfeo.me/v1/sales-amount?period=all\nhttps://api.wolfeo.me/v1/sales-amount?period=today\nhttps://api.wolfeo.me/v1/sales-amount?period=last7days\nhttps://api.wolfeo.me/v1/sales-amount?period=between&range=2023-06-01to2023-06-29\n")])])]),t("h3",{attrs:{id:"sample-return"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sample-return"}},[e._v("#")]),e._v(" Sample Return")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"amount"')]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1234.56")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")]),e._v("\n")])])]),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[t("code",[e._v("amount")]),e._v(" is the sum in the account's default currency, rounded to 2 decimal places.")])]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("This endpoint does not yet follow the standard "),t("code",[e._v('{"success": true, "data": ...}')]),e._v(" envelope. Errors return "),t("code",[e._v('{"success": false}')]),e._v(" with an HTTP 400 or 401 status and no "),t("code",[e._v("error")]),e._v(" object.")])])])}),[],!1,null,null,null);t.default=r.exports}}]);