1"use strict";(globalThis.webpackChunk_atlas_docs_zen=globalThis.webpackChunk_atlas_docs_zen||[]).push([[1707],{4056(e,s,n){n.d(s,{R:()=>d,x:()=>c});var t=n(2155);const r={},i=t.createContext(r);function d(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),t.createElement(i.Provider,{value:s},e.children)}},4933(e,s,n){n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"sdks/typescript/endpoints/delete-licensee","title":"deleteLicensee","description":"Cancel","source":"@site/docs/sdks/typescript/endpoints/delete-licensee.mdx","sourceDirName":"sdks/typescript/endpoints","slug":"/sdks/typescript/endpoints/delete-licensee","permalink":"/docs/sdks/typescript/endpoints/delete-licensee","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"delete-licensee","title":"deleteLicensee"},"sidebar":"sdks","previous":{"title":"createLicensee","permalink":"/docs/sdks/typescript/endpoints/create-licensee"},"next":{"title":"retrieveLicensee","permalink":"/docs/sdks/typescript/endpoints/retrieve-licensee"}}');var r=n(5723),i=n(4056);const d={id:"delete-licensee",title:"deleteLicensee"},c="deleteLicensee",l={},o=[{value:"Endpoint",id:"endpoint",level:2},{value:"Import",id:"import",level:2},{value:"Path Parameters",id:"path-parameters",level:2},{value:"Query Parameters",id:"query-parameters",level:2},{value:"Response Type",id:"response-type",level:2},{value:"Errors",id:"errors",level:2},{value:"Example",id:"example",level:2}];function a(e){const s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"deletelicensee",children:(0,r.jsx)(s.code,{children:"deleteLicensee"})})}),"\n",(0,r.jsx)(s.p,{children:"Cancel"}),"\n",(0,r.jsx)(s.p,{children:"Cancels a licensee. Its key stops working and it drops out of the licensee list. Contact us to reverse it."}),"\n",(0,r.jsx)(s.h2,{id:"endpoint",children:"Endpoint"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.code,{children:"DELETE /keys/{key}/licensees/{licensee}"})}),"\n",(0,r.jsxs)(s.p,{children:["See the ",(0,r.jsx)(s.a,{href:"/docs/api/delete-licensee",children:"API reference"})," for this endpoint."]}),"\n",(0,r.jsxs)(s.p,{children:["This operation needs a Management Key. Set it as ",(0,r.jsx)(s.code,{children:"userToken"})," on the client, which sends it in the ",(0,r.jsx)(s.code,{children:"Authorization"})," header. See ",(0,r.jsx)(s.a,{href:"/docs/sdks/typescript/setup",children:"setup"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"import",children:"Import"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ts",children:'import { deleteLicensee } from "@addresszen/sdk";\n'})}),"\n",(0,r.jsx)(s.h2,{id:"path-parameters",children:"Path Parameters"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Name"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Required"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"key"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"yes"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"API Key"})," The API Key to retrieve. Begins ",(0,r.jsx)(s.code,{children:"ak_"}),"."]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"licensee"})}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"string"})}),(0,r.jsx)(s.td,{children:"yes"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"Licensee Key"})," Uniquely identifies a licensee."]})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"query-parameters",children:"Query Parameters"}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.em,{children:"None."})}),"\n",(0,r.jsx)(s.h2,{id:"response-type",children:"Response Type"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ts",children:'import type { DeleteLicenseeResponse } from "@addresszen/sdk";\n'})}),"\n",(0,r.jsx)(s.h2,{id:"errors",children:"Errors"}),"\n",(0,r.jsxs)(s.p,{children:["HTTP errors throw an ",(0,r.jsx)(s.code,{children:"ApiError"})," with the HTTP ",(0,r.jsx)(s.code,{children:"status"})," and the API error ",(0,r.jsx)(s.code,{children:"code"})," and ",(0,r.jsx)(s.code,{children:"message"}),". Network failures and aborts reject with the runtime's native error. Pass ",(0,r.jsx)(s.code,{children:"throwOnError: false"})," to get ",(0,r.jsx)(s.code,{children:"{ data, error }"})," instead. See ",(0,r.jsx)(s.a,{href:"/docs/sdks/typescript/errors",children:"error handling"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-ts",metastring:'title="delete-licensee.ts"',children:'import { createZenClient, deleteLicensee } from "@addresszen/sdk";\n\nexport const example = async () => {\n const client = createZenClient({\n apiKey: "ak_test",\n userToken: "uk_example",\n });\n const { data } = await deleteLicensee({\n client,\n path: { key: "ak_test", licensee: "sl_example" },\n });\n return data;\n};\n'})})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.