<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5379],{91:(e,t,n)=&gt;{"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,{_:()=&gt;r})},1675:(e,t,n)=&gt;{Promise.resolve().then(n.bind(n,12809))},7505:e=&gt;{e.exports={wrapper:"page_wrapper__9DIZ6",headerWrapper:"page_headerWrapper__Y3Npq",header:"page_header__ELzmf",authenticationSection:"page_authenticationSection__rSa7d",queriesSection:"page_queriesSection__VWw_R",queriesSectionHeader:"page_queriesSectionHeader__WeOX1",externalUpsLink:"page_externalUpsLink__EcFbH",externalUpsLinkImage:"page_externalUpsLinkImage__W2QXj",apiList:"page_apiList__Y_13d",internalLink:"page_internalLink__Ba_aP"}},12809:(e,t,n)=&gt;{"use strict";n.r(t),n.d(t,{default:()=&gt;S});var r=n(91),i=n(93213),o=n(61968),s=n(24114);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&amp;&amp;(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t&lt;arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){var r,i,o;r=e,i=t,o=n[t],(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}let l=function e(t){return n.withOptions=n=&gt;e(c(c({},t),n)),n;function n(e,...r){let i="string"==typeof e?[e]:e.raw,{escapeSpecialCharacters:o=Array.isArray(e)}=t,s="";for(let e=0;e&lt;i.length;e++){let t=i[e];o&amp;&amp;(t=t.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\\{/g,"{")),s+=t,e&lt;r.length&amp;&amp;(s+=r[e])}let a=s.split("\n"),c=null;for(let e of a){let t=e.match(/^(\s+)\S+/);if(t){let e=t[1].length;c=c?Math.min(c,e):e}}if(null!==c){let e=c;s=a.map(t=&gt;" "===t[0]||"	"===t[0]?t.slice(e):t).join("\n")}return s=s.trim(),o&amp;&amp;(s=s.replace(/\\n/g,"\n")),s}}({});var d=n(9648),p=n(50543),u=n(73886),h=n(80991),_=n(69146),x=n.n(_);let m=e=&gt;{let{method:t,url:n}=e,{copyText:r,setShowTooltip:o,showTooltip:a}=(0,p.s)({tooltipDuration:1e3});return(0,i.jsxs)("div",{className:(0,s.A)(x().wrapper,h.Bl&amp;&amp;x().ups),children:[(0,i.jsx)(d.Text,{color:(()=&gt;{switch(t){case"post":return"blue600";case"get":default:return"green600";case"put":return"orange600";case"delete":return"red600"}})(),isUppercase:!0,type:"bold-label",children:t}),(0,i.jsx)("span",{className:x().codeText,children:n}),(0,i.jsx)(u.i,{className:x().styledCopyButton,onClick:()=&gt;{o(!1),r(n)},showTooltip:a})]})};var j=n(19017),y=n(56125),g=n(56796),f=n(7505),b=n.n(f);function v(){let e=(0,r._)(["\n                ~~~sh\n                credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc\n                ~~~\n                "]);return v=function(){return e},e}function P(){let e=(0,r._)(["\n                ~~~sh\n                shipperNumber: 5490YY\n                ~~~\n                "]);return P=function(){return e},e}function k(){let e=(0,r._)(["\n                ~~~sh\n                ","\n                ~~~\n                "]);return k=function(){return e},e}function w(){let e=(0,r._)(["\n                ~~~sh\n                ","\n                ~~~\n                "]);return w=function(){return e},e}function T(){let e=(0,r._)(["\n                ~~~sh\n                ","\n                ~~~\n                "]);return T=function(){return e},e}function N(){let e=(0,r._)(["\n                ~~~sh\n                ","\n                ~~~\n                "]);return N=function(){return e},e}let O=e=&gt;{if(h.bB)return e;switch(e){case"Zonos":return"UPS";case"Zonos GraphQL API":return"UPS\xae Global Checkout GraphQL API";case"Zonos' GraphQL API":return"UPS\xae' Global Checkout GraphQL API";case"https://api.zonos.com/graphql":return"https://onlinetools.ups.com/global-checkout/graphql";default:return e}},B=O("Zonos GraphQL API"),C=O("Zonos' GraphQL API"),A=O("Zonos"),L=O("https://api.zonos.com/graphql"),S=()=&gt;(0,i.jsxs)("div",{className:b().wrapper,children:[(0,i.jsx)("div",{className:(0,s.A)(g.splitPane,"comment-mode-section"),children:(0,i.jsxs)("div",{className:b().headerWrapper,children:[(0,i.jsxs)("div",{className:b().header,children:[(0,i.jsx)("h2",{children:B}),(0,i.jsxs)(d.Text,{color:"gray700",type:"title",children:["Welcome to the ",B," reference documentation."]})]}),(0,i.jsxs)(d.Text,{children:["The API lets you build apps and integrations that extend and enhance your experience with ",A,". This page will help you get up and running with ",C,"."]})]})}),(0,i.jsxs)("div",{className:(0,s.A)(g.splitPane,"comment-mode-section"),children:[(0,i.jsxs)("div",{className:b().authenticationSection,children:[(0,i.jsx)("h3",{children:"Authentication"}),(0,i.jsx)(d.Text,{children:h.bB?(0,i.jsxs)(i.Fragment,{children:["To access the Zonos GraphQL API, you will need an API token. The API token will be included in all API requests to the server with the header ",(0,i.jsx)("code",{children:"credentialToken"}),"."]}):(0,i.jsxs)(i.Fragment,{children:["To access the UPS\xae Global Checkout GraphQL API, you will"," ",(0,i.jsxs)(y.Link,{className:b().externalUpsLink,href:"https://developer.ups.com/get-started?loc=en_US",children:["authenticate with OAuth"," ",(0,i.jsx)(o.default,{alt:"external link",className:b().externalUpsLinkImage,height:16,src:"/images/ups-external-link.png",width:16})]}),". Once authenticated, you will need to pass the your shipper number in all API requests so the server with the header"," ",(0,i.jsx)("code",{children:"shipperNumber"}),"."]})})]}),(0,i.jsxs)("div",{children:[h.bB?(0,i.jsx)(j.N,{label:"YOUR CREDENTIAL TOKEN",children:l(v())}):(0,i.jsx)(j.N,{label:"YOUR SHIPPER NUMBER",children:l(P())}),(0,i.jsx)(j.N,{label:"cURL",children:h.bB?l(k(),["curl -X POST \\\n","".concat(L," \\\n"),"-H 'Content-Type: application/json' \\\n","-H 'credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc' \\\n","-d '{your_query}'"].join("")):l(w(),["curl -X POST \\\n","".concat(L," \\\n"),"-H 'Content-Type: application/json' \\\n","-H 'shipperNumber: 5490YY' \\\n","-d '{your_query}'"].join(""))})]})]}),(0,i.jsxs)("div",{className:(0,s.A)(g.splitPane,"comment-mode-section"),children:[(0,i.jsxs)("div",{className:b().queriesSection,children:[(0,i.jsxs)("div",{className:b().queriesSectionHeader,children:[(0,i.jsx)("h3",{children:"Queries"}),(0,i.jsx)(d.Text,{children:"GraphQL queries are executed by sending HTTP requests to the endpoint:"})]}),(0,i.jsx)(m,{method:"post",url:L}),(0,i.jsx)(d.Text,{children:"Queries begin with one of the objects listed under QueryRoot. The QueryRoot is the schema's entry-point for queries."}),(0,i.jsxs)(d.Text,{children:["Queries are equivalent to making a GET request in REST. The example shown is a query to get the ",(0,i.jsx)("code",{children:"id"})," and"," ",(0,i.jsx)("code",{children:"description"})," of the first 3 items."]})]}),(0,i.jsx)("div",{children:(0,i.jsx)(j.N,{label:"cURL",maxHeight:400,children:h.bB?l(T(),["curl -X POST \\\n","".concat(L," \\\n"),"-H 'Content-Type: application/json' \\\n","-H 'credentialToken: credential_example_8978ca2a-e567-466a-91c2-f3276cc9aadc' \\\n",'-d \'{\n                    "query": "{ items(first: 3) { edges { node { id description } } } } }"\n                  }\''].join("")):l(N(),["curl -X POST \\\n","".concat(L," \\\n"),"-H 'Content-Type: application/json' \\\n","-H 'shipperNumber: 5490YY' \\\n",'-d \'{\n                    "query": "{ landedCosts(first: 10) { edges { node { id landedCostGuaranteeCode } }} }"\n                  }\''].join(""))})})]})]})},19017:(e,t,n)=&gt;{"use strict";n.d(t,{N:()=&gt;_});var r=n(93213),i=n(30409),o=n(90011),s=n(24114),a=n(9026),c=n(9648),l=n(50543),d=n(73886),p=n(80659),u=n.n(p);let h=e=&gt;{let t=e.match(/\n/g);return t?t.length-1:0},_=e=&gt;{let{children:t,label:n,maxHeight:p=260,style:_}=e,x=h(t),{copyText:m,setShowTooltip:j,showTooltip:y}=(0,l.s)({tooltipDuration:1e3}),g=(0,i.useRef)(null);return(0,r.jsxs)("div",{className:(0,s.A)(u().wrapper,"code-block"),"data-theme":"night",style:{..._,"--zonos-code-block-max-height":"".concat(p,"px")},children:[(0,r.jsxs)("div",{className:u().codeBlockHeader,children:[(0,r.jsx)(c.Text,{isUppercase:!1,type:"small-header",children:n}),(0,r.jsx)(d.i,{onClick:()=&gt;{var e;j(!1),m((null===(e=g.current)||void 0===e?void 0:e.innerText)||"Oops... Something went wrong copying the text")},showTooltip:y})]}),(0,r.jsxs)("div",{className:u().codeBlockBody,children:[(0,r.jsx)("div",{className:u().codeBlockLines,children:[...Array(x).keys()].map((e,t)=&gt;(0,r.jsx)("div",{children:t+1},t))}),(0,r.jsx)("div",{ref:g,children:(0,r.jsx)(o.o,{rehypePlugins:[a.A],children:t})})]})]})}},32907:(e,t,n)=&gt;{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(35447)._(n(30409)).default.createContext(null)},56796:e=&gt;{e.exports={ups:"PageDeveloper_ups__s5dyg",cssDeveloper:"PageDeveloper_cssDeveloper__U2K6m",section:"PageDeveloper_section___Emzm",splitPane:"PageDeveloper_splitPane__7Kz5V"}},69146:e=&gt;{e.exports={ups:"ApiEndpoint_ups__FJPFP",codeText:"ApiEndpoint_codeText__jaJ06",wrapper:"ApiEndpoint_wrapper__PJzzJ",styledCopyButton:"ApiEndpoint_styledCopyButton__edivL"}},73886:(e,t,n)=&gt;{"use strict";n.d(t,{i:()=&gt;u});var r=n(93213),i=n(24114),o=n(44627),s=n(14187),a=n(9648),c=n(1781),l=n(52271),d=n(75106),p=n.n(d);let u=e=&gt;{let{className:t,onClick:n,showTooltip:d}=e;return(0,r.jsx)("button",{className:(0,i.A)(t,p().styledButton),onClick:n,type:"button",children:(0,r.jsxs)(o.N,{initial:!1,mode:"wait",children:[d&amp;&amp;(0,r.jsxs)(s.P.div,{animate:{opacity:1,scale:1,translateX:0},className:p().copiedDiv,exit:{opacity:0,scale:0},initial:{opacity:0,scale:0},transition:{duration:.2},children:[(0,r.jsx)(c.CheckmarkIcon,{color:"blue600",size:20}),(0,r.jsx)(a.Text,{color:"blue600",type:"caption",children:"Copied!"})]},"copied"),!d&amp;&amp;(0,r.jsx)(s.P.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},initial:{opacity:0,scale:0},transition:{duration:.1},children:(0,r.jsx)(l.T,{color:"gray800",size:20})},"copy")]})})}},75106:e=&gt;{e.exports={styledButton:"CopyButton_styledButton__nQ07A",copiedDiv:"CopyButton_copiedDiv__zhaPP"}},80659:e=&gt;{e.exports={cssCodeHighlight:"CodeBlock_cssCodeHighlight___zQ5z",codeBlockBody:"CodeBlock_codeBlockBody__y6CrW",wrapper:"CodeBlock_wrapper__DG3Nz",codeBlockHeader:"CodeBlock_codeBlockHeader__mrZgy",codeBlockLines:"CodeBlock_codeBlockLines__M83sf"}}},e=&gt;{var t=t=&gt;e(e.s=t);e.O(0,[8416,52,5676,1891,6894,6125,1882,2994,7358],()=&gt;t(1675)),_N_E=e.O()}]);</pre></body></html>