@@ -35,17 +35,15 @@ func NewIndustryService(opts ...option.RequestOption) (r IndustryService) {
3535 return
3636}
3737
38- // Classify any brand into 2022 NAICS industry codes from its domain or name .
38+ // Classify a company into NAICS industry codes.
3939func (r * IndustryService ) GetNaics (ctx context.Context , query IndustryGetNaicsParams , opts ... option.RequestOption ) (res * IndustryGetNaicsResponse , err error ) {
4040 opts = slices .Concat (r .options , opts )
4141 path := "web/naics"
4242 err = requestconfig .ExecuteNewRequest (ctx , http .MethodGet , path , query , & res , opts ... )
4343 return res , err
4444}
4545
46- // Classify any brand into Standard Industrial Classification (SIC) codes from its
47- // domain or name. Choose between the original SIC system (`original_sic`) or the
48- // latest SIC list maintained by the SEC (`latest_sec`).
46+ // Classify a company into SIC industry codes.
4947func (r * IndustryService ) GetSic (ctx context.Context , query IndustryGetSicParams , opts ... option.RequestOption ) (res * IndustryGetSicResponse , err error ) {
5048 opts = slices .Concat (r .options , opts )
5149 path := "web/sic"
@@ -54,19 +52,19 @@ func (r *IndustryService) GetSic(ctx context.Context, query IndustryGetSicParams
5452}
5553
5654type IndustryGetNaicsResponse struct {
57- // Unique id of this API call , also sent in the X-Request-Id response header. Quote
58- // it when contacting support about a failed request .
55+ // Unique ID of this request , also in ` X-Request-Id`. Include it when contacting
56+ // support.
5957 RequestID string `json:"request_id" api:"required" format:"uuid"`
6058 // Array of NAICS codes and titles.
6159 Codes []IndustryGetNaicsResponseCode `json:"codes"`
6260 // Domain found for the brand
6361 Domain string `json:"domain"`
64- // Credit usage, included whenever a valid API key is provided .
62+ // Credits this request used and your remaining balance .
6563 KeyMetadata IndustryGetNaicsResponseKeyMetadata `json:"key_metadata"`
6664 // True when the timeout ended processing and this response contains only usable
6765 // results completed so far. Unfinished results are omitted.
6866 Partial bool `json:"partial"`
69- // Status of the response, e.g., 'ok'
67+ // Always `ok` on success.
7068 Status string `json:"status"`
7169 // Industry classification type, for naics api it will be `naics`
7270 Type string `json:"type"`
@@ -115,9 +113,9 @@ func (r *IndustryGetNaicsResponseCode) UnmarshalJSON(data []byte) error {
115113 return apijson .UnmarshalRoot (data , r )
116114}
117115
118- // Credit usage, included whenever a valid API key is provided .
116+ // Credits this request used and your remaining balance .
119117type IndustryGetNaicsResponseKeyMetadata struct {
120- // Credits used by this request.
118+ // Credits charged for this request.
121119 CreditsConsumed int64 `json:"credits_consumed" api:"required"`
122120 // Credits remaining for your organization.
123121 CreditsRemaining int64 `json:"credits_remaining" api:"required"`
@@ -137,8 +135,8 @@ func (r *IndustryGetNaicsResponseKeyMetadata) UnmarshalJSON(data []byte) error {
137135}
138136
139137type IndustryGetSicResponse struct {
140- // Unique id of this API call , also sent in the X-Request-Id response header. Quote
141- // it when contacting support about a failed request .
138+ // Unique ID of this request , also in ` X-Request-Id`. Include it when contacting
139+ // support.
142140 RequestID string `json:"request_id" api:"required" format:"uuid"`
143141 // Echoes back which SIC dataset was used to classify the brand.
144142 //
@@ -150,12 +148,12 @@ type IndustryGetSicResponse struct {
150148 Codes []IndustryGetSicResponseCode `json:"codes"`
151149 // Domain found for the brand
152150 Domain string `json:"domain"`
153- // Credit usage, included whenever a valid API key is provided .
151+ // Credits this request used and your remaining balance .
154152 KeyMetadata IndustryGetSicResponseKeyMetadata `json:"key_metadata"`
155153 // True when the timeout ended processing and this response contains only usable
156154 // results completed so far. Unfinished results are omitted.
157155 Partial bool `json:"partial"`
158- // Status of the response, e.g., 'ok'
156+ // Always `ok` on success.
159157 Status string `json:"status"`
160158 // Industry classification type, for sic api it will be `sic`
161159 Type string `json:"type"`
@@ -225,9 +223,9 @@ func (r *IndustryGetSicResponseCode) UnmarshalJSON(data []byte) error {
225223 return apijson .UnmarshalRoot (data , r )
226224}
227225
228- // Credit usage, included whenever a valid API key is provided .
226+ // Credits this request used and your remaining balance .
229227type IndustryGetSicResponseKeyMetadata struct {
230- // Credits used by this request.
228+ // Credits charged for this request.
231229 CreditsConsumed int64 `json:"credits_consumed" api:"required"`
232230 // Credits remaining for your organization.
233231 CreditsRemaining int64 `json:"credits_remaining" api:"required"`
@@ -256,18 +254,12 @@ type IndustryGetNaicsParams struct {
256254 MaxResults param.Opt [int64 ] `query:"maxResults,omitzero" json:"-"`
257255 // Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1.
258256 MinResults param.Opt [int64 ] `query:"minResults,omitzero" json:"-"`
259- // Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
260- // characters.
257+ // Comma-separated labels for filtering usage, e.g. `production,team-alpha`.
261258 Tags []string `query:"tags,omitzero" json:"-"`
262- // Optional request deadline and behavior on timeout. For GET requests, use
263- // timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
264- // timeoutOpts object.
259+ // Request deadline and what to return when it passes.
265260 TimeoutOpts IndustryGetNaicsParamsTimeoutOpts `query:"timeoutOpts,omitzero" json:"-"`
266- // Set to enabled to bypass shared caches and omit request and response content
267- // from retained usage logs. Asset uploads are skipped, so hosted image URLs are
268- // omitted. Requires zero data retention to be enabled for your organization
269- // (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
270- // Successful ZDR responses include X-Context-ZDR: true.
261+ // `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
262+ // your organization has ZDR.
271263 //
272264 // Any of "enabled", "disabled".
273265 Zdr IndustryGetNaicsParamsZdr `query:"zdr,omitzero" json:"-"`
@@ -282,18 +274,14 @@ func (r IndustryGetNaicsParams) URLQuery() (v url.Values, err error) {
282274 })
283275}
284276
285- // Optional request deadline and behavior on timeout. For GET requests, use
286- // timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
287- // timeoutOpts object.
277+ // Request deadline and what to return when it passes.
288278//
289279// The property Milliseconds is required.
290280type IndustryGetNaicsParamsTimeoutOpts struct {
291- // Request deadline in milliseconds. Maximum: 300000 (5 minutes) .
281+ // Deadline in milliseconds.
292282 Milliseconds int64 `query:"milliseconds" api:"required" json:"-"`
293- // What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
294- // credits. "return-partial" returns usable results collected so far; if none are
295- // available, the request still fails without charging credits. Partial results are
296- // not cached as complete results.
283+ // "fail" returns 408 at the deadline. "return-partial" returns available results;
284+ // inspect the response’s partial flag.
297285 //
298286 // Any of "fail", "return-partial".
299287 Behavior string `query:"behavior,omitzero" json:"-"`
@@ -309,11 +297,8 @@ func (r IndustryGetNaicsParamsTimeoutOpts) URLQuery() (v url.Values, err error)
309297 })
310298}
311299
312- // Set to enabled to bypass shared caches and omit request and response content
313- // from retained usage logs. Asset uploads are skipped, so hosted image URLs are
314- // omitted. Requires zero data retention to be enabled for your organization
315- // (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
316- // Successful ZDR responses include X-Context-ZDR: true.
300+ // `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
301+ // your organization has ZDR.
317302type IndustryGetNaicsParamsZdr string
318303
319304const (
@@ -330,24 +315,16 @@ type IndustryGetSicParams struct {
330315 MaxResults param.Opt [int64 ] `query:"maxResults,omitzero" json:"-"`
331316 // Minimum number of SIC codes to return. Must be at least 1. Defaults to 1.
332317 MinResults param.Opt [int64 ] `query:"minResults,omitzero" json:"-"`
333- // Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
334- // characters.
318+ // Comma-separated labels for filtering usage, e.g. `production,team-alpha`.
335319 Tags []string `query:"tags,omitzero" json:"-"`
336- // Optional request deadline and behavior on timeout. For GET requests, use
337- // timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
338- // timeoutOpts object.
320+ // Request deadline and what to return when it passes.
339321 TimeoutOpts IndustryGetSicParamsTimeoutOpts `query:"timeoutOpts,omitzero" json:"-"`
340- // Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
341- // Industrial Classification system; `latest_sec` uses the current SIC list as
342- // published by the SEC. Defaults to `original_sic`.
322+ // SIC dataset: `original_sic` (1987) or `latest_sec` (current SEC list).
343323 //
344324 // Any of "original_sic", "latest_sec".
345325 Type IndustryGetSicParamsType `query:"type,omitzero" json:"-"`
346- // Set to enabled to bypass shared caches and omit request and response content
347- // from retained usage logs. Asset uploads are skipped, so hosted image URLs are
348- // omitted. Requires zero data retention to be enabled for your organization
349- // (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
350- // Successful ZDR responses include X-Context-ZDR: true.
326+ // `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
327+ // your organization has ZDR.
351328 //
352329 // Any of "enabled", "disabled".
353330 Zdr IndustryGetSicParamsZdr `query:"zdr,omitzero" json:"-"`
@@ -362,18 +339,14 @@ func (r IndustryGetSicParams) URLQuery() (v url.Values, err error) {
362339 })
363340}
364341
365- // Optional request deadline and behavior on timeout. For GET requests, use
366- // timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
367- // timeoutOpts object.
342+ // Request deadline and what to return when it passes.
368343//
369344// The property Milliseconds is required.
370345type IndustryGetSicParamsTimeoutOpts struct {
371- // Request deadline in milliseconds. Maximum: 300000 (5 minutes) .
346+ // Deadline in milliseconds.
372347 Milliseconds int64 `query:"milliseconds" api:"required" json:"-"`
373- // What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
374- // credits. "return-partial" returns usable results collected so far; if none are
375- // available, the request still fails without charging credits. Partial results are
376- // not cached as complete results.
348+ // "fail" returns 408 at the deadline. "return-partial" returns available results;
349+ // inspect the response’s partial flag.
377350 //
378351 // Any of "fail", "return-partial".
379352 Behavior string `query:"behavior,omitzero" json:"-"`
@@ -389,21 +362,16 @@ func (r IndustryGetSicParamsTimeoutOpts) URLQuery() (v url.Values, err error) {
389362 })
390363}
391364
392- // Which SIC dataset to classify against. `original_sic` uses the 1987 Standard
393- // Industrial Classification system; `latest_sec` uses the current SIC list as
394- // published by the SEC. Defaults to `original_sic`.
365+ // SIC dataset: `original_sic` (1987) or `latest_sec` (current SEC list).
395366type IndustryGetSicParamsType string
396367
397368const (
398369 IndustryGetSicParamsTypeOriginalSic IndustryGetSicParamsType = "original_sic"
399370 IndustryGetSicParamsTypeLatestSec IndustryGetSicParamsType = "latest_sec"
400371)
401372
402- // Set to enabled to bypass shared caches and omit request and response content
403- // from retained usage logs. Asset uploads are skipped, so hosted image URLs are
404- // omitted. Requires zero data retention to be enabled for your organization
405- // (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED.
406- // Successful ZDR responses include X-Context-ZDR: true.
373+ // `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless
374+ // your organization has ZDR.
407375type IndustryGetSicParamsZdr string
408376
409377const (
0 commit comments