ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

kroger genrated api

+6222 -79
+24
go.mod
··· 1 1 module careme 2 2 3 3 go 1.24.6 4 + 5 + tool github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen 6 + 7 + require ( 8 + github.com/dprotaso/go-yit v0.0.0-20220510233725-9ba8df137936 // indirect 9 + github.com/getkin/kin-openapi v0.132.0 // indirect 10 + github.com/go-openapi/jsonpointer v0.21.0 // indirect 11 + github.com/go-openapi/swag v0.23.0 // indirect 12 + github.com/josharian/intern v1.0.0 // indirect 13 + github.com/mailru/easyjson v0.7.7 // indirect 14 + github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect 15 + github.com/oapi-codegen/oapi-codegen/v2 v2.5.0 // indirect 16 + github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect 17 + github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect 18 + github.com/perimeterx/marshmallow v1.1.5 // indirect 19 + github.com/speakeasy-api/jsonpath v0.6.0 // indirect 20 + github.com/speakeasy-api/openapi-overlay v0.10.2 // indirect 21 + github.com/vmware-labs/yaml-jsonpath v0.3.2 // indirect 22 + golang.org/x/mod v0.17.0 // indirect 23 + golang.org/x/text v0.20.0 // indirect 24 + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect 25 + gopkg.in/yaml.v2 v2.4.0 // indirect 26 + gopkg.in/yaml.v3 v3.0.1 // indirect 27 + )
+6
internal/kroger/cfg.yaml
··· 1 + # yaml-language-server: $schema=https://raw.githubusercontent.com/oapi-codegen/oapi-codegen/HEAD/configuration-schema.json 2 + package: client 3 + output: client.gen.go 4 + generate: 5 + models: true 6 + client: true
+2844
internal/kroger/client.gen.go
··· 1 + // Package client provides primitives to interact with the openapi HTTP API. 2 + // 3 + // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT. 4 + package client 5 + 6 + import ( 7 + "bytes" 8 + "context" 9 + "encoding/json" 10 + "fmt" 11 + "io" 12 + "net/http" 13 + "net/url" 14 + "strings" 15 + 16 + "github.com/oapi-codegen/runtime" 17 + ) 18 + 19 + const ( 20 + OAuth2AuthorizationCodeScopes = "OAuth2AuthorizationCode.Scopes" 21 + OAuth2ClientCredsScopes = "OAuth2ClientCreds.Scopes" 22 + ) 23 + 24 + // AddToCartJSONBody defines parameters for AddToCart. 25 + type AddToCartJSONBody struct { 26 + Items *[]struct { 27 + Modality *string `json:"modality,omitempty"` 28 + Quantity *float32 `json:"quantity,omitempty"` 29 + Upc *string `json:"upc,omitempty"` 30 + } `json:"items,omitempty"` 31 + } 32 + 33 + // LocationListParams defines parameters for LocationList. 34 + type LocationListParams struct { 35 + // FilterZipCodeNear The zip code you want to use as a starting point for results. 36 + FilterZipCodeNear *string `form:"filter.zipCode.near,omitempty" json:"filter.zipCode.near,omitempty"` 37 + 38 + // FilterLatLongNear The latitude and longitude you want to use as a starting point for results. 39 + FilterLatLongNear *string `form:"filter.latLong.near,omitempty" json:"filter.latLong.near,omitempty"` 40 + 41 + // FilterLatNear The latitude you want to use as a starting point for results. 42 + FilterLatNear *string `form:"filter.lat.near,omitempty" json:"filter.lat.near,omitempty"` 43 + 44 + // FilterLonNear The longitude you want to use as a starting point for results. 45 + FilterLonNear *string `form:"filter.lon.near,omitempty" json:"filter.lon.near,omitempty"` 46 + 47 + // FilterRadiusInMiles The mile radius you want results limited to. 48 + FilterRadiusInMiles *string `form:"filter.radiusInMiles,omitempty" json:"filter.radiusInMiles,omitempty"` 49 + 50 + // FilterLimit The number of results you want returned. 51 + FilterLimit *string `form:"filter.limit,omitempty" json:"filter.limit,omitempty"` 52 + 53 + // FilterChain The chain name of the chain you want results limited to. When using this filter, only stores matching the provided chain name are returned. 54 + FilterChain *string `form:"filter.chain,omitempty" json:"filter.chain,omitempty"` 55 + 56 + // FilterDepartment The departmentId of the department you want results limited to. Lists must be comma-separated. When using this filter, only stores who have all of the departments provided are returned. 57 + FilterDepartment *string `form:"filter.department,omitempty" json:"filter.department,omitempty"` 58 + } 59 + 60 + // ProductSearchParams defines parameters for ProductSearch. 61 + type ProductSearchParams struct { 62 + // FilterTerm A search term to filter product results. As an example, you could input milk, bread, or salt. 63 + FilterTerm *string `form:"filter.term,omitempty" json:"filter.term,omitempty"` 64 + 65 + // FilterLocationId The locationId of the store you want results limited to. When using this filter, only products available at that location are returned. 66 + FilterLocationId *string `form:"filter.locationId,omitempty" json:"filter.locationId,omitempty"` 67 + 68 + // FilterProductId The productId of the products(s) you want returned. For more than one item, the list must be comma-separated. When used, all other query parameters are ignored. 69 + FilterProductId *string `form:"filter.productId,omitempty" json:"filter.productId,omitempty"` 70 + 71 + // FilterBrand The brand name of the product(s) you want returned. When using this filter, only products by that brand are returned. Brand names are case-sensitive, and lists must be pipe-separated. 72 + FilterBrand *string `form:"filter.brand,omitempty" json:"filter.brand,omitempty"` 73 + 74 + // FilterFulfillment The available fulfillment types of the product(s) you want returned. Fulfillment types are case-sensitive, and lists must be comma-separated. Must be one or more of the follow types: ais - Available In Store, csp - Curbside Pickup, dth - Delivery To Home, sth - Ship To Home 75 + FilterFulfillment *string `form:"filter.fulfillment,omitempty" json:"filter.fulfillment,omitempty"` 76 + 77 + // FilterStart The number of products you want to skip. 78 + FilterStart *string `form:"filter.start,omitempty" json:"filter.start,omitempty"` 79 + 80 + // FilterLimit The number of products you want returned. 81 + FilterLimit *string `form:"filter.limit,omitempty" json:"filter.limit,omitempty"` 82 + } 83 + 84 + // ProductDetailsParams defines parameters for ProductDetails. 85 + type ProductDetailsParams struct { 86 + // FilterLocationId The locationId of the store you want results limited to. When using this filter, only products available at that location are returned. 87 + FilterLocationId *string `form:"filter.locationId,omitempty" json:"filter.locationId,omitempty"` 88 + } 89 + 90 + // AddToCartJSONRequestBody defines body for AddToCart for application/json ContentType. 91 + type AddToCartJSONRequestBody AddToCartJSONBody 92 + 93 + // RequestEditorFn is the function signature for the RequestEditor callback function 94 + type RequestEditorFn func(ctx context.Context, req *http.Request) error 95 + 96 + // Doer performs HTTP requests. 97 + // 98 + // The standard http.Client implements this interface. 99 + type HttpRequestDoer interface { 100 + Do(req *http.Request) (*http.Response, error) 101 + } 102 + 103 + // Client which conforms to the OpenAPI3 specification for this service. 104 + type Client struct { 105 + // The endpoint of the server conforming to this interface, with scheme, 106 + // https://api.deepmap.com for example. This can contain a path relative 107 + // to the server, such as https://api.deepmap.com/dev-test, and all the 108 + // paths in the swagger spec will be appended to the server. 109 + Server string 110 + 111 + // Doer for performing requests, typically a *http.Client with any 112 + // customized settings, such as certificate chains. 113 + Client HttpRequestDoer 114 + 115 + // A list of callbacks for modifying requests which are generated before sending over 116 + // the network. 117 + RequestEditors []RequestEditorFn 118 + } 119 + 120 + // ClientOption allows setting custom parameters during construction 121 + type ClientOption func(*Client) error 122 + 123 + // Creates a new Client, with reasonable defaults 124 + func NewClient(server string, opts ...ClientOption) (*Client, error) { 125 + // create a client with sane default values 126 + client := Client{ 127 + Server: server, 128 + } 129 + // mutate client and add all optional params 130 + for _, o := range opts { 131 + if err := o(&client); err != nil { 132 + return nil, err 133 + } 134 + } 135 + // ensure the server URL always has a trailing slash 136 + if !strings.HasSuffix(client.Server, "/") { 137 + client.Server += "/" 138 + } 139 + // create httpClient, if not already present 140 + if client.Client == nil { 141 + client.Client = &http.Client{} 142 + } 143 + return &client, nil 144 + } 145 + 146 + // WithHTTPClient allows overriding the default Doer, which is 147 + // automatically created using http.Client. This is useful for tests. 148 + func WithHTTPClient(doer HttpRequestDoer) ClientOption { 149 + return func(c *Client) error { 150 + c.Client = doer 151 + return nil 152 + } 153 + } 154 + 155 + // WithRequestEditorFn allows setting up a callback function, which will be 156 + // called right before sending the request. This can be used to mutate the request. 157 + func WithRequestEditorFn(fn RequestEditorFn) ClientOption { 158 + return func(c *Client) error { 159 + c.RequestEditors = append(c.RequestEditors, fn) 160 + return nil 161 + } 162 + } 163 + 164 + // The interface specification for the client above. 165 + type ClientInterface interface { 166 + // AddToCartWithBody request with any body 167 + AddToCartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) 168 + 169 + AddToCart(ctx context.Context, body AddToCartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) 170 + 171 + // ChainList request 172 + ChainList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) 173 + 174 + // ChainDetails request 175 + ChainDetails(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) 176 + 177 + // DepartmentList request 178 + DepartmentList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) 179 + 180 + // DepartmentDetails request 181 + DepartmentDetails(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) 182 + 183 + // UserProfileInformation request 184 + UserProfileInformation(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) 185 + 186 + // LocationList request 187 + LocationList(ctx context.Context, params *LocationListParams, reqEditors ...RequestEditorFn) (*http.Response, error) 188 + 189 + // LocationDetails request 190 + LocationDetails(ctx context.Context, locationId string, reqEditors ...RequestEditorFn) (*http.Response, error) 191 + 192 + // ProductSearch request 193 + ProductSearch(ctx context.Context, params *ProductSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error) 194 + 195 + // ProductDetails request 196 + ProductDetails(ctx context.Context, id string, params *ProductDetailsParams, reqEditors ...RequestEditorFn) (*http.Response, error) 197 + } 198 + 199 + func (c *Client) AddToCartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { 200 + req, err := NewAddToCartRequestWithBody(c.Server, contentType, body) 201 + if err != nil { 202 + return nil, err 203 + } 204 + req = req.WithContext(ctx) 205 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 206 + return nil, err 207 + } 208 + return c.Client.Do(req) 209 + } 210 + 211 + func (c *Client) AddToCart(ctx context.Context, body AddToCartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { 212 + req, err := NewAddToCartRequest(c.Server, body) 213 + if err != nil { 214 + return nil, err 215 + } 216 + req = req.WithContext(ctx) 217 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 218 + return nil, err 219 + } 220 + return c.Client.Do(req) 221 + } 222 + 223 + func (c *Client) ChainList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { 224 + req, err := NewChainListRequest(c.Server) 225 + if err != nil { 226 + return nil, err 227 + } 228 + req = req.WithContext(ctx) 229 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 230 + return nil, err 231 + } 232 + return c.Client.Do(req) 233 + } 234 + 235 + func (c *Client) ChainDetails(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error) { 236 + req, err := NewChainDetailsRequest(c.Server, name) 237 + if err != nil { 238 + return nil, err 239 + } 240 + req = req.WithContext(ctx) 241 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 242 + return nil, err 243 + } 244 + return c.Client.Do(req) 245 + } 246 + 247 + func (c *Client) DepartmentList(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { 248 + req, err := NewDepartmentListRequest(c.Server) 249 + if err != nil { 250 + return nil, err 251 + } 252 + req = req.WithContext(ctx) 253 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 254 + return nil, err 255 + } 256 + return c.Client.Do(req) 257 + } 258 + 259 + func (c *Client) DepartmentDetails(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { 260 + req, err := NewDepartmentDetailsRequest(c.Server, id) 261 + if err != nil { 262 + return nil, err 263 + } 264 + req = req.WithContext(ctx) 265 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 266 + return nil, err 267 + } 268 + return c.Client.Do(req) 269 + } 270 + 271 + func (c *Client) UserProfileInformation(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { 272 + req, err := NewUserProfileInformationRequest(c.Server) 273 + if err != nil { 274 + return nil, err 275 + } 276 + req = req.WithContext(ctx) 277 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 278 + return nil, err 279 + } 280 + return c.Client.Do(req) 281 + } 282 + 283 + func (c *Client) LocationList(ctx context.Context, params *LocationListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { 284 + req, err := NewLocationListRequest(c.Server, params) 285 + if err != nil { 286 + return nil, err 287 + } 288 + req = req.WithContext(ctx) 289 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 290 + return nil, err 291 + } 292 + return c.Client.Do(req) 293 + } 294 + 295 + func (c *Client) LocationDetails(ctx context.Context, locationId string, reqEditors ...RequestEditorFn) (*http.Response, error) { 296 + req, err := NewLocationDetailsRequest(c.Server, locationId) 297 + if err != nil { 298 + return nil, err 299 + } 300 + req = req.WithContext(ctx) 301 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 302 + return nil, err 303 + } 304 + return c.Client.Do(req) 305 + } 306 + 307 + func (c *Client) ProductSearch(ctx context.Context, params *ProductSearchParams, reqEditors ...RequestEditorFn) (*http.Response, error) { 308 + req, err := NewProductSearchRequest(c.Server, params) 309 + if err != nil { 310 + return nil, err 311 + } 312 + req = req.WithContext(ctx) 313 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 314 + return nil, err 315 + } 316 + return c.Client.Do(req) 317 + } 318 + 319 + func (c *Client) ProductDetails(ctx context.Context, id string, params *ProductDetailsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { 320 + req, err := NewProductDetailsRequest(c.Server, id, params) 321 + if err != nil { 322 + return nil, err 323 + } 324 + req = req.WithContext(ctx) 325 + if err := c.applyEditors(ctx, req, reqEditors); err != nil { 326 + return nil, err 327 + } 328 + return c.Client.Do(req) 329 + } 330 + 331 + // NewAddToCartRequest calls the generic AddToCart builder with application/json body 332 + func NewAddToCartRequest(server string, body AddToCartJSONRequestBody) (*http.Request, error) { 333 + var bodyReader io.Reader 334 + buf, err := json.Marshal(body) 335 + if err != nil { 336 + return nil, err 337 + } 338 + bodyReader = bytes.NewReader(buf) 339 + return NewAddToCartRequestWithBody(server, "application/json", bodyReader) 340 + } 341 + 342 + // NewAddToCartRequestWithBody generates requests for AddToCart with any type of body 343 + func NewAddToCartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { 344 + var err error 345 + 346 + serverURL, err := url.Parse(server) 347 + if err != nil { 348 + return nil, err 349 + } 350 + 351 + operationPath := fmt.Sprintf("/cart/add") 352 + if operationPath[0] == '/' { 353 + operationPath = "." + operationPath 354 + } 355 + 356 + queryURL, err := serverURL.Parse(operationPath) 357 + if err != nil { 358 + return nil, err 359 + } 360 + 361 + req, err := http.NewRequest("PUT", queryURL.String(), body) 362 + if err != nil { 363 + return nil, err 364 + } 365 + 366 + req.Header.Add("Content-Type", contentType) 367 + 368 + return req, nil 369 + } 370 + 371 + // NewChainListRequest generates requests for ChainList 372 + func NewChainListRequest(server string) (*http.Request, error) { 373 + var err error 374 + 375 + serverURL, err := url.Parse(server) 376 + if err != nil { 377 + return nil, err 378 + } 379 + 380 + operationPath := fmt.Sprintf("/chains") 381 + if operationPath[0] == '/' { 382 + operationPath = "." + operationPath 383 + } 384 + 385 + queryURL, err := serverURL.Parse(operationPath) 386 + if err != nil { 387 + return nil, err 388 + } 389 + 390 + req, err := http.NewRequest("GET", queryURL.String(), nil) 391 + if err != nil { 392 + return nil, err 393 + } 394 + 395 + return req, nil 396 + } 397 + 398 + // NewChainDetailsRequest generates requests for ChainDetails 399 + func NewChainDetailsRequest(server string, name string) (*http.Request, error) { 400 + var err error 401 + 402 + var pathParam0 string 403 + 404 + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "name", runtime.ParamLocationPath, name) 405 + if err != nil { 406 + return nil, err 407 + } 408 + 409 + serverURL, err := url.Parse(server) 410 + if err != nil { 411 + return nil, err 412 + } 413 + 414 + operationPath := fmt.Sprintf("/chains/%s", pathParam0) 415 + if operationPath[0] == '/' { 416 + operationPath = "." + operationPath 417 + } 418 + 419 + queryURL, err := serverURL.Parse(operationPath) 420 + if err != nil { 421 + return nil, err 422 + } 423 + 424 + req, err := http.NewRequest("GET", queryURL.String(), nil) 425 + if err != nil { 426 + return nil, err 427 + } 428 + 429 + return req, nil 430 + } 431 + 432 + // NewDepartmentListRequest generates requests for DepartmentList 433 + func NewDepartmentListRequest(server string) (*http.Request, error) { 434 + var err error 435 + 436 + serverURL, err := url.Parse(server) 437 + if err != nil { 438 + return nil, err 439 + } 440 + 441 + operationPath := fmt.Sprintf("/departments") 442 + if operationPath[0] == '/' { 443 + operationPath = "." + operationPath 444 + } 445 + 446 + queryURL, err := serverURL.Parse(operationPath) 447 + if err != nil { 448 + return nil, err 449 + } 450 + 451 + req, err := http.NewRequest("GET", queryURL.String(), nil) 452 + if err != nil { 453 + return nil, err 454 + } 455 + 456 + return req, nil 457 + } 458 + 459 + // NewDepartmentDetailsRequest generates requests for DepartmentDetails 460 + func NewDepartmentDetailsRequest(server string, id string) (*http.Request, error) { 461 + var err error 462 + 463 + var pathParam0 string 464 + 465 + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) 466 + if err != nil { 467 + return nil, err 468 + } 469 + 470 + serverURL, err := url.Parse(server) 471 + if err != nil { 472 + return nil, err 473 + } 474 + 475 + operationPath := fmt.Sprintf("/departments/%s", pathParam0) 476 + if operationPath[0] == '/' { 477 + operationPath = "." + operationPath 478 + } 479 + 480 + queryURL, err := serverURL.Parse(operationPath) 481 + if err != nil { 482 + return nil, err 483 + } 484 + 485 + req, err := http.NewRequest("GET", queryURL.String(), nil) 486 + if err != nil { 487 + return nil, err 488 + } 489 + 490 + return req, nil 491 + } 492 + 493 + // NewUserProfileInformationRequest generates requests for UserProfileInformation 494 + func NewUserProfileInformationRequest(server string) (*http.Request, error) { 495 + var err error 496 + 497 + serverURL, err := url.Parse(server) 498 + if err != nil { 499 + return nil, err 500 + } 501 + 502 + operationPath := fmt.Sprintf("/identity/profile") 503 + if operationPath[0] == '/' { 504 + operationPath = "." + operationPath 505 + } 506 + 507 + queryURL, err := serverURL.Parse(operationPath) 508 + if err != nil { 509 + return nil, err 510 + } 511 + 512 + req, err := http.NewRequest("GET", queryURL.String(), nil) 513 + if err != nil { 514 + return nil, err 515 + } 516 + 517 + return req, nil 518 + } 519 + 520 + // NewLocationListRequest generates requests for LocationList 521 + func NewLocationListRequest(server string, params *LocationListParams) (*http.Request, error) { 522 + var err error 523 + 524 + serverURL, err := url.Parse(server) 525 + if err != nil { 526 + return nil, err 527 + } 528 + 529 + operationPath := fmt.Sprintf("/locations") 530 + if operationPath[0] == '/' { 531 + operationPath = "." + operationPath 532 + } 533 + 534 + queryURL, err := serverURL.Parse(operationPath) 535 + if err != nil { 536 + return nil, err 537 + } 538 + 539 + if params != nil { 540 + queryValues := queryURL.Query() 541 + 542 + if params.FilterZipCodeNear != nil { 543 + 544 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.zipCode.near", runtime.ParamLocationQuery, *params.FilterZipCodeNear); err != nil { 545 + return nil, err 546 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 547 + return nil, err 548 + } else { 549 + for k, v := range parsed { 550 + for _, v2 := range v { 551 + queryValues.Add(k, v2) 552 + } 553 + } 554 + } 555 + 556 + } 557 + 558 + if params.FilterLatLongNear != nil { 559 + 560 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.latLong.near", runtime.ParamLocationQuery, *params.FilterLatLongNear); err != nil { 561 + return nil, err 562 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 563 + return nil, err 564 + } else { 565 + for k, v := range parsed { 566 + for _, v2 := range v { 567 + queryValues.Add(k, v2) 568 + } 569 + } 570 + } 571 + 572 + } 573 + 574 + if params.FilterLatNear != nil { 575 + 576 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.lat.near", runtime.ParamLocationQuery, *params.FilterLatNear); err != nil { 577 + return nil, err 578 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 579 + return nil, err 580 + } else { 581 + for k, v := range parsed { 582 + for _, v2 := range v { 583 + queryValues.Add(k, v2) 584 + } 585 + } 586 + } 587 + 588 + } 589 + 590 + if params.FilterLonNear != nil { 591 + 592 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.lon.near", runtime.ParamLocationQuery, *params.FilterLonNear); err != nil { 593 + return nil, err 594 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 595 + return nil, err 596 + } else { 597 + for k, v := range parsed { 598 + for _, v2 := range v { 599 + queryValues.Add(k, v2) 600 + } 601 + } 602 + } 603 + 604 + } 605 + 606 + if params.FilterRadiusInMiles != nil { 607 + 608 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.radiusInMiles", runtime.ParamLocationQuery, *params.FilterRadiusInMiles); err != nil { 609 + return nil, err 610 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 611 + return nil, err 612 + } else { 613 + for k, v := range parsed { 614 + for _, v2 := range v { 615 + queryValues.Add(k, v2) 616 + } 617 + } 618 + } 619 + 620 + } 621 + 622 + if params.FilterLimit != nil { 623 + 624 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.limit", runtime.ParamLocationQuery, *params.FilterLimit); err != nil { 625 + return nil, err 626 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 627 + return nil, err 628 + } else { 629 + for k, v := range parsed { 630 + for _, v2 := range v { 631 + queryValues.Add(k, v2) 632 + } 633 + } 634 + } 635 + 636 + } 637 + 638 + if params.FilterChain != nil { 639 + 640 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.chain", runtime.ParamLocationQuery, *params.FilterChain); err != nil { 641 + return nil, err 642 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 643 + return nil, err 644 + } else { 645 + for k, v := range parsed { 646 + for _, v2 := range v { 647 + queryValues.Add(k, v2) 648 + } 649 + } 650 + } 651 + 652 + } 653 + 654 + if params.FilterDepartment != nil { 655 + 656 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.department", runtime.ParamLocationQuery, *params.FilterDepartment); err != nil { 657 + return nil, err 658 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 659 + return nil, err 660 + } else { 661 + for k, v := range parsed { 662 + for _, v2 := range v { 663 + queryValues.Add(k, v2) 664 + } 665 + } 666 + } 667 + 668 + } 669 + 670 + queryURL.RawQuery = queryValues.Encode() 671 + } 672 + 673 + req, err := http.NewRequest("GET", queryURL.String(), nil) 674 + if err != nil { 675 + return nil, err 676 + } 677 + 678 + return req, nil 679 + } 680 + 681 + // NewLocationDetailsRequest generates requests for LocationDetails 682 + func NewLocationDetailsRequest(server string, locationId string) (*http.Request, error) { 683 + var err error 684 + 685 + var pathParam0 string 686 + 687 + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "locationId", runtime.ParamLocationPath, locationId) 688 + if err != nil { 689 + return nil, err 690 + } 691 + 692 + serverURL, err := url.Parse(server) 693 + if err != nil { 694 + return nil, err 695 + } 696 + 697 + operationPath := fmt.Sprintf("/locations/%s", pathParam0) 698 + if operationPath[0] == '/' { 699 + operationPath = "." + operationPath 700 + } 701 + 702 + queryURL, err := serverURL.Parse(operationPath) 703 + if err != nil { 704 + return nil, err 705 + } 706 + 707 + req, err := http.NewRequest("GET", queryURL.String(), nil) 708 + if err != nil { 709 + return nil, err 710 + } 711 + 712 + return req, nil 713 + } 714 + 715 + // NewProductSearchRequest generates requests for ProductSearch 716 + func NewProductSearchRequest(server string, params *ProductSearchParams) (*http.Request, error) { 717 + var err error 718 + 719 + serverURL, err := url.Parse(server) 720 + if err != nil { 721 + return nil, err 722 + } 723 + 724 + operationPath := fmt.Sprintf("/products") 725 + if operationPath[0] == '/' { 726 + operationPath = "." + operationPath 727 + } 728 + 729 + queryURL, err := serverURL.Parse(operationPath) 730 + if err != nil { 731 + return nil, err 732 + } 733 + 734 + if params != nil { 735 + queryValues := queryURL.Query() 736 + 737 + if params.FilterTerm != nil { 738 + 739 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.term", runtime.ParamLocationQuery, *params.FilterTerm); err != nil { 740 + return nil, err 741 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 742 + return nil, err 743 + } else { 744 + for k, v := range parsed { 745 + for _, v2 := range v { 746 + queryValues.Add(k, v2) 747 + } 748 + } 749 + } 750 + 751 + } 752 + 753 + if params.FilterLocationId != nil { 754 + 755 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.locationId", runtime.ParamLocationQuery, *params.FilterLocationId); err != nil { 756 + return nil, err 757 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 758 + return nil, err 759 + } else { 760 + for k, v := range parsed { 761 + for _, v2 := range v { 762 + queryValues.Add(k, v2) 763 + } 764 + } 765 + } 766 + 767 + } 768 + 769 + if params.FilterProductId != nil { 770 + 771 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.productId", runtime.ParamLocationQuery, *params.FilterProductId); err != nil { 772 + return nil, err 773 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 774 + return nil, err 775 + } else { 776 + for k, v := range parsed { 777 + for _, v2 := range v { 778 + queryValues.Add(k, v2) 779 + } 780 + } 781 + } 782 + 783 + } 784 + 785 + if params.FilterBrand != nil { 786 + 787 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.brand", runtime.ParamLocationQuery, *params.FilterBrand); err != nil { 788 + return nil, err 789 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 790 + return nil, err 791 + } else { 792 + for k, v := range parsed { 793 + for _, v2 := range v { 794 + queryValues.Add(k, v2) 795 + } 796 + } 797 + } 798 + 799 + } 800 + 801 + if params.FilterFulfillment != nil { 802 + 803 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.fulfillment", runtime.ParamLocationQuery, *params.FilterFulfillment); err != nil { 804 + return nil, err 805 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 806 + return nil, err 807 + } else { 808 + for k, v := range parsed { 809 + for _, v2 := range v { 810 + queryValues.Add(k, v2) 811 + } 812 + } 813 + } 814 + 815 + } 816 + 817 + if params.FilterStart != nil { 818 + 819 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.start", runtime.ParamLocationQuery, *params.FilterStart); err != nil { 820 + return nil, err 821 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 822 + return nil, err 823 + } else { 824 + for k, v := range parsed { 825 + for _, v2 := range v { 826 + queryValues.Add(k, v2) 827 + } 828 + } 829 + } 830 + 831 + } 832 + 833 + if params.FilterLimit != nil { 834 + 835 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.limit", runtime.ParamLocationQuery, *params.FilterLimit); err != nil { 836 + return nil, err 837 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 838 + return nil, err 839 + } else { 840 + for k, v := range parsed { 841 + for _, v2 := range v { 842 + queryValues.Add(k, v2) 843 + } 844 + } 845 + } 846 + 847 + } 848 + 849 + queryURL.RawQuery = queryValues.Encode() 850 + } 851 + 852 + req, err := http.NewRequest("GET", queryURL.String(), nil) 853 + if err != nil { 854 + return nil, err 855 + } 856 + 857 + return req, nil 858 + } 859 + 860 + // NewProductDetailsRequest generates requests for ProductDetails 861 + func NewProductDetailsRequest(server string, id string, params *ProductDetailsParams) (*http.Request, error) { 862 + var err error 863 + 864 + var pathParam0 string 865 + 866 + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "id", runtime.ParamLocationPath, id) 867 + if err != nil { 868 + return nil, err 869 + } 870 + 871 + serverURL, err := url.Parse(server) 872 + if err != nil { 873 + return nil, err 874 + } 875 + 876 + operationPath := fmt.Sprintf("/products/%s", pathParam0) 877 + if operationPath[0] == '/' { 878 + operationPath = "." + operationPath 879 + } 880 + 881 + queryURL, err := serverURL.Parse(operationPath) 882 + if err != nil { 883 + return nil, err 884 + } 885 + 886 + if params != nil { 887 + queryValues := queryURL.Query() 888 + 889 + if params.FilterLocationId != nil { 890 + 891 + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "filter.locationId", runtime.ParamLocationQuery, *params.FilterLocationId); err != nil { 892 + return nil, err 893 + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { 894 + return nil, err 895 + } else { 896 + for k, v := range parsed { 897 + for _, v2 := range v { 898 + queryValues.Add(k, v2) 899 + } 900 + } 901 + } 902 + 903 + } 904 + 905 + queryURL.RawQuery = queryValues.Encode() 906 + } 907 + 908 + req, err := http.NewRequest("GET", queryURL.String(), nil) 909 + if err != nil { 910 + return nil, err 911 + } 912 + 913 + return req, nil 914 + } 915 + 916 + func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { 917 + for _, r := range c.RequestEditors { 918 + if err := r(ctx, req); err != nil { 919 + return err 920 + } 921 + } 922 + for _, r := range additionalEditors { 923 + if err := r(ctx, req); err != nil { 924 + return err 925 + } 926 + } 927 + return nil 928 + } 929 + 930 + // ClientWithResponses builds on ClientInterface to offer response payloads 931 + type ClientWithResponses struct { 932 + ClientInterface 933 + } 934 + 935 + // NewClientWithResponses creates a new ClientWithResponses, which wraps 936 + // Client with return type handling 937 + func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) { 938 + client, err := NewClient(server, opts...) 939 + if err != nil { 940 + return nil, err 941 + } 942 + return &ClientWithResponses{client}, nil 943 + } 944 + 945 + // WithBaseURL overrides the baseURL. 946 + func WithBaseURL(baseURL string) ClientOption { 947 + return func(c *Client) error { 948 + newBaseURL, err := url.Parse(baseURL) 949 + if err != nil { 950 + return err 951 + } 952 + c.Server = newBaseURL.String() 953 + return nil 954 + } 955 + } 956 + 957 + // ClientWithResponsesInterface is the interface specification for the client with responses above. 958 + type ClientWithResponsesInterface interface { 959 + // AddToCartWithBodyWithResponse request with any body 960 + AddToCartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddToCartResponse, error) 961 + 962 + AddToCartWithResponse(ctx context.Context, body AddToCartJSONRequestBody, reqEditors ...RequestEditorFn) (*AddToCartResponse, error) 963 + 964 + // ChainListWithResponse request 965 + ChainListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ChainListResponse, error) 966 + 967 + // ChainDetailsWithResponse request 968 + ChainDetailsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ChainDetailsResponse, error) 969 + 970 + // DepartmentListWithResponse request 971 + DepartmentListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DepartmentListResponse, error) 972 + 973 + // DepartmentDetailsWithResponse request 974 + DepartmentDetailsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DepartmentDetailsResponse, error) 975 + 976 + // UserProfileInformationWithResponse request 977 + UserProfileInformationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserProfileInformationResponse, error) 978 + 979 + // LocationListWithResponse request 980 + LocationListWithResponse(ctx context.Context, params *LocationListParams, reqEditors ...RequestEditorFn) (*LocationListResponse, error) 981 + 982 + // LocationDetailsWithResponse request 983 + LocationDetailsWithResponse(ctx context.Context, locationId string, reqEditors ...RequestEditorFn) (*LocationDetailsResponse, error) 984 + 985 + // ProductSearchWithResponse request 986 + ProductSearchWithResponse(ctx context.Context, params *ProductSearchParams, reqEditors ...RequestEditorFn) (*ProductSearchResponse, error) 987 + 988 + // ProductDetailsWithResponse request 989 + ProductDetailsWithResponse(ctx context.Context, id string, params *ProductDetailsParams, reqEditors ...RequestEditorFn) (*ProductDetailsResponse, error) 990 + } 991 + 992 + type AddToCartResponse struct { 993 + Body []byte 994 + HTTPResponse *http.Response 995 + JSON400 *struct { 996 + Errors *string `json:"errors,omitempty"` 997 + } 998 + JSON401 *struct { 999 + Errors *struct { 1000 + Error *string `json:"error,omitempty"` 1001 + ErrorDescription *string `json:"error_description,omitempty"` 1002 + } `json:"errors,omitempty"` 1003 + } 1004 + JSON500 *struct { 1005 + Errors *struct { 1006 + Code *string `json:"code,omitempty"` 1007 + Reason *string `json:"reason,omitempty"` 1008 + Timestamp *float32 `json:"timestamp,omitempty"` 1009 + } `json:"errors,omitempty"` 1010 + } 1011 + } 1012 + 1013 + // Status returns HTTPResponse.Status 1014 + func (r AddToCartResponse) Status() string { 1015 + if r.HTTPResponse != nil { 1016 + return r.HTTPResponse.Status 1017 + } 1018 + return http.StatusText(0) 1019 + } 1020 + 1021 + // StatusCode returns HTTPResponse.StatusCode 1022 + func (r AddToCartResponse) StatusCode() int { 1023 + if r.HTTPResponse != nil { 1024 + return r.HTTPResponse.StatusCode 1025 + } 1026 + return 0 1027 + } 1028 + 1029 + type ChainListResponse struct { 1030 + Body []byte 1031 + HTTPResponse *http.Response 1032 + JSON200 *struct { 1033 + Data *[]struct { 1034 + DivisionNumbers *[]string `json:"divisionNumbers,omitempty"` 1035 + Name *string `json:"name,omitempty"` 1036 + } `json:"data,omitempty"` 1037 + Meta *struct { 1038 + Pagination *struct { 1039 + Limit *float32 `json:"limit,omitempty"` 1040 + Start *float32 `json:"start,omitempty"` 1041 + Total *float32 `json:"total,omitempty"` 1042 + } `json:"pagination,omitempty"` 1043 + Warnings *[]string `json:"warnings,omitempty"` 1044 + } `json:"meta,omitempty"` 1045 + } 1046 + JSON400 *struct { 1047 + Errors *string `json:"errors,omitempty"` 1048 + } 1049 + JSON401 *struct { 1050 + Errors *struct { 1051 + Error *string `json:"error,omitempty"` 1052 + ErrorDescription *string `json:"error_description,omitempty"` 1053 + } `json:"errors,omitempty"` 1054 + } 1055 + JSON500 *struct { 1056 + Errors *struct { 1057 + Code *string `json:"code,omitempty"` 1058 + Reason *string `json:"reason,omitempty"` 1059 + Timestamp *float32 `json:"timestamp,omitempty"` 1060 + } `json:"errors,omitempty"` 1061 + } 1062 + } 1063 + 1064 + // Status returns HTTPResponse.Status 1065 + func (r ChainListResponse) Status() string { 1066 + if r.HTTPResponse != nil { 1067 + return r.HTTPResponse.Status 1068 + } 1069 + return http.StatusText(0) 1070 + } 1071 + 1072 + // StatusCode returns HTTPResponse.StatusCode 1073 + func (r ChainListResponse) StatusCode() int { 1074 + if r.HTTPResponse != nil { 1075 + return r.HTTPResponse.StatusCode 1076 + } 1077 + return 0 1078 + } 1079 + 1080 + type ChainDetailsResponse struct { 1081 + Body []byte 1082 + HTTPResponse *http.Response 1083 + JSON200 *struct { 1084 + Data *struct { 1085 + DivisionNumbers *[]string `json:"divisionNumbers,omitempty"` 1086 + Name *string `json:"name,omitempty"` 1087 + } `json:"data,omitempty"` 1088 + Meta *map[string]interface{} `json:"meta,omitempty"` 1089 + } 1090 + JSON401 *struct { 1091 + Errors *struct { 1092 + Error *string `json:"error,omitempty"` 1093 + ErrorDescription *string `json:"error_description,omitempty"` 1094 + } `json:"errors,omitempty"` 1095 + } 1096 + JSON500 *struct { 1097 + Errors *struct { 1098 + Code *string `json:"code,omitempty"` 1099 + Reason *string `json:"reason,omitempty"` 1100 + Timestamp *float32 `json:"timestamp,omitempty"` 1101 + } `json:"errors,omitempty"` 1102 + } 1103 + } 1104 + 1105 + // Status returns HTTPResponse.Status 1106 + func (r ChainDetailsResponse) Status() string { 1107 + if r.HTTPResponse != nil { 1108 + return r.HTTPResponse.Status 1109 + } 1110 + return http.StatusText(0) 1111 + } 1112 + 1113 + // StatusCode returns HTTPResponse.StatusCode 1114 + func (r ChainDetailsResponse) StatusCode() int { 1115 + if r.HTTPResponse != nil { 1116 + return r.HTTPResponse.StatusCode 1117 + } 1118 + return 0 1119 + } 1120 + 1121 + type DepartmentListResponse struct { 1122 + Body []byte 1123 + HTTPResponse *http.Response 1124 + JSON200 *struct { 1125 + Data *[]struct { 1126 + DepartmentId *string `json:"departmentId,omitempty"` 1127 + Name *string `json:"name,omitempty"` 1128 + } `json:"data,omitempty"` 1129 + Meta *struct { 1130 + Pagination *struct { 1131 + Limit *float32 `json:"limit,omitempty"` 1132 + Start *float32 `json:"start,omitempty"` 1133 + Total *float32 `json:"total,omitempty"` 1134 + } `json:"pagination,omitempty"` 1135 + Warnings *[]string `json:"warnings,omitempty"` 1136 + } `json:"meta,omitempty"` 1137 + } 1138 + JSON401 *struct { 1139 + Errors *struct { 1140 + Error *string `json:"error,omitempty"` 1141 + ErrorDescription *string `json:"error_description,omitempty"` 1142 + } `json:"errors,omitempty"` 1143 + } 1144 + JSON500 *struct { 1145 + Errors *struct { 1146 + Code *string `json:"code,omitempty"` 1147 + Reason *string `json:"reason,omitempty"` 1148 + Timestamp *float32 `json:"timestamp,omitempty"` 1149 + } `json:"errors,omitempty"` 1150 + } 1151 + } 1152 + 1153 + // Status returns HTTPResponse.Status 1154 + func (r DepartmentListResponse) Status() string { 1155 + if r.HTTPResponse != nil { 1156 + return r.HTTPResponse.Status 1157 + } 1158 + return http.StatusText(0) 1159 + } 1160 + 1161 + // StatusCode returns HTTPResponse.StatusCode 1162 + func (r DepartmentListResponse) StatusCode() int { 1163 + if r.HTTPResponse != nil { 1164 + return r.HTTPResponse.StatusCode 1165 + } 1166 + return 0 1167 + } 1168 + 1169 + type DepartmentDetailsResponse struct { 1170 + Body []byte 1171 + HTTPResponse *http.Response 1172 + JSON200 *struct { 1173 + Data *struct { 1174 + DepartmentId *string `json:"departmentId,omitempty"` 1175 + Name *string `json:"name,omitempty"` 1176 + } `json:"data,omitempty"` 1177 + Meta *map[string]interface{} `json:"meta,omitempty"` 1178 + } 1179 + JSON400 *struct { 1180 + Errors *struct { 1181 + Code *string `json:"code,omitempty"` 1182 + Reason *string `json:"reason,omitempty"` 1183 + Timestamp *float32 `json:"timestamp,omitempty"` 1184 + } `json:"errors,omitempty"` 1185 + } 1186 + JSON401 *struct { 1187 + Errors *struct { 1188 + Error *string `json:"error,omitempty"` 1189 + ErrorDescription *string `json:"error_description,omitempty"` 1190 + } `json:"errors,omitempty"` 1191 + } 1192 + JSON500 *struct { 1193 + Errors *struct { 1194 + Code *string `json:"code,omitempty"` 1195 + Reason *string `json:"reason,omitempty"` 1196 + Timestamp *float32 `json:"timestamp,omitempty"` 1197 + } `json:"errors,omitempty"` 1198 + } 1199 + } 1200 + 1201 + // Status returns HTTPResponse.Status 1202 + func (r DepartmentDetailsResponse) Status() string { 1203 + if r.HTTPResponse != nil { 1204 + return r.HTTPResponse.Status 1205 + } 1206 + return http.StatusText(0) 1207 + } 1208 + 1209 + // StatusCode returns HTTPResponse.StatusCode 1210 + func (r DepartmentDetailsResponse) StatusCode() int { 1211 + if r.HTTPResponse != nil { 1212 + return r.HTTPResponse.StatusCode 1213 + } 1214 + return 0 1215 + } 1216 + 1217 + type UserProfileInformationResponse struct { 1218 + Body []byte 1219 + HTTPResponse *http.Response 1220 + JSON200 *struct { 1221 + Data *struct { 1222 + Id *map[string]interface{} `json:"id,omitempty"` 1223 + } `json:"data,omitempty"` 1224 + Meta *struct { 1225 + Pagination *struct { 1226 + Limit *float32 `json:"limit,omitempty"` 1227 + Start *float32 `json:"start,omitempty"` 1228 + Total *float32 `json:"total,omitempty"` 1229 + } `json:"pagination,omitempty"` 1230 + Warnings *[]string `json:"warnings,omitempty"` 1231 + } `json:"meta,omitempty"` 1232 + } 1233 + JSON401 *struct { 1234 + Errors *struct { 1235 + Error *string `json:"error,omitempty"` 1236 + ErrorDescription *string `json:"error_description,omitempty"` 1237 + } `json:"errors,omitempty"` 1238 + } 1239 + JSON403 *struct { 1240 + Errors *struct { 1241 + Code *string `json:"code,omitempty"` 1242 + Reason *string `json:"reason,omitempty"` 1243 + Timestamp *float32 `json:"timestamp,omitempty"` 1244 + } `json:"errors,omitempty"` 1245 + } 1246 + JSON500 *struct { 1247 + Errors *struct { 1248 + Code *string `json:"code,omitempty"` 1249 + Reason *string `json:"reason,omitempty"` 1250 + Timestamp *float32 `json:"timestamp,omitempty"` 1251 + } `json:"errors,omitempty"` 1252 + } 1253 + } 1254 + 1255 + // Status returns HTTPResponse.Status 1256 + func (r UserProfileInformationResponse) Status() string { 1257 + if r.HTTPResponse != nil { 1258 + return r.HTTPResponse.Status 1259 + } 1260 + return http.StatusText(0) 1261 + } 1262 + 1263 + // StatusCode returns HTTPResponse.StatusCode 1264 + func (r UserProfileInformationResponse) StatusCode() int { 1265 + if r.HTTPResponse != nil { 1266 + return r.HTTPResponse.StatusCode 1267 + } 1268 + return 0 1269 + } 1270 + 1271 + type LocationListResponse struct { 1272 + Body []byte 1273 + HTTPResponse *http.Response 1274 + JSON200 *struct { 1275 + Data *[]struct { 1276 + Address *struct { 1277 + AddressLine1 *string `json:"addressLine1,omitempty"` 1278 + AddressLine2 *string `json:"addressLine2,omitempty"` 1279 + City *string `json:"city,omitempty"` 1280 + County *string `json:"county,omitempty"` 1281 + State *string `json:"state,omitempty"` 1282 + ZipCode *string `json:"zipCode,omitempty"` 1283 + } `json:"address,omitempty"` 1284 + Chain *string `json:"chain,omitempty"` 1285 + Departments *[]struct { 1286 + DepartmentId *string `json:"departmentId,omitempty"` 1287 + Hours *struct { 1288 + Open24 *bool `json:"Open24,omitempty"` 1289 + Friday *struct { 1290 + Close *string `json:"close,omitempty"` 1291 + Open *string `json:"open,omitempty"` 1292 + Open24 *bool `json:"open24,omitempty"` 1293 + } `json:"friday,omitempty"` 1294 + Monday *struct { 1295 + Close *string `json:"close,omitempty"` 1296 + Open *string `json:"open,omitempty"` 1297 + Open24 *bool `json:"open24,omitempty"` 1298 + } `json:"monday,omitempty"` 1299 + Saturday *struct { 1300 + Close *string `json:"close,omitempty"` 1301 + Open *string `json:"open,omitempty"` 1302 + Open24 *bool `json:"open24,omitempty"` 1303 + } `json:"saturday,omitempty"` 1304 + Sunday *struct { 1305 + Close *string `json:"close,omitempty"` 1306 + Open *string `json:"open,omitempty"` 1307 + Open24 *bool `json:"open24,omitempty"` 1308 + } `json:"sunday,omitempty"` 1309 + Thursday *struct { 1310 + Close *string `json:"close,omitempty"` 1311 + Open *string `json:"open,omitempty"` 1312 + Open24 *bool `json:"open24,omitempty"` 1313 + } `json:"thursday,omitempty"` 1314 + Tuesday *struct { 1315 + Close *string `json:"close,omitempty"` 1316 + Open *string `json:"open,omitempty"` 1317 + Open24 *bool `json:"open24,omitempty"` 1318 + } `json:"tuesday,omitempty"` 1319 + Wednesday *struct { 1320 + Close *string `json:"close,omitempty"` 1321 + Open *string `json:"open,omitempty"` 1322 + Open24 *bool `json:"open24,omitempty"` 1323 + } `json:"wednesday,omitempty"` 1324 + } `json:"hours,omitempty"` 1325 + Name *string `json:"name,omitempty"` 1326 + Phone *string `json:"phone,omitempty"` 1327 + } `json:"departments,omitempty"` 1328 + DivisionNumber *string `json:"divisionNumber,omitempty"` 1329 + Geolocation *struct { 1330 + LatLng *string `json:"latLng,omitempty"` 1331 + Latitude *float32 `json:"latitude,omitempty"` 1332 + Longitude *float32 `json:"longitude,omitempty"` 1333 + } `json:"geolocation,omitempty"` 1334 + Hours *struct { 1335 + Open24 *bool `json:"Open24,omitempty"` 1336 + Friday *struct { 1337 + Close *string `json:"close,omitempty"` 1338 + Open *string `json:"open,omitempty"` 1339 + Open24 *bool `json:"open24,omitempty"` 1340 + } `json:"friday,omitempty"` 1341 + GmtOffset *string `json:"gmtOffset,omitempty"` 1342 + Monday *struct { 1343 + Close *string `json:"close,omitempty"` 1344 + Open *string `json:"open,omitempty"` 1345 + Open24 *bool `json:"open24,omitempty"` 1346 + } `json:"monday,omitempty"` 1347 + Saturday *struct { 1348 + Close *string `json:"close,omitempty"` 1349 + Open *string `json:"open,omitempty"` 1350 + Open24 *bool `json:"open24,omitempty"` 1351 + } `json:"saturday,omitempty"` 1352 + Sunday *struct { 1353 + Close *string `json:"close,omitempty"` 1354 + Open *string `json:"open,omitempty"` 1355 + Open24 *bool `json:"open24,omitempty"` 1356 + } `json:"sunday,omitempty"` 1357 + Thursday *struct { 1358 + Close *string `json:"close,omitempty"` 1359 + Open *string `json:"open,omitempty"` 1360 + Open24 *bool `json:"open24,omitempty"` 1361 + } `json:"thursday,omitempty"` 1362 + Timezone *string `json:"timezone,omitempty"` 1363 + Tuesday *struct { 1364 + Close *string `json:"close,omitempty"` 1365 + Open *string `json:"open,omitempty"` 1366 + Open24 *bool `json:"open24,omitempty"` 1367 + } `json:"tuesday,omitempty"` 1368 + Wednesday *struct { 1369 + Close *string `json:"close,omitempty"` 1370 + Open *string `json:"open,omitempty"` 1371 + Open24 *bool `json:"open24,omitempty"` 1372 + } `json:"wednesday,omitempty"` 1373 + } `json:"hours,omitempty"` 1374 + LocationId *string `json:"locationId,omitempty"` 1375 + Name *string `json:"name,omitempty"` 1376 + Phone *string `json:"phone,omitempty"` 1377 + StoreNumber *string `json:"storeNumber,omitempty"` 1378 + } `json:"data,omitempty"` 1379 + Meta *struct { 1380 + Pagination *struct { 1381 + Limit *float32 `json:"limit,omitempty"` 1382 + Start *float32 `json:"start,omitempty"` 1383 + Total *float32 `json:"total,omitempty"` 1384 + } `json:"pagination,omitempty"` 1385 + Warnings *[]string `json:"warnings,omitempty"` 1386 + } `json:"meta,omitempty"` 1387 + } 1388 + JSON400 *struct { 1389 + Errors *string `json:"errors,omitempty"` 1390 + } 1391 + JSON401 *struct { 1392 + Errors *struct { 1393 + Error *string `json:"error,omitempty"` 1394 + ErrorDescription *string `json:"error_description,omitempty"` 1395 + } `json:"errors,omitempty"` 1396 + } 1397 + JSON500 *struct { 1398 + Errors *struct { 1399 + Code *string `json:"code,omitempty"` 1400 + Reason *string `json:"reason,omitempty"` 1401 + Timestamp *float32 `json:"timestamp,omitempty"` 1402 + } `json:"errors,omitempty"` 1403 + } 1404 + } 1405 + 1406 + // Status returns HTTPResponse.Status 1407 + func (r LocationListResponse) Status() string { 1408 + if r.HTTPResponse != nil { 1409 + return r.HTTPResponse.Status 1410 + } 1411 + return http.StatusText(0) 1412 + } 1413 + 1414 + // StatusCode returns HTTPResponse.StatusCode 1415 + func (r LocationListResponse) StatusCode() int { 1416 + if r.HTTPResponse != nil { 1417 + return r.HTTPResponse.StatusCode 1418 + } 1419 + return 0 1420 + } 1421 + 1422 + type LocationDetailsResponse struct { 1423 + Body []byte 1424 + HTTPResponse *http.Response 1425 + JSON200 *struct { 1426 + Data *struct { 1427 + Address *struct { 1428 + AddressLine1 *string `json:"addressLine1,omitempty"` 1429 + AddressLine2 *string `json:"addressLine2,omitempty"` 1430 + City *string `json:"city,omitempty"` 1431 + County *string `json:"county,omitempty"` 1432 + State *string `json:"state,omitempty"` 1433 + ZipCode *string `json:"zipCode,omitempty"` 1434 + } `json:"address,omitempty"` 1435 + Chain *string `json:"chain,omitempty"` 1436 + Departments *[]struct { 1437 + DepartmentId *string `json:"departmentId,omitempty"` 1438 + Hours *struct { 1439 + Open24 *bool `json:"Open24,omitempty"` 1440 + Friday *struct { 1441 + Close *string `json:"close,omitempty"` 1442 + Open *string `json:"open,omitempty"` 1443 + Open24 *bool `json:"open24,omitempty"` 1444 + } `json:"friday,omitempty"` 1445 + Monday *struct { 1446 + Close *string `json:"close,omitempty"` 1447 + Open *string `json:"open,omitempty"` 1448 + Open24 *bool `json:"open24,omitempty"` 1449 + } `json:"monday,omitempty"` 1450 + Saturday *struct { 1451 + Close *string `json:"close,omitempty"` 1452 + Open *string `json:"open,omitempty"` 1453 + Open24 *bool `json:"open24,omitempty"` 1454 + } `json:"saturday,omitempty"` 1455 + Sunday *struct { 1456 + Close *string `json:"close,omitempty"` 1457 + Open *string `json:"open,omitempty"` 1458 + Open24 *bool `json:"open24,omitempty"` 1459 + } `json:"sunday,omitempty"` 1460 + Thursday *struct { 1461 + Close *string `json:"close,omitempty"` 1462 + Open *string `json:"open,omitempty"` 1463 + Open24 *bool `json:"open24,omitempty"` 1464 + } `json:"thursday,omitempty"` 1465 + Tuesday *struct { 1466 + Close *string `json:"close,omitempty"` 1467 + Open *string `json:"open,omitempty"` 1468 + Open24 *bool `json:"open24,omitempty"` 1469 + } `json:"tuesday,omitempty"` 1470 + Wednesday *struct { 1471 + Close *string `json:"close,omitempty"` 1472 + Open *string `json:"open,omitempty"` 1473 + Open24 *bool `json:"open24,omitempty"` 1474 + } `json:"wednesday,omitempty"` 1475 + } `json:"hours,omitempty"` 1476 + Name *string `json:"name,omitempty"` 1477 + Phone *string `json:"phone,omitempty"` 1478 + } `json:"departments,omitempty"` 1479 + DivisionNumber *string `json:"divisionNumber,omitempty"` 1480 + Geolocation *struct { 1481 + LatLng *string `json:"latLng,omitempty"` 1482 + Latitude *float32 `json:"latitude,omitempty"` 1483 + Longitude *float32 `json:"longitude,omitempty"` 1484 + } `json:"geolocation,omitempty"` 1485 + Hours *struct { 1486 + Open24 *bool `json:"Open24,omitempty"` 1487 + Friday *struct { 1488 + Close *string `json:"close,omitempty"` 1489 + Open *string `json:"open,omitempty"` 1490 + Open24 *bool `json:"open24,omitempty"` 1491 + } `json:"friday,omitempty"` 1492 + GmtOffset *string `json:"gmtOffset,omitempty"` 1493 + Monday *struct { 1494 + Close *string `json:"close,omitempty"` 1495 + Open *string `json:"open,omitempty"` 1496 + Open24 *bool `json:"open24,omitempty"` 1497 + } `json:"monday,omitempty"` 1498 + Saturday *struct { 1499 + Close *string `json:"close,omitempty"` 1500 + Open *string `json:"open,omitempty"` 1501 + Open24 *bool `json:"open24,omitempty"` 1502 + } `json:"saturday,omitempty"` 1503 + Sunday *struct { 1504 + Close *string `json:"close,omitempty"` 1505 + Open *string `json:"open,omitempty"` 1506 + Open24 *bool `json:"open24,omitempty"` 1507 + } `json:"sunday,omitempty"` 1508 + Thursday *struct { 1509 + Close *string `json:"close,omitempty"` 1510 + Open *string `json:"open,omitempty"` 1511 + Open24 *bool `json:"open24,omitempty"` 1512 + } `json:"thursday,omitempty"` 1513 + Timezone *string `json:"timezone,omitempty"` 1514 + Tuesday *struct { 1515 + Close *string `json:"close,omitempty"` 1516 + Open *string `json:"open,omitempty"` 1517 + Open24 *bool `json:"open24,omitempty"` 1518 + } `json:"tuesday,omitempty"` 1519 + Wednesday *struct { 1520 + Close *string `json:"close,omitempty"` 1521 + Open *string `json:"open,omitempty"` 1522 + Open24 *bool `json:"open24,omitempty"` 1523 + } `json:"wednesday,omitempty"` 1524 + } `json:"hours,omitempty"` 1525 + LocationId *string `json:"locationId,omitempty"` 1526 + Name *string `json:"name,omitempty"` 1527 + Phone *string `json:"phone,omitempty"` 1528 + StoreNumber *string `json:"storeNumber,omitempty"` 1529 + } `json:"data,omitempty"` 1530 + Meta *struct { 1531 + Pagination *struct { 1532 + Limit *float32 `json:"limit,omitempty"` 1533 + Start *float32 `json:"start,omitempty"` 1534 + Total *float32 `json:"total,omitempty"` 1535 + } `json:"pagination,omitempty"` 1536 + Warnings *[]string `json:"warnings,omitempty"` 1537 + } `json:"meta,omitempty"` 1538 + } 1539 + JSON400 *struct { 1540 + Errors *struct { 1541 + Code *string `json:"code,omitempty"` 1542 + Reason *string `json:"reason,omitempty"` 1543 + Timestamp *float32 `json:"timestamp,omitempty"` 1544 + } `json:"errors,omitempty"` 1545 + } 1546 + JSON401 *struct { 1547 + Errors *struct { 1548 + Error *string `json:"error,omitempty"` 1549 + ErrorDescription *string `json:"error_description,omitempty"` 1550 + } `json:"errors,omitempty"` 1551 + } 1552 + JSON500 *struct { 1553 + Errors *struct { 1554 + Code *string `json:"code,omitempty"` 1555 + Reason *string `json:"reason,omitempty"` 1556 + Timestamp *float32 `json:"timestamp,omitempty"` 1557 + } `json:"errors,omitempty"` 1558 + } 1559 + } 1560 + 1561 + // Status returns HTTPResponse.Status 1562 + func (r LocationDetailsResponse) Status() string { 1563 + if r.HTTPResponse != nil { 1564 + return r.HTTPResponse.Status 1565 + } 1566 + return http.StatusText(0) 1567 + } 1568 + 1569 + // StatusCode returns HTTPResponse.StatusCode 1570 + func (r LocationDetailsResponse) StatusCode() int { 1571 + if r.HTTPResponse != nil { 1572 + return r.HTTPResponse.StatusCode 1573 + } 1574 + return 0 1575 + } 1576 + 1577 + type ProductSearchResponse struct { 1578 + Body []byte 1579 + HTTPResponse *http.Response 1580 + JSON200 *struct { 1581 + Data *[]struct { 1582 + AisleLocations *[]struct { 1583 + BayNumber *string `json:"bayNumber,omitempty"` 1584 + Description *string `json:"description,omitempty"` 1585 + Number *string `json:"number,omitempty"` 1586 + NumberOfFacings *string `json:"numberOfFacings,omitempty"` 1587 + SequenceNumber *string `json:"sequenceNumber,omitempty"` 1588 + ShelfNumber *string `json:"shelfNumber,omitempty"` 1589 + ShelfPositionInBay *string `json:"shelfPositionInBay,omitempty"` 1590 + Side *string `json:"side,omitempty"` 1591 + } `json:"aisleLocations,omitempty"` 1592 + Brand *string `json:"brand,omitempty"` 1593 + Categories *[]string `json:"categories,omitempty"` 1594 + CountryOrigin *string `json:"countryOrigin,omitempty"` 1595 + Description *string `json:"description,omitempty"` 1596 + Images *[]struct { 1597 + Default *bool `json:"default,omitempty"` 1598 + Type *string `json:"type,omitempty"` 1599 + } `json:"images,omitempty"` 1600 + ItemInformation *struct { 1601 + Depth *string `json:"depth,omitempty"` 1602 + Height *string `json:"height,omitempty"` 1603 + Width *string `json:"width,omitempty"` 1604 + } `json:"itemInformation,omitempty"` 1605 + Items *[]struct { 1606 + Favorite *bool `json:"favorite,omitempty"` 1607 + Fulfillment *struct { 1608 + Curbside *bool `json:"curbside,omitempty"` 1609 + Delivery *bool `json:"delivery,omitempty"` 1610 + } `json:"fulfillment,omitempty"` 1611 + Inventory *struct { 1612 + StockLevel *string `json:"stockLevel,omitempty"` 1613 + } `json:"inventory,omitempty"` 1614 + ItemId *string `json:"itemId,omitempty"` 1615 + Price *struct { 1616 + Promo *float32 `json:"promo,omitempty"` 1617 + Regular *float32 `json:"regular,omitempty"` 1618 + } `json:"price,omitempty"` 1619 + Size *string `json:"size,omitempty"` 1620 + } `json:"items,omitempty"` 1621 + ProductId *string `json:"productId,omitempty"` 1622 + Temperature *struct { 1623 + HeatSensitive *bool `json:"heatSensitive,omitempty"` 1624 + Indicator *string `json:"indicator,omitempty"` 1625 + } `json:"temperature,omitempty"` 1626 + Upc *string `json:"upc,omitempty"` 1627 + } `json:"data,omitempty"` 1628 + Meta *struct { 1629 + Pagination *struct { 1630 + Limit *float32 `json:"limit,omitempty"` 1631 + Start *float32 `json:"start,omitempty"` 1632 + Total *float32 `json:"total,omitempty"` 1633 + } `json:"pagination,omitempty"` 1634 + Warnings *[]string `json:"warnings,omitempty"` 1635 + } `json:"meta,omitempty"` 1636 + } 1637 + JSON400 *struct { 1638 + Errors *string `json:"errors,omitempty"` 1639 + } 1640 + JSON401 *struct { 1641 + Errors *struct { 1642 + Error *string `json:"error,omitempty"` 1643 + ErrorDescription *string `json:"error_description,omitempty"` 1644 + } `json:"errors,omitempty"` 1645 + } 1646 + JSON500 *struct { 1647 + Errors *struct { 1648 + Code *string `json:"code,omitempty"` 1649 + Reason *string `json:"reason,omitempty"` 1650 + Timestamp *float32 `json:"timestamp,omitempty"` 1651 + } `json:"errors,omitempty"` 1652 + } 1653 + } 1654 + 1655 + // Status returns HTTPResponse.Status 1656 + func (r ProductSearchResponse) Status() string { 1657 + if r.HTTPResponse != nil { 1658 + return r.HTTPResponse.Status 1659 + } 1660 + return http.StatusText(0) 1661 + } 1662 + 1663 + // StatusCode returns HTTPResponse.StatusCode 1664 + func (r ProductSearchResponse) StatusCode() int { 1665 + if r.HTTPResponse != nil { 1666 + return r.HTTPResponse.StatusCode 1667 + } 1668 + return 0 1669 + } 1670 + 1671 + type ProductDetailsResponse struct { 1672 + Body []byte 1673 + HTTPResponse *http.Response 1674 + JSON200 *struct { 1675 + Data *struct { 1676 + AisleLocations *[]struct { 1677 + BayNumber *string `json:"bayNumber,omitempty"` 1678 + Description *string `json:"description,omitempty"` 1679 + Number *string `json:"number,omitempty"` 1680 + NumberOfFacings *string `json:"numberOfFacings,omitempty"` 1681 + SequenceNumber *string `json:"sequenceNumber,omitempty"` 1682 + ShelfNumber *string `json:"shelfNumber,omitempty"` 1683 + ShelfPositionInBay *string `json:"shelfPositionInBay,omitempty"` 1684 + Side *string `json:"side,omitempty"` 1685 + } `json:"aisleLocations,omitempty"` 1686 + Brand *string `json:"brand,omitempty"` 1687 + Categories *[]string `json:"categories,omitempty"` 1688 + CountryOrigin *string `json:"countryOrigin,omitempty"` 1689 + Description *string `json:"description,omitempty"` 1690 + Images *[]struct { 1691 + Default *bool `json:"default,omitempty"` 1692 + Type *string `json:"type,omitempty"` 1693 + } `json:"images,omitempty"` 1694 + ItemInformation *struct { 1695 + Depth *string `json:"depth,omitempty"` 1696 + Height *string `json:"height,omitempty"` 1697 + Width *string `json:"width,omitempty"` 1698 + } `json:"itemInformation,omitempty"` 1699 + Items *[]struct { 1700 + Favorite *bool `json:"favorite,omitempty"` 1701 + Fulfillment *struct { 1702 + Curbside *bool `json:"curbside,omitempty"` 1703 + Delivery *bool `json:"delivery,omitempty"` 1704 + } `json:"fulfillment,omitempty"` 1705 + Inventory *struct { 1706 + StockLevel *string `json:"stockLevel,omitempty"` 1707 + } `json:"inventory,omitempty"` 1708 + ItemId *string `json:"itemId,omitempty"` 1709 + Price *struct { 1710 + Promo *float32 `json:"promo,omitempty"` 1711 + Regular *float32 `json:"regular,omitempty"` 1712 + } `json:"price,omitempty"` 1713 + Size *string `json:"size,omitempty"` 1714 + } `json:"items,omitempty"` 1715 + ProductId *string `json:"productId,omitempty"` 1716 + Temperature *struct { 1717 + HeatSensitive *bool `json:"heatSensitive,omitempty"` 1718 + Indicator *string `json:"indicator,omitempty"` 1719 + } `json:"temperature,omitempty"` 1720 + Upc *string `json:"upc,omitempty"` 1721 + } `json:"data,omitempty"` 1722 + Meta *struct { 1723 + Pagination *struct { 1724 + Limit *float32 `json:"limit,omitempty"` 1725 + Start *float32 `json:"start,omitempty"` 1726 + Total *float32 `json:"total,omitempty"` 1727 + } `json:"pagination,omitempty"` 1728 + Warnings *[]string `json:"warnings,omitempty"` 1729 + } `json:"meta,omitempty"` 1730 + } 1731 + JSON400 *struct { 1732 + Errors *struct { 1733 + Code *string `json:"code,omitempty"` 1734 + Reason *string `json:"reason,omitempty"` 1735 + Timestamp *float32 `json:"timestamp,omitempty"` 1736 + } `json:"errors,omitempty"` 1737 + } 1738 + JSON401 *struct { 1739 + Errors *struct { 1740 + Error *string `json:"error,omitempty"` 1741 + ErrorDescription *string `json:"error_description,omitempty"` 1742 + } `json:"errors,omitempty"` 1743 + } 1744 + JSON500 *struct { 1745 + Errors *struct { 1746 + Code *string `json:"code,omitempty"` 1747 + Reason *string `json:"reason,omitempty"` 1748 + Timestamp *float32 `json:"timestamp,omitempty"` 1749 + } `json:"errors,omitempty"` 1750 + } 1751 + } 1752 + 1753 + // Status returns HTTPResponse.Status 1754 + func (r ProductDetailsResponse) Status() string { 1755 + if r.HTTPResponse != nil { 1756 + return r.HTTPResponse.Status 1757 + } 1758 + return http.StatusText(0) 1759 + } 1760 + 1761 + // StatusCode returns HTTPResponse.StatusCode 1762 + func (r ProductDetailsResponse) StatusCode() int { 1763 + if r.HTTPResponse != nil { 1764 + return r.HTTPResponse.StatusCode 1765 + } 1766 + return 0 1767 + } 1768 + 1769 + // AddToCartWithBodyWithResponse request with arbitrary body returning *AddToCartResponse 1770 + func (c *ClientWithResponses) AddToCartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddToCartResponse, error) { 1771 + rsp, err := c.AddToCartWithBody(ctx, contentType, body, reqEditors...) 1772 + if err != nil { 1773 + return nil, err 1774 + } 1775 + return ParseAddToCartResponse(rsp) 1776 + } 1777 + 1778 + func (c *ClientWithResponses) AddToCartWithResponse(ctx context.Context, body AddToCartJSONRequestBody, reqEditors ...RequestEditorFn) (*AddToCartResponse, error) { 1779 + rsp, err := c.AddToCart(ctx, body, reqEditors...) 1780 + if err != nil { 1781 + return nil, err 1782 + } 1783 + return ParseAddToCartResponse(rsp) 1784 + } 1785 + 1786 + // ChainListWithResponse request returning *ChainListResponse 1787 + func (c *ClientWithResponses) ChainListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ChainListResponse, error) { 1788 + rsp, err := c.ChainList(ctx, reqEditors...) 1789 + if err != nil { 1790 + return nil, err 1791 + } 1792 + return ParseChainListResponse(rsp) 1793 + } 1794 + 1795 + // ChainDetailsWithResponse request returning *ChainDetailsResponse 1796 + func (c *ClientWithResponses) ChainDetailsWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*ChainDetailsResponse, error) { 1797 + rsp, err := c.ChainDetails(ctx, name, reqEditors...) 1798 + if err != nil { 1799 + return nil, err 1800 + } 1801 + return ParseChainDetailsResponse(rsp) 1802 + } 1803 + 1804 + // DepartmentListWithResponse request returning *DepartmentListResponse 1805 + func (c *ClientWithResponses) DepartmentListWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DepartmentListResponse, error) { 1806 + rsp, err := c.DepartmentList(ctx, reqEditors...) 1807 + if err != nil { 1808 + return nil, err 1809 + } 1810 + return ParseDepartmentListResponse(rsp) 1811 + } 1812 + 1813 + // DepartmentDetailsWithResponse request returning *DepartmentDetailsResponse 1814 + func (c *ClientWithResponses) DepartmentDetailsWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DepartmentDetailsResponse, error) { 1815 + rsp, err := c.DepartmentDetails(ctx, id, reqEditors...) 1816 + if err != nil { 1817 + return nil, err 1818 + } 1819 + return ParseDepartmentDetailsResponse(rsp) 1820 + } 1821 + 1822 + // UserProfileInformationWithResponse request returning *UserProfileInformationResponse 1823 + func (c *ClientWithResponses) UserProfileInformationWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*UserProfileInformationResponse, error) { 1824 + rsp, err := c.UserProfileInformation(ctx, reqEditors...) 1825 + if err != nil { 1826 + return nil, err 1827 + } 1828 + return ParseUserProfileInformationResponse(rsp) 1829 + } 1830 + 1831 + // LocationListWithResponse request returning *LocationListResponse 1832 + func (c *ClientWithResponses) LocationListWithResponse(ctx context.Context, params *LocationListParams, reqEditors ...RequestEditorFn) (*LocationListResponse, error) { 1833 + rsp, err := c.LocationList(ctx, params, reqEditors...) 1834 + if err != nil { 1835 + return nil, err 1836 + } 1837 + return ParseLocationListResponse(rsp) 1838 + } 1839 + 1840 + // LocationDetailsWithResponse request returning *LocationDetailsResponse 1841 + func (c *ClientWithResponses) LocationDetailsWithResponse(ctx context.Context, locationId string, reqEditors ...RequestEditorFn) (*LocationDetailsResponse, error) { 1842 + rsp, err := c.LocationDetails(ctx, locationId, reqEditors...) 1843 + if err != nil { 1844 + return nil, err 1845 + } 1846 + return ParseLocationDetailsResponse(rsp) 1847 + } 1848 + 1849 + // ProductSearchWithResponse request returning *ProductSearchResponse 1850 + func (c *ClientWithResponses) ProductSearchWithResponse(ctx context.Context, params *ProductSearchParams, reqEditors ...RequestEditorFn) (*ProductSearchResponse, error) { 1851 + rsp, err := c.ProductSearch(ctx, params, reqEditors...) 1852 + if err != nil { 1853 + return nil, err 1854 + } 1855 + return ParseProductSearchResponse(rsp) 1856 + } 1857 + 1858 + // ProductDetailsWithResponse request returning *ProductDetailsResponse 1859 + func (c *ClientWithResponses) ProductDetailsWithResponse(ctx context.Context, id string, params *ProductDetailsParams, reqEditors ...RequestEditorFn) (*ProductDetailsResponse, error) { 1860 + rsp, err := c.ProductDetails(ctx, id, params, reqEditors...) 1861 + if err != nil { 1862 + return nil, err 1863 + } 1864 + return ParseProductDetailsResponse(rsp) 1865 + } 1866 + 1867 + // ParseAddToCartResponse parses an HTTP response from a AddToCartWithResponse call 1868 + func ParseAddToCartResponse(rsp *http.Response) (*AddToCartResponse, error) { 1869 + bodyBytes, err := io.ReadAll(rsp.Body) 1870 + defer func() { _ = rsp.Body.Close() }() 1871 + if err != nil { 1872 + return nil, err 1873 + } 1874 + 1875 + response := &AddToCartResponse{ 1876 + Body: bodyBytes, 1877 + HTTPResponse: rsp, 1878 + } 1879 + 1880 + switch { 1881 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 1882 + var dest struct { 1883 + Errors *string `json:"errors,omitempty"` 1884 + } 1885 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1886 + return nil, err 1887 + } 1888 + response.JSON400 = &dest 1889 + 1890 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 1891 + var dest struct { 1892 + Errors *struct { 1893 + Error *string `json:"error,omitempty"` 1894 + ErrorDescription *string `json:"error_description,omitempty"` 1895 + } `json:"errors,omitempty"` 1896 + } 1897 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1898 + return nil, err 1899 + } 1900 + response.JSON401 = &dest 1901 + 1902 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 1903 + var dest struct { 1904 + Errors *struct { 1905 + Code *string `json:"code,omitempty"` 1906 + Reason *string `json:"reason,omitempty"` 1907 + Timestamp *float32 `json:"timestamp,omitempty"` 1908 + } `json:"errors,omitempty"` 1909 + } 1910 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1911 + return nil, err 1912 + } 1913 + response.JSON500 = &dest 1914 + 1915 + } 1916 + 1917 + return response, nil 1918 + } 1919 + 1920 + // ParseChainListResponse parses an HTTP response from a ChainListWithResponse call 1921 + func ParseChainListResponse(rsp *http.Response) (*ChainListResponse, error) { 1922 + bodyBytes, err := io.ReadAll(rsp.Body) 1923 + defer func() { _ = rsp.Body.Close() }() 1924 + if err != nil { 1925 + return nil, err 1926 + } 1927 + 1928 + response := &ChainListResponse{ 1929 + Body: bodyBytes, 1930 + HTTPResponse: rsp, 1931 + } 1932 + 1933 + switch { 1934 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 1935 + var dest struct { 1936 + Data *[]struct { 1937 + DivisionNumbers *[]string `json:"divisionNumbers,omitempty"` 1938 + Name *string `json:"name,omitempty"` 1939 + } `json:"data,omitempty"` 1940 + Meta *struct { 1941 + Pagination *struct { 1942 + Limit *float32 `json:"limit,omitempty"` 1943 + Start *float32 `json:"start,omitempty"` 1944 + Total *float32 `json:"total,omitempty"` 1945 + } `json:"pagination,omitempty"` 1946 + Warnings *[]string `json:"warnings,omitempty"` 1947 + } `json:"meta,omitempty"` 1948 + } 1949 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1950 + return nil, err 1951 + } 1952 + response.JSON200 = &dest 1953 + 1954 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 1955 + var dest struct { 1956 + Errors *string `json:"errors,omitempty"` 1957 + } 1958 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1959 + return nil, err 1960 + } 1961 + response.JSON400 = &dest 1962 + 1963 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 1964 + var dest struct { 1965 + Errors *struct { 1966 + Error *string `json:"error,omitempty"` 1967 + ErrorDescription *string `json:"error_description,omitempty"` 1968 + } `json:"errors,omitempty"` 1969 + } 1970 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1971 + return nil, err 1972 + } 1973 + response.JSON401 = &dest 1974 + 1975 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 1976 + var dest struct { 1977 + Errors *struct { 1978 + Code *string `json:"code,omitempty"` 1979 + Reason *string `json:"reason,omitempty"` 1980 + Timestamp *float32 `json:"timestamp,omitempty"` 1981 + } `json:"errors,omitempty"` 1982 + } 1983 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 1984 + return nil, err 1985 + } 1986 + response.JSON500 = &dest 1987 + 1988 + } 1989 + 1990 + return response, nil 1991 + } 1992 + 1993 + // ParseChainDetailsResponse parses an HTTP response from a ChainDetailsWithResponse call 1994 + func ParseChainDetailsResponse(rsp *http.Response) (*ChainDetailsResponse, error) { 1995 + bodyBytes, err := io.ReadAll(rsp.Body) 1996 + defer func() { _ = rsp.Body.Close() }() 1997 + if err != nil { 1998 + return nil, err 1999 + } 2000 + 2001 + response := &ChainDetailsResponse{ 2002 + Body: bodyBytes, 2003 + HTTPResponse: rsp, 2004 + } 2005 + 2006 + switch { 2007 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2008 + var dest struct { 2009 + Data *struct { 2010 + DivisionNumbers *[]string `json:"divisionNumbers,omitempty"` 2011 + Name *string `json:"name,omitempty"` 2012 + } `json:"data,omitempty"` 2013 + Meta *map[string]interface{} `json:"meta,omitempty"` 2014 + } 2015 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2016 + return nil, err 2017 + } 2018 + response.JSON200 = &dest 2019 + 2020 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2021 + var dest struct { 2022 + Errors *struct { 2023 + Error *string `json:"error,omitempty"` 2024 + ErrorDescription *string `json:"error_description,omitempty"` 2025 + } `json:"errors,omitempty"` 2026 + } 2027 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2028 + return nil, err 2029 + } 2030 + response.JSON401 = &dest 2031 + 2032 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2033 + var dest struct { 2034 + Errors *struct { 2035 + Code *string `json:"code,omitempty"` 2036 + Reason *string `json:"reason,omitempty"` 2037 + Timestamp *float32 `json:"timestamp,omitempty"` 2038 + } `json:"errors,omitempty"` 2039 + } 2040 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2041 + return nil, err 2042 + } 2043 + response.JSON500 = &dest 2044 + 2045 + } 2046 + 2047 + return response, nil 2048 + } 2049 + 2050 + // ParseDepartmentListResponse parses an HTTP response from a DepartmentListWithResponse call 2051 + func ParseDepartmentListResponse(rsp *http.Response) (*DepartmentListResponse, error) { 2052 + bodyBytes, err := io.ReadAll(rsp.Body) 2053 + defer func() { _ = rsp.Body.Close() }() 2054 + if err != nil { 2055 + return nil, err 2056 + } 2057 + 2058 + response := &DepartmentListResponse{ 2059 + Body: bodyBytes, 2060 + HTTPResponse: rsp, 2061 + } 2062 + 2063 + switch { 2064 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2065 + var dest struct { 2066 + Data *[]struct { 2067 + DepartmentId *string `json:"departmentId,omitempty"` 2068 + Name *string `json:"name,omitempty"` 2069 + } `json:"data,omitempty"` 2070 + Meta *struct { 2071 + Pagination *struct { 2072 + Limit *float32 `json:"limit,omitempty"` 2073 + Start *float32 `json:"start,omitempty"` 2074 + Total *float32 `json:"total,omitempty"` 2075 + } `json:"pagination,omitempty"` 2076 + Warnings *[]string `json:"warnings,omitempty"` 2077 + } `json:"meta,omitempty"` 2078 + } 2079 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2080 + return nil, err 2081 + } 2082 + response.JSON200 = &dest 2083 + 2084 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2085 + var dest struct { 2086 + Errors *struct { 2087 + Error *string `json:"error,omitempty"` 2088 + ErrorDescription *string `json:"error_description,omitempty"` 2089 + } `json:"errors,omitempty"` 2090 + } 2091 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2092 + return nil, err 2093 + } 2094 + response.JSON401 = &dest 2095 + 2096 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2097 + var dest struct { 2098 + Errors *struct { 2099 + Code *string `json:"code,omitempty"` 2100 + Reason *string `json:"reason,omitempty"` 2101 + Timestamp *float32 `json:"timestamp,omitempty"` 2102 + } `json:"errors,omitempty"` 2103 + } 2104 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2105 + return nil, err 2106 + } 2107 + response.JSON500 = &dest 2108 + 2109 + } 2110 + 2111 + return response, nil 2112 + } 2113 + 2114 + // ParseDepartmentDetailsResponse parses an HTTP response from a DepartmentDetailsWithResponse call 2115 + func ParseDepartmentDetailsResponse(rsp *http.Response) (*DepartmentDetailsResponse, error) { 2116 + bodyBytes, err := io.ReadAll(rsp.Body) 2117 + defer func() { _ = rsp.Body.Close() }() 2118 + if err != nil { 2119 + return nil, err 2120 + } 2121 + 2122 + response := &DepartmentDetailsResponse{ 2123 + Body: bodyBytes, 2124 + HTTPResponse: rsp, 2125 + } 2126 + 2127 + switch { 2128 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2129 + var dest struct { 2130 + Data *struct { 2131 + DepartmentId *string `json:"departmentId,omitempty"` 2132 + Name *string `json:"name,omitempty"` 2133 + } `json:"data,omitempty"` 2134 + Meta *map[string]interface{} `json:"meta,omitempty"` 2135 + } 2136 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2137 + return nil, err 2138 + } 2139 + response.JSON200 = &dest 2140 + 2141 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 2142 + var dest struct { 2143 + Errors *struct { 2144 + Code *string `json:"code,omitempty"` 2145 + Reason *string `json:"reason,omitempty"` 2146 + Timestamp *float32 `json:"timestamp,omitempty"` 2147 + } `json:"errors,omitempty"` 2148 + } 2149 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2150 + return nil, err 2151 + } 2152 + response.JSON400 = &dest 2153 + 2154 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2155 + var dest struct { 2156 + Errors *struct { 2157 + Error *string `json:"error,omitempty"` 2158 + ErrorDescription *string `json:"error_description,omitempty"` 2159 + } `json:"errors,omitempty"` 2160 + } 2161 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2162 + return nil, err 2163 + } 2164 + response.JSON401 = &dest 2165 + 2166 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2167 + var dest struct { 2168 + Errors *struct { 2169 + Code *string `json:"code,omitempty"` 2170 + Reason *string `json:"reason,omitempty"` 2171 + Timestamp *float32 `json:"timestamp,omitempty"` 2172 + } `json:"errors,omitempty"` 2173 + } 2174 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2175 + return nil, err 2176 + } 2177 + response.JSON500 = &dest 2178 + 2179 + } 2180 + 2181 + return response, nil 2182 + } 2183 + 2184 + // ParseUserProfileInformationResponse parses an HTTP response from a UserProfileInformationWithResponse call 2185 + func ParseUserProfileInformationResponse(rsp *http.Response) (*UserProfileInformationResponse, error) { 2186 + bodyBytes, err := io.ReadAll(rsp.Body) 2187 + defer func() { _ = rsp.Body.Close() }() 2188 + if err != nil { 2189 + return nil, err 2190 + } 2191 + 2192 + response := &UserProfileInformationResponse{ 2193 + Body: bodyBytes, 2194 + HTTPResponse: rsp, 2195 + } 2196 + 2197 + switch { 2198 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2199 + var dest struct { 2200 + Data *struct { 2201 + Id *map[string]interface{} `json:"id,omitempty"` 2202 + } `json:"data,omitempty"` 2203 + Meta *struct { 2204 + Pagination *struct { 2205 + Limit *float32 `json:"limit,omitempty"` 2206 + Start *float32 `json:"start,omitempty"` 2207 + Total *float32 `json:"total,omitempty"` 2208 + } `json:"pagination,omitempty"` 2209 + Warnings *[]string `json:"warnings,omitempty"` 2210 + } `json:"meta,omitempty"` 2211 + } 2212 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2213 + return nil, err 2214 + } 2215 + response.JSON200 = &dest 2216 + 2217 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2218 + var dest struct { 2219 + Errors *struct { 2220 + Error *string `json:"error,omitempty"` 2221 + ErrorDescription *string `json:"error_description,omitempty"` 2222 + } `json:"errors,omitempty"` 2223 + } 2224 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2225 + return nil, err 2226 + } 2227 + response.JSON401 = &dest 2228 + 2229 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: 2230 + var dest struct { 2231 + Errors *struct { 2232 + Code *string `json:"code,omitempty"` 2233 + Reason *string `json:"reason,omitempty"` 2234 + Timestamp *float32 `json:"timestamp,omitempty"` 2235 + } `json:"errors,omitempty"` 2236 + } 2237 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2238 + return nil, err 2239 + } 2240 + response.JSON403 = &dest 2241 + 2242 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2243 + var dest struct { 2244 + Errors *struct { 2245 + Code *string `json:"code,omitempty"` 2246 + Reason *string `json:"reason,omitempty"` 2247 + Timestamp *float32 `json:"timestamp,omitempty"` 2248 + } `json:"errors,omitempty"` 2249 + } 2250 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2251 + return nil, err 2252 + } 2253 + response.JSON500 = &dest 2254 + 2255 + } 2256 + 2257 + return response, nil 2258 + } 2259 + 2260 + // ParseLocationListResponse parses an HTTP response from a LocationListWithResponse call 2261 + func ParseLocationListResponse(rsp *http.Response) (*LocationListResponse, error) { 2262 + bodyBytes, err := io.ReadAll(rsp.Body) 2263 + defer func() { _ = rsp.Body.Close() }() 2264 + if err != nil { 2265 + return nil, err 2266 + } 2267 + 2268 + response := &LocationListResponse{ 2269 + Body: bodyBytes, 2270 + HTTPResponse: rsp, 2271 + } 2272 + 2273 + switch { 2274 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2275 + var dest struct { 2276 + Data *[]struct { 2277 + Address *struct { 2278 + AddressLine1 *string `json:"addressLine1,omitempty"` 2279 + AddressLine2 *string `json:"addressLine2,omitempty"` 2280 + City *string `json:"city,omitempty"` 2281 + County *string `json:"county,omitempty"` 2282 + State *string `json:"state,omitempty"` 2283 + ZipCode *string `json:"zipCode,omitempty"` 2284 + } `json:"address,omitempty"` 2285 + Chain *string `json:"chain,omitempty"` 2286 + Departments *[]struct { 2287 + DepartmentId *string `json:"departmentId,omitempty"` 2288 + Hours *struct { 2289 + Open24 *bool `json:"Open24,omitempty"` 2290 + Friday *struct { 2291 + Close *string `json:"close,omitempty"` 2292 + Open *string `json:"open,omitempty"` 2293 + Open24 *bool `json:"open24,omitempty"` 2294 + } `json:"friday,omitempty"` 2295 + Monday *struct { 2296 + Close *string `json:"close,omitempty"` 2297 + Open *string `json:"open,omitempty"` 2298 + Open24 *bool `json:"open24,omitempty"` 2299 + } `json:"monday,omitempty"` 2300 + Saturday *struct { 2301 + Close *string `json:"close,omitempty"` 2302 + Open *string `json:"open,omitempty"` 2303 + Open24 *bool `json:"open24,omitempty"` 2304 + } `json:"saturday,omitempty"` 2305 + Sunday *struct { 2306 + Close *string `json:"close,omitempty"` 2307 + Open *string `json:"open,omitempty"` 2308 + Open24 *bool `json:"open24,omitempty"` 2309 + } `json:"sunday,omitempty"` 2310 + Thursday *struct { 2311 + Close *string `json:"close,omitempty"` 2312 + Open *string `json:"open,omitempty"` 2313 + Open24 *bool `json:"open24,omitempty"` 2314 + } `json:"thursday,omitempty"` 2315 + Tuesday *struct { 2316 + Close *string `json:"close,omitempty"` 2317 + Open *string `json:"open,omitempty"` 2318 + Open24 *bool `json:"open24,omitempty"` 2319 + } `json:"tuesday,omitempty"` 2320 + Wednesday *struct { 2321 + Close *string `json:"close,omitempty"` 2322 + Open *string `json:"open,omitempty"` 2323 + Open24 *bool `json:"open24,omitempty"` 2324 + } `json:"wednesday,omitempty"` 2325 + } `json:"hours,omitempty"` 2326 + Name *string `json:"name,omitempty"` 2327 + Phone *string `json:"phone,omitempty"` 2328 + } `json:"departments,omitempty"` 2329 + DivisionNumber *string `json:"divisionNumber,omitempty"` 2330 + Geolocation *struct { 2331 + LatLng *string `json:"latLng,omitempty"` 2332 + Latitude *float32 `json:"latitude,omitempty"` 2333 + Longitude *float32 `json:"longitude,omitempty"` 2334 + } `json:"geolocation,omitempty"` 2335 + Hours *struct { 2336 + Open24 *bool `json:"Open24,omitempty"` 2337 + Friday *struct { 2338 + Close *string `json:"close,omitempty"` 2339 + Open *string `json:"open,omitempty"` 2340 + Open24 *bool `json:"open24,omitempty"` 2341 + } `json:"friday,omitempty"` 2342 + GmtOffset *string `json:"gmtOffset,omitempty"` 2343 + Monday *struct { 2344 + Close *string `json:"close,omitempty"` 2345 + Open *string `json:"open,omitempty"` 2346 + Open24 *bool `json:"open24,omitempty"` 2347 + } `json:"monday,omitempty"` 2348 + Saturday *struct { 2349 + Close *string `json:"close,omitempty"` 2350 + Open *string `json:"open,omitempty"` 2351 + Open24 *bool `json:"open24,omitempty"` 2352 + } `json:"saturday,omitempty"` 2353 + Sunday *struct { 2354 + Close *string `json:"close,omitempty"` 2355 + Open *string `json:"open,omitempty"` 2356 + Open24 *bool `json:"open24,omitempty"` 2357 + } `json:"sunday,omitempty"` 2358 + Thursday *struct { 2359 + Close *string `json:"close,omitempty"` 2360 + Open *string `json:"open,omitempty"` 2361 + Open24 *bool `json:"open24,omitempty"` 2362 + } `json:"thursday,omitempty"` 2363 + Timezone *string `json:"timezone,omitempty"` 2364 + Tuesday *struct { 2365 + Close *string `json:"close,omitempty"` 2366 + Open *string `json:"open,omitempty"` 2367 + Open24 *bool `json:"open24,omitempty"` 2368 + } `json:"tuesday,omitempty"` 2369 + Wednesday *struct { 2370 + Close *string `json:"close,omitempty"` 2371 + Open *string `json:"open,omitempty"` 2372 + Open24 *bool `json:"open24,omitempty"` 2373 + } `json:"wednesday,omitempty"` 2374 + } `json:"hours,omitempty"` 2375 + LocationId *string `json:"locationId,omitempty"` 2376 + Name *string `json:"name,omitempty"` 2377 + Phone *string `json:"phone,omitempty"` 2378 + StoreNumber *string `json:"storeNumber,omitempty"` 2379 + } `json:"data,omitempty"` 2380 + Meta *struct { 2381 + Pagination *struct { 2382 + Limit *float32 `json:"limit,omitempty"` 2383 + Start *float32 `json:"start,omitempty"` 2384 + Total *float32 `json:"total,omitempty"` 2385 + } `json:"pagination,omitempty"` 2386 + Warnings *[]string `json:"warnings,omitempty"` 2387 + } `json:"meta,omitempty"` 2388 + } 2389 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2390 + return nil, err 2391 + } 2392 + response.JSON200 = &dest 2393 + 2394 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 2395 + var dest struct { 2396 + Errors *string `json:"errors,omitempty"` 2397 + } 2398 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2399 + return nil, err 2400 + } 2401 + response.JSON400 = &dest 2402 + 2403 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2404 + var dest struct { 2405 + Errors *struct { 2406 + Error *string `json:"error,omitempty"` 2407 + ErrorDescription *string `json:"error_description,omitempty"` 2408 + } `json:"errors,omitempty"` 2409 + } 2410 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2411 + return nil, err 2412 + } 2413 + response.JSON401 = &dest 2414 + 2415 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2416 + var dest struct { 2417 + Errors *struct { 2418 + Code *string `json:"code,omitempty"` 2419 + Reason *string `json:"reason,omitempty"` 2420 + Timestamp *float32 `json:"timestamp,omitempty"` 2421 + } `json:"errors,omitempty"` 2422 + } 2423 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2424 + return nil, err 2425 + } 2426 + response.JSON500 = &dest 2427 + 2428 + } 2429 + 2430 + return response, nil 2431 + } 2432 + 2433 + // ParseLocationDetailsResponse parses an HTTP response from a LocationDetailsWithResponse call 2434 + func ParseLocationDetailsResponse(rsp *http.Response) (*LocationDetailsResponse, error) { 2435 + bodyBytes, err := io.ReadAll(rsp.Body) 2436 + defer func() { _ = rsp.Body.Close() }() 2437 + if err != nil { 2438 + return nil, err 2439 + } 2440 + 2441 + response := &LocationDetailsResponse{ 2442 + Body: bodyBytes, 2443 + HTTPResponse: rsp, 2444 + } 2445 + 2446 + switch { 2447 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2448 + var dest struct { 2449 + Data *struct { 2450 + Address *struct { 2451 + AddressLine1 *string `json:"addressLine1,omitempty"` 2452 + AddressLine2 *string `json:"addressLine2,omitempty"` 2453 + City *string `json:"city,omitempty"` 2454 + County *string `json:"county,omitempty"` 2455 + State *string `json:"state,omitempty"` 2456 + ZipCode *string `json:"zipCode,omitempty"` 2457 + } `json:"address,omitempty"` 2458 + Chain *string `json:"chain,omitempty"` 2459 + Departments *[]struct { 2460 + DepartmentId *string `json:"departmentId,omitempty"` 2461 + Hours *struct { 2462 + Open24 *bool `json:"Open24,omitempty"` 2463 + Friday *struct { 2464 + Close *string `json:"close,omitempty"` 2465 + Open *string `json:"open,omitempty"` 2466 + Open24 *bool `json:"open24,omitempty"` 2467 + } `json:"friday,omitempty"` 2468 + Monday *struct { 2469 + Close *string `json:"close,omitempty"` 2470 + Open *string `json:"open,omitempty"` 2471 + Open24 *bool `json:"open24,omitempty"` 2472 + } `json:"monday,omitempty"` 2473 + Saturday *struct { 2474 + Close *string `json:"close,omitempty"` 2475 + Open *string `json:"open,omitempty"` 2476 + Open24 *bool `json:"open24,omitempty"` 2477 + } `json:"saturday,omitempty"` 2478 + Sunday *struct { 2479 + Close *string `json:"close,omitempty"` 2480 + Open *string `json:"open,omitempty"` 2481 + Open24 *bool `json:"open24,omitempty"` 2482 + } `json:"sunday,omitempty"` 2483 + Thursday *struct { 2484 + Close *string `json:"close,omitempty"` 2485 + Open *string `json:"open,omitempty"` 2486 + Open24 *bool `json:"open24,omitempty"` 2487 + } `json:"thursday,omitempty"` 2488 + Tuesday *struct { 2489 + Close *string `json:"close,omitempty"` 2490 + Open *string `json:"open,omitempty"` 2491 + Open24 *bool `json:"open24,omitempty"` 2492 + } `json:"tuesday,omitempty"` 2493 + Wednesday *struct { 2494 + Close *string `json:"close,omitempty"` 2495 + Open *string `json:"open,omitempty"` 2496 + Open24 *bool `json:"open24,omitempty"` 2497 + } `json:"wednesday,omitempty"` 2498 + } `json:"hours,omitempty"` 2499 + Name *string `json:"name,omitempty"` 2500 + Phone *string `json:"phone,omitempty"` 2501 + } `json:"departments,omitempty"` 2502 + DivisionNumber *string `json:"divisionNumber,omitempty"` 2503 + Geolocation *struct { 2504 + LatLng *string `json:"latLng,omitempty"` 2505 + Latitude *float32 `json:"latitude,omitempty"` 2506 + Longitude *float32 `json:"longitude,omitempty"` 2507 + } `json:"geolocation,omitempty"` 2508 + Hours *struct { 2509 + Open24 *bool `json:"Open24,omitempty"` 2510 + Friday *struct { 2511 + Close *string `json:"close,omitempty"` 2512 + Open *string `json:"open,omitempty"` 2513 + Open24 *bool `json:"open24,omitempty"` 2514 + } `json:"friday,omitempty"` 2515 + GmtOffset *string `json:"gmtOffset,omitempty"` 2516 + Monday *struct { 2517 + Close *string `json:"close,omitempty"` 2518 + Open *string `json:"open,omitempty"` 2519 + Open24 *bool `json:"open24,omitempty"` 2520 + } `json:"monday,omitempty"` 2521 + Saturday *struct { 2522 + Close *string `json:"close,omitempty"` 2523 + Open *string `json:"open,omitempty"` 2524 + Open24 *bool `json:"open24,omitempty"` 2525 + } `json:"saturday,omitempty"` 2526 + Sunday *struct { 2527 + Close *string `json:"close,omitempty"` 2528 + Open *string `json:"open,omitempty"` 2529 + Open24 *bool `json:"open24,omitempty"` 2530 + } `json:"sunday,omitempty"` 2531 + Thursday *struct { 2532 + Close *string `json:"close,omitempty"` 2533 + Open *string `json:"open,omitempty"` 2534 + Open24 *bool `json:"open24,omitempty"` 2535 + } `json:"thursday,omitempty"` 2536 + Timezone *string `json:"timezone,omitempty"` 2537 + Tuesday *struct { 2538 + Close *string `json:"close,omitempty"` 2539 + Open *string `json:"open,omitempty"` 2540 + Open24 *bool `json:"open24,omitempty"` 2541 + } `json:"tuesday,omitempty"` 2542 + Wednesday *struct { 2543 + Close *string `json:"close,omitempty"` 2544 + Open *string `json:"open,omitempty"` 2545 + Open24 *bool `json:"open24,omitempty"` 2546 + } `json:"wednesday,omitempty"` 2547 + } `json:"hours,omitempty"` 2548 + LocationId *string `json:"locationId,omitempty"` 2549 + Name *string `json:"name,omitempty"` 2550 + Phone *string `json:"phone,omitempty"` 2551 + StoreNumber *string `json:"storeNumber,omitempty"` 2552 + } `json:"data,omitempty"` 2553 + Meta *struct { 2554 + Pagination *struct { 2555 + Limit *float32 `json:"limit,omitempty"` 2556 + Start *float32 `json:"start,omitempty"` 2557 + Total *float32 `json:"total,omitempty"` 2558 + } `json:"pagination,omitempty"` 2559 + Warnings *[]string `json:"warnings,omitempty"` 2560 + } `json:"meta,omitempty"` 2561 + } 2562 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2563 + return nil, err 2564 + } 2565 + response.JSON200 = &dest 2566 + 2567 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 2568 + var dest struct { 2569 + Errors *struct { 2570 + Code *string `json:"code,omitempty"` 2571 + Reason *string `json:"reason,omitempty"` 2572 + Timestamp *float32 `json:"timestamp,omitempty"` 2573 + } `json:"errors,omitempty"` 2574 + } 2575 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2576 + return nil, err 2577 + } 2578 + response.JSON400 = &dest 2579 + 2580 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2581 + var dest struct { 2582 + Errors *struct { 2583 + Error *string `json:"error,omitempty"` 2584 + ErrorDescription *string `json:"error_description,omitempty"` 2585 + } `json:"errors,omitempty"` 2586 + } 2587 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2588 + return nil, err 2589 + } 2590 + response.JSON401 = &dest 2591 + 2592 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2593 + var dest struct { 2594 + Errors *struct { 2595 + Code *string `json:"code,omitempty"` 2596 + Reason *string `json:"reason,omitempty"` 2597 + Timestamp *float32 `json:"timestamp,omitempty"` 2598 + } `json:"errors,omitempty"` 2599 + } 2600 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2601 + return nil, err 2602 + } 2603 + response.JSON500 = &dest 2604 + 2605 + } 2606 + 2607 + return response, nil 2608 + } 2609 + 2610 + // ParseProductSearchResponse parses an HTTP response from a ProductSearchWithResponse call 2611 + func ParseProductSearchResponse(rsp *http.Response) (*ProductSearchResponse, error) { 2612 + bodyBytes, err := io.ReadAll(rsp.Body) 2613 + defer func() { _ = rsp.Body.Close() }() 2614 + if err != nil { 2615 + return nil, err 2616 + } 2617 + 2618 + response := &ProductSearchResponse{ 2619 + Body: bodyBytes, 2620 + HTTPResponse: rsp, 2621 + } 2622 + 2623 + switch { 2624 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2625 + var dest struct { 2626 + Data *[]struct { 2627 + AisleLocations *[]struct { 2628 + BayNumber *string `json:"bayNumber,omitempty"` 2629 + Description *string `json:"description,omitempty"` 2630 + Number *string `json:"number,omitempty"` 2631 + NumberOfFacings *string `json:"numberOfFacings,omitempty"` 2632 + SequenceNumber *string `json:"sequenceNumber,omitempty"` 2633 + ShelfNumber *string `json:"shelfNumber,omitempty"` 2634 + ShelfPositionInBay *string `json:"shelfPositionInBay,omitempty"` 2635 + Side *string `json:"side,omitempty"` 2636 + } `json:"aisleLocations,omitempty"` 2637 + Brand *string `json:"brand,omitempty"` 2638 + Categories *[]string `json:"categories,omitempty"` 2639 + CountryOrigin *string `json:"countryOrigin,omitempty"` 2640 + Description *string `json:"description,omitempty"` 2641 + Images *[]struct { 2642 + Default *bool `json:"default,omitempty"` 2643 + Type *string `json:"type,omitempty"` 2644 + } `json:"images,omitempty"` 2645 + ItemInformation *struct { 2646 + Depth *string `json:"depth,omitempty"` 2647 + Height *string `json:"height,omitempty"` 2648 + Width *string `json:"width,omitempty"` 2649 + } `json:"itemInformation,omitempty"` 2650 + Items *[]struct { 2651 + Favorite *bool `json:"favorite,omitempty"` 2652 + Fulfillment *struct { 2653 + Curbside *bool `json:"curbside,omitempty"` 2654 + Delivery *bool `json:"delivery,omitempty"` 2655 + } `json:"fulfillment,omitempty"` 2656 + Inventory *struct { 2657 + StockLevel *string `json:"stockLevel,omitempty"` 2658 + } `json:"inventory,omitempty"` 2659 + ItemId *string `json:"itemId,omitempty"` 2660 + Price *struct { 2661 + Promo *float32 `json:"promo,omitempty"` 2662 + Regular *float32 `json:"regular,omitempty"` 2663 + } `json:"price,omitempty"` 2664 + Size *string `json:"size,omitempty"` 2665 + } `json:"items,omitempty"` 2666 + ProductId *string `json:"productId,omitempty"` 2667 + Temperature *struct { 2668 + HeatSensitive *bool `json:"heatSensitive,omitempty"` 2669 + Indicator *string `json:"indicator,omitempty"` 2670 + } `json:"temperature,omitempty"` 2671 + Upc *string `json:"upc,omitempty"` 2672 + } `json:"data,omitempty"` 2673 + Meta *struct { 2674 + Pagination *struct { 2675 + Limit *float32 `json:"limit,omitempty"` 2676 + Start *float32 `json:"start,omitempty"` 2677 + Total *float32 `json:"total,omitempty"` 2678 + } `json:"pagination,omitempty"` 2679 + Warnings *[]string `json:"warnings,omitempty"` 2680 + } `json:"meta,omitempty"` 2681 + } 2682 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2683 + return nil, err 2684 + } 2685 + response.JSON200 = &dest 2686 + 2687 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 2688 + var dest struct { 2689 + Errors *string `json:"errors,omitempty"` 2690 + } 2691 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2692 + return nil, err 2693 + } 2694 + response.JSON400 = &dest 2695 + 2696 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2697 + var dest struct { 2698 + Errors *struct { 2699 + Error *string `json:"error,omitempty"` 2700 + ErrorDescription *string `json:"error_description,omitempty"` 2701 + } `json:"errors,omitempty"` 2702 + } 2703 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2704 + return nil, err 2705 + } 2706 + response.JSON401 = &dest 2707 + 2708 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2709 + var dest struct { 2710 + Errors *struct { 2711 + Code *string `json:"code,omitempty"` 2712 + Reason *string `json:"reason,omitempty"` 2713 + Timestamp *float32 `json:"timestamp,omitempty"` 2714 + } `json:"errors,omitempty"` 2715 + } 2716 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2717 + return nil, err 2718 + } 2719 + response.JSON500 = &dest 2720 + 2721 + } 2722 + 2723 + return response, nil 2724 + } 2725 + 2726 + // ParseProductDetailsResponse parses an HTTP response from a ProductDetailsWithResponse call 2727 + func ParseProductDetailsResponse(rsp *http.Response) (*ProductDetailsResponse, error) { 2728 + bodyBytes, err := io.ReadAll(rsp.Body) 2729 + defer func() { _ = rsp.Body.Close() }() 2730 + if err != nil { 2731 + return nil, err 2732 + } 2733 + 2734 + response := &ProductDetailsResponse{ 2735 + Body: bodyBytes, 2736 + HTTPResponse: rsp, 2737 + } 2738 + 2739 + switch { 2740 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: 2741 + var dest struct { 2742 + Data *struct { 2743 + AisleLocations *[]struct { 2744 + BayNumber *string `json:"bayNumber,omitempty"` 2745 + Description *string `json:"description,omitempty"` 2746 + Number *string `json:"number,omitempty"` 2747 + NumberOfFacings *string `json:"numberOfFacings,omitempty"` 2748 + SequenceNumber *string `json:"sequenceNumber,omitempty"` 2749 + ShelfNumber *string `json:"shelfNumber,omitempty"` 2750 + ShelfPositionInBay *string `json:"shelfPositionInBay,omitempty"` 2751 + Side *string `json:"side,omitempty"` 2752 + } `json:"aisleLocations,omitempty"` 2753 + Brand *string `json:"brand,omitempty"` 2754 + Categories *[]string `json:"categories,omitempty"` 2755 + CountryOrigin *string `json:"countryOrigin,omitempty"` 2756 + Description *string `json:"description,omitempty"` 2757 + Images *[]struct { 2758 + Default *bool `json:"default,omitempty"` 2759 + Type *string `json:"type,omitempty"` 2760 + } `json:"images,omitempty"` 2761 + ItemInformation *struct { 2762 + Depth *string `json:"depth,omitempty"` 2763 + Height *string `json:"height,omitempty"` 2764 + Width *string `json:"width,omitempty"` 2765 + } `json:"itemInformation,omitempty"` 2766 + Items *[]struct { 2767 + Favorite *bool `json:"favorite,omitempty"` 2768 + Fulfillment *struct { 2769 + Curbside *bool `json:"curbside,omitempty"` 2770 + Delivery *bool `json:"delivery,omitempty"` 2771 + } `json:"fulfillment,omitempty"` 2772 + Inventory *struct { 2773 + StockLevel *string `json:"stockLevel,omitempty"` 2774 + } `json:"inventory,omitempty"` 2775 + ItemId *string `json:"itemId,omitempty"` 2776 + Price *struct { 2777 + Promo *float32 `json:"promo,omitempty"` 2778 + Regular *float32 `json:"regular,omitempty"` 2779 + } `json:"price,omitempty"` 2780 + Size *string `json:"size,omitempty"` 2781 + } `json:"items,omitempty"` 2782 + ProductId *string `json:"productId,omitempty"` 2783 + Temperature *struct { 2784 + HeatSensitive *bool `json:"heatSensitive,omitempty"` 2785 + Indicator *string `json:"indicator,omitempty"` 2786 + } `json:"temperature,omitempty"` 2787 + Upc *string `json:"upc,omitempty"` 2788 + } `json:"data,omitempty"` 2789 + Meta *struct { 2790 + Pagination *struct { 2791 + Limit *float32 `json:"limit,omitempty"` 2792 + Start *float32 `json:"start,omitempty"` 2793 + Total *float32 `json:"total,omitempty"` 2794 + } `json:"pagination,omitempty"` 2795 + Warnings *[]string `json:"warnings,omitempty"` 2796 + } `json:"meta,omitempty"` 2797 + } 2798 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2799 + return nil, err 2800 + } 2801 + response.JSON200 = &dest 2802 + 2803 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: 2804 + var dest struct { 2805 + Errors *struct { 2806 + Code *string `json:"code,omitempty"` 2807 + Reason *string `json:"reason,omitempty"` 2808 + Timestamp *float32 `json:"timestamp,omitempty"` 2809 + } `json:"errors,omitempty"` 2810 + } 2811 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2812 + return nil, err 2813 + } 2814 + response.JSON400 = &dest 2815 + 2816 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: 2817 + var dest struct { 2818 + Errors *struct { 2819 + Error *string `json:"error,omitempty"` 2820 + ErrorDescription *string `json:"error_description,omitempty"` 2821 + } `json:"errors,omitempty"` 2822 + } 2823 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2824 + return nil, err 2825 + } 2826 + response.JSON401 = &dest 2827 + 2828 + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: 2829 + var dest struct { 2830 + Errors *struct { 2831 + Code *string `json:"code,omitempty"` 2832 + Reason *string `json:"reason,omitempty"` 2833 + Timestamp *float32 `json:"timestamp,omitempty"` 2834 + } `json:"errors,omitempty"` 2835 + } 2836 + if err := json.Unmarshal(bodyBytes, &dest); err != nil { 2837 + return nil, err 2838 + } 2839 + response.JSON500 = &dest 2840 + 2841 + } 2842 + 2843 + return response, nil 2844 + }
+2 -79
internal/kroger/client.go
··· 1 - package kroger 1 + package client 2 2 3 - import ( 4 - "bytes" 5 - "encoding/json" 6 - "fmt" 7 - "net/http" 8 - ) 9 - 10 - type Client struct { 11 - apiKey string 12 - httpClient *http.Client 13 - baseURL string 14 - } 15 - 16 - type Product struct { 17 - ID string `json:"id"` 18 - Name string `json:"name"` 19 - Brand string `json:"brand"` 20 - Price float64 `json:"price"` 21 - SalePrice float64 `json:"sale_price"` 22 - OnSale bool `json:"on_sale"` 23 - Available bool `json:"available"` 24 - Fresh bool `json:"fresh"` 25 - Category string `json:"category"` 26 - Description string `json:"description"` 27 - } 28 - 29 - type SalesRequest struct { 30 - Location string `json:"location"` 31 - } 32 - 33 - type SalesResponse struct { 34 - Products []Product `json:"products"` 35 - Total int `json:"total"` 36 - } 37 - 38 - func NewClient(apiKey string) *Client { 39 - return &Client{ 40 - apiKey: apiKey, 41 - httpClient: &http.Client{}, 42 - baseURL: "https://api.kroger.com/v1", 43 - } 44 - } 45 - 46 - func (c *Client) GetSaleProducts(location string) ([]Product, error) { 47 - request := SalesRequest{ 48 - Location: location, 49 - } 50 - 51 - jsonData, err := json.Marshal(request) 52 - if err != nil { 53 - return nil, fmt.Errorf("failed to marshal request: %w", err) 54 - } 55 - 56 - req, err := http.NewRequest("POST", c.baseURL+"/products/sales", bytes.NewBuffer(jsonData)) 57 - if err != nil { 58 - return nil, fmt.Errorf("failed to create request: %w", err) 59 - } 60 - 61 - req.Header.Set("Content-Type", "application/json") 62 - req.Header.Set("Authorization", "Bearer "+c.apiKey) 63 - 64 - resp, err := c.httpClient.Do(req) 65 - if err != nil { 66 - return nil, fmt.Errorf("failed to make request: %w", err) 67 - } 68 - defer resp.Body.Close() 69 - 70 - if resp.StatusCode != http.StatusOK { 71 - return nil, fmt.Errorf("API request failed with status: %d", resp.StatusCode) 72 - } 73 - 74 - var salesResp SalesResponse 75 - if err := json.NewDecoder(resp.Body).Decode(&salesResp); err != nil { 76 - return nil, fmt.Errorf("failed to decode response: %w", err) 77 - } 78 - 79 - return salesResp.Products, nil 80 - } 3 + //go:generate go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen -config cfg.yaml swagger.yaml
+3346
internal/kroger/swagger.yaml
··· 1 + openapi: 3.0.3 2 + info: 3 + title: Kroger Public APIs 4 + description: >- 5 + The following APIs are publicly available for all clients to build new 6 + products, 7 + 8 + services, or customer experiences that leverage the unique data, functions, 9 + and 10 + 11 + applications of Kroger. As a company that strives to empower the developer 12 + community 13 + 14 + and meet our customers where they are, we are offering these APIs as the 15 + first 16 + 17 + step to building an ecosystem that promotes speed, simplicity, and security. 18 + 19 + 20 + 21 + https://developer.kroger.com/reference 22 + version: 1.0.0 23 + contact: {} 24 + components: 25 + securitySchemes: 26 + OAuth2AuthorizationCode: 27 + type: oauth2 28 + flows: 29 + authorizationCode: 30 + authorizationUrl: https://api.kroger.com/v1/connect/oauth2/authorize 31 + # Certificatn authorizationUrl: https://api-ce.kroger.com/v1/connect/oauth2/authorize 32 + tokenUrl: https://api.kroger.com/v1/connect/oauth2/token 33 + # Certification tokenUrl: https://api-ce.kroger.com/v1/connect/oauth2/token 34 + scopes: 35 + profile.compact: Grants read access to a customer profile ID. 36 + cart.basic:write: Grants write access to a customer's cart. 37 + product.compact: Grants read access to general product information. 38 + N/A: No scope required. 39 + 40 + OAuth2ClientCreds: 41 + type: oauth2 42 + flows: 43 + clientCredentials: 44 + tokenUrl: https://api.kroger.com/v1/connect/oauth2/token 45 + # Certification tokenUrl: https://api-ce.kroger.com/v1/connect/oauth2/token 46 + scopes: 47 + product.compact: Grants read access to general product information. 48 + servers: 49 + - url: https://api.kroger.com/v1/ 50 + description: Production server (uses live data) 51 + # - url: https://api-ce.kroger.com/v1/ 52 + # description: Certification Server 53 + paths: 54 + /identity/profile: 55 + get: 56 + security: 57 + - OAuth2ClientCreds: 58 + - profile.compact 59 + tags: 60 + - Identity 61 + summary: User profile information 62 + description: >- 63 + Provides access to the profile `id` of an authenticated customer. 64 + <br><br> **Note**: the customer must be authenticated using the OAuth2 65 + Authorization Code grant type. 66 + operationId: userProfileInformation 67 + responses: 68 + '200': 69 + description: OK 70 + content: 71 + application/json: 72 + schema: 73 + type: object 74 + properties: 75 + data: 76 + type: object 77 + properties: 78 + id: 79 + type: object 80 + properties: {} 81 + meta: 82 + type: object 83 + properties: 84 + pagination: 85 + type: object 86 + properties: 87 + limit: 88 + type: number 89 + example: <number> 90 + start: 91 + type: number 92 + example: <number> 93 + total: 94 + type: number 95 + example: <number> 96 + warnings: 97 + type: array 98 + items: 99 + type: string 100 + example: <string> 101 + example: 102 + - <string> 103 + - <string> 104 + examples: 105 + OK: 106 + value: 107 + data: 108 + id: {} 109 + meta: 110 + pagination: 111 + limit: <number> 112 + start: <number> 113 + total: <number> 114 + warnings: 115 + - <string> 116 + - <string> 117 + '401': 118 + description: Unauthorized 119 + content: 120 + application/json: 121 + schema: 122 + type: object 123 + properties: 124 + errors: 125 + type: object 126 + properties: 127 + error: 128 + type: string 129 + example: <string> 130 + error_description: 131 + type: string 132 + example: <string> 133 + examples: 134 + Unauthorized: 135 + value: 136 + errors: 137 + error: <string> 138 + error_description: <string> 139 + '403': 140 + description: Forbidden 141 + content: 142 + application/json: 143 + schema: 144 + type: object 145 + properties: 146 + errors: 147 + type: object 148 + properties: 149 + code: 150 + type: string 151 + example: <string> 152 + reason: 153 + type: string 154 + example: <string> 155 + timestamp: 156 + type: number 157 + example: <number> 158 + examples: 159 + Forbidden: 160 + value: 161 + errors: 162 + code: <string> 163 + reason: <string> 164 + timestamp: <number> 165 + '404': 166 + description: Not Found 167 + content: 168 + application/octet-stream: 169 + examples: 170 + Not Found: 171 + value: '"<object>"' 172 + '500': 173 + description: Internal Server Error 174 + content: 175 + application/json: 176 + schema: 177 + type: object 178 + properties: 179 + errors: 180 + type: object 181 + properties: 182 + code: 183 + type: string 184 + example: <string> 185 + reason: 186 + type: string 187 + example: <string> 188 + timestamp: 189 + type: number 190 + example: <number> 191 + examples: 192 + Internal Server Error: 193 + value: 194 + errors: 195 + code: <string> 196 + reason: <string> 197 + timestamp: <number> 198 + /cart/add: 199 + put: 200 + security: 201 + - OAuth2AuthorizationCode: 202 + - cart.basic:write 203 + tags: 204 + - Cart 205 + summary: Add to cart 206 + description: >- 207 + Provides you with access to add items to the cart of an authenticated 208 + customer. <br><br> **Note**: the customer must be authenticated using 209 + the OAuth2 Authorization Code grant type. 210 + operationId: addToCart 211 + requestBody: 212 + content: 213 + application/json: 214 + schema: 215 + type: object 216 + properties: 217 + items: 218 + type: array 219 + items: 220 + type: object 221 + properties: 222 + modality: 223 + type: string 224 + example: <string> 225 + quantity: 226 + type: number 227 + example: 1 228 + upc: 229 + type: string 230 + example: '0001111040101' 231 + example: 232 + - modality: <string> 233 + quantity: 1 234 + upc: '0001111040101' 235 + example: 236 + items: 237 + - modality: <string> 238 + quantity: 1 239 + upc: '0001111040101' 240 + responses: 241 + '204': 242 + description: OK 243 + content: 244 + application/octet-stream: 245 + examples: 246 + OK: 247 + value: '"<object>"' 248 + '400': 249 + description: Bad Request 250 + content: 251 + application/json: 252 + schema: 253 + type: object 254 + properties: 255 + errors: 256 + type: string 257 + example: <object> 258 + examples: 259 + Bad Request: 260 + value: 261 + errors: <object> 262 + '401': 263 + description: Unauthorized 264 + content: 265 + application/json: 266 + schema: 267 + type: object 268 + properties: 269 + errors: 270 + type: object 271 + properties: 272 + error: 273 + type: string 274 + example: <string> 275 + error_description: 276 + type: string 277 + example: <string> 278 + examples: 279 + Unauthorized: 280 + value: 281 + errors: 282 + error: <string> 283 + error_description: <string> 284 + '500': 285 + description: Internal Server Error 286 + content: 287 + application/json: 288 + schema: 289 + type: object 290 + properties: 291 + errors: 292 + type: object 293 + properties: 294 + code: 295 + type: string 296 + example: <string> 297 + reason: 298 + type: string 299 + example: <string> 300 + timestamp: 301 + type: number 302 + example: <number> 303 + examples: 304 + Internal Server Error: 305 + value: 306 + errors: 307 + code: <string> 308 + reason: <string> 309 + timestamp: <number> 310 + /products: 311 + get: 312 + security: 313 + - OAuth2AuthorizationCode: 314 + - product.compact 315 + - OAuth2ClientCreds: 316 + - product.compact 317 + tags: 318 + - Products 319 + summary: Product Search 320 + description: >- 321 + Allows you to find products by passing in either a search term or product Id. 322 + 323 + Initial Search Value Required 324 + An initial search value is requred for all requests. You can use either of the following parameters as an initial search value: 325 + 326 + filter.term - When using the term parameter, the API performs a fuzzy search based on the term provided in the string. Search results are based on how relevant the term is to the product description. 327 + 328 + filter.productId - When using the productId parameter, the API performs a query to find an exact match. 329 + operationId: productSearch 330 + parameters: 331 + - name: filter.term 332 + in: query 333 + schema: 334 + type: string 335 + example: <string> 336 + description: >- 337 + A search term to filter product results. As an example, you could 338 + input milk, bread, or salt. 339 + - name: filter.locationId 340 + in: query 341 + schema: 342 + type: string 343 + example: <string> 344 + description: >- 345 + The locationId of the store you want results limited to. When using 346 + this filter, only products available at that location are returned. 347 + - name: filter.productId 348 + in: query 349 + schema: 350 + type: string 351 + example: <string> 352 + description: >- 353 + The productId of the products(s) you want returned. For more than 354 + one item, the list must be comma-separated. When used, all other 355 + query parameters are ignored. 356 + - name: filter.brand 357 + in: query 358 + schema: 359 + type: string 360 + example: <string> 361 + description: >- 362 + The brand name of the product(s) you want returned. When using this 363 + filter, only products by that brand are returned. Brand names are 364 + case-sensitive, and lists must be pipe-separated. 365 + - name: filter.fulfillment 366 + in: query 367 + schema: 368 + type: string 369 + example: <string> 370 + description: >- 371 + The available fulfillment types of the product(s) you want returned. 372 + Fulfillment types are case-sensitive, and lists must be 373 + comma-separated. Must be one or more of the follow types: ais - 374 + Available In Store, csp - Curbside Pickup, dth - Delivery To Home, 375 + sth - Ship To Home 376 + - name: filter.start 377 + in: query 378 + schema: 379 + type: string 380 + example: <string> 381 + description: The number of products you want to skip. 382 + - name: filter.limit 383 + in: query 384 + schema: 385 + type: string 386 + example: <integer> 387 + description: The number of products you want returned. 388 + responses: 389 + '200': 390 + description: OK 391 + content: 392 + application/json: 393 + schema: 394 + type: object 395 + properties: 396 + data: 397 + type: array 398 + items: 399 + type: object 400 + properties: 401 + aisleLocations: 402 + type: array 403 + items: 404 + type: object 405 + properties: 406 + bayNumber: 407 + type: string 408 + example: <string> 409 + description: 410 + type: string 411 + example: <string> 412 + number: 413 + type: string 414 + example: <string> 415 + numberOfFacings: 416 + type: string 417 + example: <string> 418 + sequenceNumber: 419 + type: string 420 + example: <string> 421 + shelfNumber: 422 + type: string 423 + example: <string> 424 + shelfPositionInBay: 425 + type: string 426 + example: <string> 427 + side: 428 + type: string 429 + example: <string> 430 + example: 431 + - bayNumber: <string> 432 + description: <string> 433 + number: <string> 434 + numberOfFacings: <string> 435 + sequenceNumber: <string> 436 + shelfNumber: <string> 437 + shelfPositionInBay: <string> 438 + side: <string> 439 + - bayNumber: <string> 440 + description: <string> 441 + number: <string> 442 + numberOfFacings: <string> 443 + sequenceNumber: <string> 444 + shelfNumber: <string> 445 + shelfPositionInBay: <string> 446 + side: <string> 447 + brand: 448 + type: string 449 + example: <string> 450 + categories: 451 + type: array 452 + items: 453 + type: string 454 + example: <string> 455 + example: 456 + - <string> 457 + - <string> 458 + countryOrigin: 459 + type: string 460 + example: <string> 461 + description: 462 + type: string 463 + example: <string> 464 + images: 465 + type: array 466 + items: 467 + type: object 468 + properties: 469 + default: 470 + type: boolean 471 + example: <boolean> 472 + type: 473 + type: string 474 + example: boolean 475 + example: 476 + - default: <boolean> 477 + type: boolean 478 + - default: <boolean> 479 + type: boolean 480 + itemInformation: 481 + type: object 482 + properties: 483 + depth: 484 + type: string 485 + example: <string> 486 + height: 487 + type: string 488 + example: <string> 489 + width: 490 + type: string 491 + example: <string> 492 + items: 493 + type: array 494 + items: 495 + type: object 496 + properties: 497 + favorite: 498 + type: boolean 499 + example: <boolean> 500 + fulfillment: 501 + type: object 502 + properties: 503 + curbside: 504 + type: boolean 505 + example: <boolean> 506 + delivery: 507 + type: boolean 508 + example: <boolean> 509 + inventory: 510 + type: object 511 + properties: 512 + stockLevel: 513 + type: string 514 + example: <string> 515 + itemId: 516 + type: string 517 + example: <string> 518 + price: 519 + type: object 520 + properties: 521 + promo: 522 + type: number 523 + example: <number> 524 + regular: 525 + type: number 526 + example: <number> 527 + size: 528 + type: string 529 + example: <string> 530 + example: 531 + - favorite: <boolean> 532 + fulfillment: 533 + curbside: <boolean> 534 + delivery: <boolean> 535 + inventory: 536 + stockLevel: <string> 537 + itemId: <string> 538 + price: 539 + promo: <number> 540 + regular: <number> 541 + size: <string> 542 + - favorite: <boolean> 543 + fulfillment: 544 + curbside: <boolean> 545 + delivery: <boolean> 546 + inventory: 547 + stockLevel: <string> 548 + itemId: <string> 549 + price: 550 + promo: <number> 551 + regular: <number> 552 + size: <string> 553 + productId: 554 + type: string 555 + example: <string> 556 + temperature: 557 + type: object 558 + properties: 559 + heatSensitive: 560 + type: boolean 561 + example: <boolean> 562 + indicator: 563 + type: string 564 + example: <string> 565 + upc: 566 + type: string 567 + example: <string> 568 + example: 569 + - aisleLocations: 570 + - bayNumber: <string> 571 + description: <string> 572 + number: <string> 573 + numberOfFacings: <string> 574 + sequenceNumber: <string> 575 + shelfNumber: <string> 576 + shelfPositionInBay: <string> 577 + side: <string> 578 + - bayNumber: <string> 579 + description: <string> 580 + number: <string> 581 + numberOfFacings: <string> 582 + sequenceNumber: <string> 583 + shelfNumber: <string> 584 + shelfPositionInBay: <string> 585 + side: <string> 586 + brand: <string> 587 + categories: 588 + - <string> 589 + - <string> 590 + countryOrigin: <string> 591 + description: <string> 592 + images: 593 + - default: <boolean> 594 + type: boolean 595 + - default: <boolean> 596 + type: boolean 597 + itemInformation: 598 + depth: <string> 599 + height: <string> 600 + width: <string> 601 + items: 602 + - favorite: <boolean> 603 + fulfillment: 604 + curbside: <boolean> 605 + delivery: <boolean> 606 + inventory: 607 + stockLevel: <string> 608 + itemId: <string> 609 + price: 610 + promo: <number> 611 + regular: <number> 612 + size: <string> 613 + - favorite: <boolean> 614 + fulfillment: 615 + curbside: <boolean> 616 + delivery: <boolean> 617 + inventory: 618 + stockLevel: <string> 619 + itemId: <string> 620 + price: 621 + promo: <number> 622 + regular: <number> 623 + size: <string> 624 + productId: <string> 625 + temperature: 626 + heatSensitive: <boolean> 627 + indicator: <string> 628 + upc: <string> 629 + - aisleLocations: 630 + - bayNumber: <string> 631 + description: <string> 632 + number: <string> 633 + numberOfFacings: <string> 634 + sequenceNumber: <string> 635 + shelfNumber: <string> 636 + shelfPositionInBay: <string> 637 + side: <string> 638 + - bayNumber: <string> 639 + description: <string> 640 + number: <string> 641 + numberOfFacings: <string> 642 + sequenceNumber: <string> 643 + shelfNumber: <string> 644 + shelfPositionInBay: <string> 645 + side: <string> 646 + brand: <string> 647 + categories: 648 + - <string> 649 + - <string> 650 + countryOrigin: <string> 651 + description: <string> 652 + images: 653 + - default: <boolean> 654 + type: boolean 655 + - default: <boolean> 656 + type: boolean 657 + itemInformation: 658 + depth: <string> 659 + height: <string> 660 + width: <string> 661 + items: 662 + - favorite: <boolean> 663 + fulfillment: 664 + curbside: <boolean> 665 + delivery: <boolean> 666 + inventory: 667 + stockLevel: <string> 668 + itemId: <string> 669 + price: 670 + promo: <number> 671 + regular: <number> 672 + size: <string> 673 + productId: <string> 674 + temperature: 675 + heatSensitive: <boolean> 676 + indicator: <string> 677 + upc: <string> 678 + meta: 679 + type: object 680 + properties: 681 + pagination: 682 + type: object 683 + properties: 684 + limit: 685 + type: number 686 + example: <number> 687 + start: 688 + type: number 689 + example: <number> 690 + total: 691 + type: number 692 + example: <number> 693 + warnings: 694 + type: array 695 + items: 696 + type: string 697 + example: <string> 698 + example: 699 + - <string> 700 + - <string> 701 + examples: 702 + OK: 703 + value: 704 + data: 705 + - aisleLocations: 706 + - bayNumber: <string> 707 + description: <string> 708 + number: <string> 709 + numberOfFacings: <string> 710 + sequenceNumber: <string> 711 + shelfNumber: <string> 712 + shelfPositionInBay: <string> 713 + side: <string> 714 + - bayNumber: <string> 715 + description: <string> 716 + number: <string> 717 + numberOfFacings: <string> 718 + sequenceNumber: <string> 719 + shelfNumber: <string> 720 + shelfPositionInBay: <string> 721 + side: <string> 722 + brand: <string> 723 + categories: 724 + - <string> 725 + - <string> 726 + countryOrigin: <string> 727 + description: <string> 728 + images: 729 + - default: <boolean> 730 + type: boolean 731 + - default: <boolean> 732 + type: boolean 733 + itemInformation: 734 + depth: <string> 735 + height: <string> 736 + width: <string> 737 + items: 738 + - favorite: <boolean> 739 + fulfillment: 740 + curbside: <boolean> 741 + delivery: <boolean> 742 + inventory: 743 + stockLevel: <string> 744 + itemId: <string> 745 + price: 746 + promo: <number> 747 + regular: <number> 748 + size: <string> 749 + - favorite: <boolean> 750 + fulfillment: 751 + curbside: <boolean> 752 + delivery: <boolean> 753 + inventory: 754 + stockLevel: <string> 755 + itemId: <string> 756 + price: 757 + promo: <number> 758 + regular: <number> 759 + size: <string> 760 + productId: <string> 761 + temperature: 762 + heatSensitive: <boolean> 763 + indicator: <string> 764 + upc: <string> 765 + - aisleLocations: 766 + - bayNumber: <string> 767 + description: <string> 768 + number: <string> 769 + numberOfFacings: <string> 770 + sequenceNumber: <string> 771 + shelfNumber: <string> 772 + shelfPositionInBay: <string> 773 + side: <string> 774 + - bayNumber: <string> 775 + description: <string> 776 + number: <string> 777 + numberOfFacings: <string> 778 + sequenceNumber: <string> 779 + shelfNumber: <string> 780 + shelfPositionInBay: <string> 781 + side: <string> 782 + brand: <string> 783 + categories: 784 + - <string> 785 + - <string> 786 + countryOrigin: <string> 787 + description: <string> 788 + images: 789 + - default: <boolean> 790 + type: boolean 791 + - default: <boolean> 792 + type: boolean 793 + itemInformation: 794 + depth: <string> 795 + height: <string> 796 + width: <string> 797 + items: 798 + - favorite: <boolean> 799 + fulfillment: 800 + curbside: <boolean> 801 + delivery: <boolean> 802 + inventory: 803 + stockLevel: <string> 804 + itemId: <string> 805 + price: 806 + promo: <number> 807 + regular: <number> 808 + size: <string> 809 + productId: <string> 810 + temperature: 811 + heatSensitive: <boolean> 812 + indicator: <string> 813 + upc: <string> 814 + meta: 815 + pagination: 816 + limit: <number> 817 + start: <number> 818 + total: <number> 819 + warnings: 820 + - <string> 821 + - <string> 822 + '400': 823 + description: Bad Request 824 + content: 825 + application/json: 826 + schema: 827 + type: object 828 + properties: 829 + errors: 830 + type: string 831 + example: <object> 832 + examples: 833 + Bad Request: 834 + value: 835 + errors: <object> 836 + '401': 837 + description: Unauthorized 838 + content: 839 + application/json: 840 + schema: 841 + type: object 842 + properties: 843 + errors: 844 + type: object 845 + properties: 846 + error: 847 + type: string 848 + example: <string> 849 + error_description: 850 + type: string 851 + example: <string> 852 + examples: 853 + Unauthorized: 854 + value: 855 + errors: 856 + error: <string> 857 + error_description: <string> 858 + '500': 859 + description: Internal Server Error 860 + content: 861 + application/json: 862 + schema: 863 + type: object 864 + properties: 865 + errors: 866 + type: object 867 + properties: 868 + code: 869 + type: string 870 + example: <string> 871 + reason: 872 + type: string 873 + example: <string> 874 + timestamp: 875 + type: number 876 + example: <number> 877 + examples: 878 + Internal Server Error: 879 + value: 880 + errors: 881 + code: <string> 882 + reason: <string> 883 + timestamp: <number> 884 + /products/{id}: 885 + get: 886 + security: 887 + - OAuth2AuthorizationCode: 888 + - product.compact 889 + - OAuth2ClientCreds: 890 + - product.compact 891 + tags: 892 + - Products 893 + summary: Product details 894 + description: >- 895 + Provides access to the details of a specific product by either using the 896 + `productId` or `UPC`. To return the product price and aisle location, 897 + you must include the `filter.locationId` query parameters. 898 + operationId: productDetails 899 + parameters: 900 + - name: filter.locationId 901 + in: query 902 + schema: 903 + type: string 904 + example: <string> 905 + description: >- 906 + The locationId of the store you want results limited to. When using 907 + this filter, only products available at that location are returned. 908 + responses: 909 + '200': 910 + description: OK 911 + content: 912 + application/json: 913 + schema: 914 + type: object 915 + properties: 916 + data: 917 + type: object 918 + properties: 919 + aisleLocations: 920 + type: array 921 + items: 922 + type: object 923 + properties: 924 + bayNumber: 925 + type: string 926 + example: <string> 927 + description: 928 + type: string 929 + example: <string> 930 + number: 931 + type: string 932 + example: <string> 933 + numberOfFacings: 934 + type: string 935 + example: <string> 936 + sequenceNumber: 937 + type: string 938 + example: <string> 939 + shelfNumber: 940 + type: string 941 + example: <string> 942 + shelfPositionInBay: 943 + type: string 944 + example: <string> 945 + side: 946 + type: string 947 + example: <string> 948 + example: 949 + - bayNumber: <string> 950 + description: <string> 951 + number: <string> 952 + numberOfFacings: <string> 953 + sequenceNumber: <string> 954 + shelfNumber: <string> 955 + shelfPositionInBay: <string> 956 + side: <string> 957 + - bayNumber: <string> 958 + description: <string> 959 + number: <string> 960 + numberOfFacings: <string> 961 + sequenceNumber: <string> 962 + shelfNumber: <string> 963 + shelfPositionInBay: <string> 964 + side: <string> 965 + brand: 966 + type: string 967 + example: <string> 968 + categories: 969 + type: array 970 + items: 971 + type: string 972 + example: <string> 973 + example: 974 + - <string> 975 + - <string> 976 + countryOrigin: 977 + type: string 978 + example: <string> 979 + description: 980 + type: string 981 + example: <string> 982 + images: 983 + type: array 984 + items: 985 + type: object 986 + properties: 987 + default: 988 + type: boolean 989 + example: <boolean> 990 + type: 991 + type: string 992 + example: boolean 993 + example: 994 + - default: <boolean> 995 + type: boolean 996 + - default: <boolean> 997 + type: boolean 998 + itemInformation: 999 + type: object 1000 + properties: 1001 + depth: 1002 + type: string 1003 + example: <string> 1004 + height: 1005 + type: string 1006 + example: <string> 1007 + width: 1008 + type: string 1009 + example: <string> 1010 + items: 1011 + type: array 1012 + items: 1013 + type: object 1014 + properties: 1015 + favorite: 1016 + type: boolean 1017 + example: <boolean> 1018 + fulfillment: 1019 + type: object 1020 + properties: 1021 + curbside: 1022 + type: boolean 1023 + example: <boolean> 1024 + delivery: 1025 + type: boolean 1026 + example: <boolean> 1027 + inventory: 1028 + type: object 1029 + properties: 1030 + stockLevel: 1031 + type: string 1032 + example: <string> 1033 + itemId: 1034 + type: string 1035 + example: <string> 1036 + price: 1037 + type: object 1038 + properties: 1039 + promo: 1040 + type: number 1041 + example: <number> 1042 + regular: 1043 + type: number 1044 + example: <number> 1045 + size: 1046 + type: string 1047 + example: <string> 1048 + example: 1049 + - favorite: <boolean> 1050 + fulfillment: 1051 + curbside: <boolean> 1052 + delivery: <boolean> 1053 + inventory: 1054 + stockLevel: <string> 1055 + itemId: <string> 1056 + price: 1057 + promo: <number> 1058 + regular: <number> 1059 + size: <string> 1060 + productId: 1061 + type: string 1062 + example: <string> 1063 + temperature: 1064 + type: object 1065 + properties: 1066 + heatSensitive: 1067 + type: boolean 1068 + example: <boolean> 1069 + indicator: 1070 + type: string 1071 + example: <string> 1072 + upc: 1073 + type: string 1074 + example: <string> 1075 + meta: 1076 + type: object 1077 + properties: 1078 + pagination: 1079 + type: object 1080 + properties: 1081 + limit: 1082 + type: number 1083 + example: <number> 1084 + start: 1085 + type: number 1086 + example: <number> 1087 + total: 1088 + type: number 1089 + example: <number> 1090 + warnings: 1091 + type: array 1092 + items: 1093 + type: string 1094 + example: <string> 1095 + example: 1096 + - <string> 1097 + - <string> 1098 + examples: 1099 + OK: 1100 + value: 1101 + data: 1102 + aisleLocations: 1103 + - bayNumber: <string> 1104 + description: <string> 1105 + number: <string> 1106 + numberOfFacings: <string> 1107 + sequenceNumber: <string> 1108 + shelfNumber: <string> 1109 + shelfPositionInBay: <string> 1110 + side: <string> 1111 + - bayNumber: <string> 1112 + description: <string> 1113 + number: <string> 1114 + numberOfFacings: <string> 1115 + sequenceNumber: <string> 1116 + shelfNumber: <string> 1117 + shelfPositionInBay: <string> 1118 + side: <string> 1119 + brand: <string> 1120 + categories: 1121 + - <string> 1122 + - <string> 1123 + countryOrigin: <string> 1124 + description: <string> 1125 + images: 1126 + - default: <boolean> 1127 + type: boolean 1128 + - default: <boolean> 1129 + type: boolean 1130 + itemInformation: 1131 + depth: <string> 1132 + height: <string> 1133 + width: <string> 1134 + items: 1135 + - favorite: <boolean> 1136 + fulfillment: 1137 + curbside: <boolean> 1138 + delivery: <boolean> 1139 + inventory: 1140 + stockLevel: <string> 1141 + itemId: <string> 1142 + price: 1143 + promo: <number> 1144 + regular: <number> 1145 + size: <string> 1146 + productId: <string> 1147 + temperature: 1148 + heatSensitive: <boolean> 1149 + indicator: <string> 1150 + upc: <string> 1151 + meta: 1152 + pagination: 1153 + limit: <number> 1154 + start: <number> 1155 + total: <number> 1156 + warnings: 1157 + - <string> 1158 + - <string> 1159 + '400': 1160 + description: Bad Request 1161 + content: 1162 + application/json: 1163 + schema: 1164 + type: object 1165 + properties: 1166 + errors: 1167 + type: object 1168 + properties: 1169 + code: 1170 + type: string 1171 + example: <string> 1172 + reason: 1173 + type: string 1174 + example: <string> 1175 + timestamp: 1176 + type: number 1177 + example: <number> 1178 + examples: 1179 + Bad Request: 1180 + value: 1181 + errors: 1182 + code: <string> 1183 + reason: <string> 1184 + timestamp: <number> 1185 + '401': 1186 + description: Unauthorized 1187 + content: 1188 + application/json: 1189 + schema: 1190 + type: object 1191 + properties: 1192 + errors: 1193 + type: object 1194 + properties: 1195 + error: 1196 + type: string 1197 + example: <string> 1198 + error_description: 1199 + type: string 1200 + example: <string> 1201 + examples: 1202 + Unauthorized: 1203 + value: 1204 + errors: 1205 + error: <string> 1206 + error_description: <string> 1207 + '404': 1208 + description: Not Found 1209 + content: 1210 + application/octet-stream: 1211 + examples: 1212 + Not Found: 1213 + value: '"<object>"' 1214 + '500': 1215 + description: Internal Server Error 1216 + content: 1217 + application/json: 1218 + schema: 1219 + type: object 1220 + properties: 1221 + errors: 1222 + type: object 1223 + properties: 1224 + code: 1225 + type: string 1226 + example: <string> 1227 + reason: 1228 + type: string 1229 + example: <string> 1230 + timestamp: 1231 + type: number 1232 + example: <number> 1233 + examples: 1234 + Internal Server Error: 1235 + value: 1236 + errors: 1237 + code: <string> 1238 + reason: <string> 1239 + timestamp: <number> 1240 + parameters: 1241 + - name: id 1242 + in: path 1243 + required: true 1244 + schema: 1245 + type: string 1246 + example: '' 1247 + description: Either the productId or UPC of the product you want returned. 1248 + /locations/{locationId}: 1249 + get: 1250 + security: 1251 + - OAuth2AuthorizationCode: [] 1252 + - OAuth2ClientCreds: [] 1253 + tags: 1254 + - Locations 1255 + summary: Location details 1256 + description: >- 1257 + Provides access to the details of a specific location by using the 1258 + `locationId`. 1259 + operationId: locationDetails 1260 + responses: 1261 + '200': 1262 + description: OK 1263 + content: 1264 + application/json: 1265 + schema: 1266 + type: object 1267 + properties: 1268 + data: 1269 + type: object 1270 + properties: 1271 + address: 1272 + type: object 1273 + properties: 1274 + addressLine1: 1275 + type: string 1276 + example: <string> 1277 + addressLine2: 1278 + type: string 1279 + example: <string> 1280 + city: 1281 + type: string 1282 + example: <string> 1283 + county: 1284 + type: string 1285 + example: <string> 1286 + state: 1287 + type: string 1288 + example: <string> 1289 + zipCode: 1290 + type: string 1291 + example: <string> 1292 + chain: 1293 + type: string 1294 + example: <string> 1295 + departments: 1296 + type: array 1297 + items: 1298 + type: object 1299 + properties: 1300 + departmentId: 1301 + type: string 1302 + example: <string> 1303 + hours: 1304 + type: object 1305 + properties: 1306 + Open24: 1307 + type: boolean 1308 + example: <boolean> 1309 + friday: 1310 + type: object 1311 + properties: 1312 + close: 1313 + type: string 1314 + example: <string> 1315 + open: 1316 + type: string 1317 + example: <string> 1318 + open24: 1319 + type: boolean 1320 + example: <boolean> 1321 + monday: 1322 + type: object 1323 + properties: 1324 + close: 1325 + type: string 1326 + example: <string> 1327 + open: 1328 + type: string 1329 + example: <string> 1330 + open24: 1331 + type: boolean 1332 + example: <boolean> 1333 + saturday: 1334 + type: object 1335 + properties: 1336 + close: 1337 + type: string 1338 + example: <string> 1339 + open: 1340 + type: string 1341 + example: <string> 1342 + open24: 1343 + type: boolean 1344 + example: <boolean> 1345 + sunday: 1346 + type: object 1347 + properties: 1348 + close: 1349 + type: string 1350 + example: <string> 1351 + open: 1352 + type: string 1353 + example: <string> 1354 + open24: 1355 + type: boolean 1356 + example: <boolean> 1357 + thursday: 1358 + type: object 1359 + properties: 1360 + close: 1361 + type: string 1362 + example: <string> 1363 + open: 1364 + type: string 1365 + example: <string> 1366 + open24: 1367 + type: boolean 1368 + example: <boolean> 1369 + tuesday: 1370 + type: object 1371 + properties: 1372 + close: 1373 + type: string 1374 + example: <string> 1375 + open: 1376 + type: string 1377 + example: <string> 1378 + open24: 1379 + type: boolean 1380 + example: <boolean> 1381 + wednesday: 1382 + type: object 1383 + properties: 1384 + close: 1385 + type: string 1386 + example: <string> 1387 + open: 1388 + type: string 1389 + example: <string> 1390 + open24: 1391 + type: boolean 1392 + example: <boolean> 1393 + name: 1394 + type: string 1395 + example: <string> 1396 + phone: 1397 + type: string 1398 + example: <string> 1399 + example: 1400 + - departmentId: <string> 1401 + hours: 1402 + Open24: <boolean> 1403 + friday: 1404 + close: <string> 1405 + open: <string> 1406 + open24: <boolean> 1407 + monday: 1408 + close: <string> 1409 + open: <string> 1410 + open24: <boolean> 1411 + saturday: 1412 + close: <string> 1413 + open: <string> 1414 + open24: <boolean> 1415 + sunday: 1416 + close: <string> 1417 + open: <string> 1418 + open24: <boolean> 1419 + thursday: 1420 + close: <string> 1421 + open: <string> 1422 + open24: <boolean> 1423 + tuesday: 1424 + close: <string> 1425 + open: <string> 1426 + open24: <boolean> 1427 + wednesday: 1428 + close: <string> 1429 + open: <string> 1430 + open24: <boolean> 1431 + name: <string> 1432 + phone: <string> 1433 + - departmentId: <string> 1434 + hours: 1435 + Open24: <boolean> 1436 + friday: 1437 + close: <string> 1438 + open: <string> 1439 + open24: <boolean> 1440 + monday: 1441 + close: <string> 1442 + open: <string> 1443 + open24: <boolean> 1444 + saturday: 1445 + close: <string> 1446 + open: <string> 1447 + open24: <boolean> 1448 + sunday: 1449 + close: <string> 1450 + open: <string> 1451 + open24: <boolean> 1452 + thursday: 1453 + close: <string> 1454 + open: <string> 1455 + open24: <boolean> 1456 + tuesday: 1457 + close: <string> 1458 + open: <string> 1459 + open24: <boolean> 1460 + wednesday: 1461 + close: <string> 1462 + open: <string> 1463 + open24: <boolean> 1464 + name: <string> 1465 + phone: <string> 1466 + divisionNumber: 1467 + type: string 1468 + example: <string> 1469 + geolocation: 1470 + type: object 1471 + properties: 1472 + latLng: 1473 + type: string 1474 + example: <string> 1475 + latitude: 1476 + type: number 1477 + example: <number> 1478 + longitude: 1479 + type: number 1480 + example: <number> 1481 + hours: 1482 + type: object 1483 + properties: 1484 + Open24: 1485 + type: boolean 1486 + example: <boolean> 1487 + friday: 1488 + type: object 1489 + properties: 1490 + close: 1491 + type: string 1492 + example: <string> 1493 + open: 1494 + type: string 1495 + example: <string> 1496 + open24: 1497 + type: boolean 1498 + example: <boolean> 1499 + gmtOffset: 1500 + type: string 1501 + example: <string> 1502 + monday: 1503 + type: object 1504 + properties: 1505 + close: 1506 + type: string 1507 + example: <string> 1508 + open: 1509 + type: string 1510 + example: <string> 1511 + open24: 1512 + type: boolean 1513 + example: <boolean> 1514 + saturday: 1515 + type: object 1516 + properties: 1517 + close: 1518 + type: string 1519 + example: <string> 1520 + open: 1521 + type: string 1522 + example: <string> 1523 + open24: 1524 + type: boolean 1525 + example: <boolean> 1526 + sunday: 1527 + type: object 1528 + properties: 1529 + close: 1530 + type: string 1531 + example: <string> 1532 + open: 1533 + type: string 1534 + example: <string> 1535 + open24: 1536 + type: boolean 1537 + example: <boolean> 1538 + thursday: 1539 + type: object 1540 + properties: 1541 + close: 1542 + type: string 1543 + example: <string> 1544 + open: 1545 + type: string 1546 + example: <string> 1547 + open24: 1548 + type: boolean 1549 + example: <boolean> 1550 + timezone: 1551 + type: string 1552 + example: <string> 1553 + tuesday: 1554 + type: object 1555 + properties: 1556 + close: 1557 + type: string 1558 + example: <string> 1559 + open: 1560 + type: string 1561 + example: <string> 1562 + open24: 1563 + type: boolean 1564 + example: <boolean> 1565 + wednesday: 1566 + type: object 1567 + properties: 1568 + close: 1569 + type: string 1570 + example: <string> 1571 + open: 1572 + type: string 1573 + example: <string> 1574 + open24: 1575 + type: boolean 1576 + example: <boolean> 1577 + locationId: 1578 + type: string 1579 + example: <string> 1580 + name: 1581 + type: string 1582 + example: <string> 1583 + phone: 1584 + type: string 1585 + example: <string> 1586 + storeNumber: 1587 + type: string 1588 + example: <string> 1589 + meta: 1590 + type: object 1591 + properties: 1592 + pagination: 1593 + type: object 1594 + properties: 1595 + limit: 1596 + type: number 1597 + example: <number> 1598 + start: 1599 + type: number 1600 + example: <number> 1601 + total: 1602 + type: number 1603 + example: <number> 1604 + warnings: 1605 + type: array 1606 + items: 1607 + type: string 1608 + example: <string> 1609 + example: 1610 + - <string> 1611 + - <string> 1612 + examples: 1613 + OK: 1614 + value: 1615 + data: 1616 + address: 1617 + addressLine1: <string> 1618 + addressLine2: <string> 1619 + city: <string> 1620 + county: <string> 1621 + state: <string> 1622 + zipCode: <string> 1623 + chain: <string> 1624 + departments: 1625 + - departmentId: <string> 1626 + hours: 1627 + Open24: <boolean> 1628 + friday: 1629 + close: <string> 1630 + open: <string> 1631 + open24: <boolean> 1632 + monday: 1633 + close: <string> 1634 + open: <string> 1635 + open24: <boolean> 1636 + saturday: 1637 + close: <string> 1638 + open: <string> 1639 + open24: <boolean> 1640 + sunday: 1641 + close: <string> 1642 + open: <string> 1643 + open24: <boolean> 1644 + thursday: 1645 + close: <string> 1646 + open: <string> 1647 + open24: <boolean> 1648 + tuesday: 1649 + close: <string> 1650 + open: <string> 1651 + open24: <boolean> 1652 + wednesday: 1653 + close: <string> 1654 + open: <string> 1655 + open24: <boolean> 1656 + name: <string> 1657 + phone: <string> 1658 + - departmentId: <string> 1659 + hours: 1660 + Open24: <boolean> 1661 + friday: 1662 + close: <string> 1663 + open: <string> 1664 + open24: <boolean> 1665 + monday: 1666 + close: <string> 1667 + open: <string> 1668 + open24: <boolean> 1669 + saturday: 1670 + close: <string> 1671 + open: <string> 1672 + open24: <boolean> 1673 + sunday: 1674 + close: <string> 1675 + open: <string> 1676 + open24: <boolean> 1677 + thursday: 1678 + close: <string> 1679 + open: <string> 1680 + open24: <boolean> 1681 + tuesday: 1682 + close: <string> 1683 + open: <string> 1684 + open24: <boolean> 1685 + wednesday: 1686 + close: <string> 1687 + open: <string> 1688 + open24: <boolean> 1689 + name: <string> 1690 + phone: <string> 1691 + divisionNumber: <string> 1692 + geolocation: 1693 + latLng: <string> 1694 + latitude: <number> 1695 + longitude: <number> 1696 + hours: 1697 + Open24: <boolean> 1698 + friday: 1699 + close: <string> 1700 + open: <string> 1701 + open24: <boolean> 1702 + gmtOffset: <string> 1703 + monday: 1704 + close: <string> 1705 + open: <string> 1706 + open24: <boolean> 1707 + saturday: 1708 + close: <string> 1709 + open: <string> 1710 + open24: <boolean> 1711 + sunday: 1712 + close: <string> 1713 + open: <string> 1714 + open24: <boolean> 1715 + thursday: 1716 + close: <string> 1717 + open: <string> 1718 + open24: <boolean> 1719 + timezone: <string> 1720 + tuesday: 1721 + close: <string> 1722 + open: <string> 1723 + open24: <boolean> 1724 + wednesday: 1725 + close: <string> 1726 + open: <string> 1727 + open24: <boolean> 1728 + locationId: <string> 1729 + name: <string> 1730 + phone: <string> 1731 + storeNumber: <string> 1732 + meta: 1733 + pagination: 1734 + limit: <number> 1735 + start: <number> 1736 + total: <number> 1737 + warnings: 1738 + - <string> 1739 + - <string> 1740 + '400': 1741 + description: Bad Request 1742 + content: 1743 + application/json: 1744 + schema: 1745 + type: object 1746 + properties: 1747 + errors: 1748 + type: object 1749 + properties: 1750 + code: 1751 + type: string 1752 + example: <string> 1753 + reason: 1754 + type: string 1755 + example: <string> 1756 + timestamp: 1757 + type: number 1758 + example: <number> 1759 + examples: 1760 + Bad Request: 1761 + value: 1762 + errors: 1763 + code: <string> 1764 + reason: <string> 1765 + timestamp: <number> 1766 + '401': 1767 + description: Unauthorized 1768 + content: 1769 + application/json: 1770 + schema: 1771 + type: object 1772 + properties: 1773 + errors: 1774 + type: object 1775 + properties: 1776 + error: 1777 + type: string 1778 + example: <string> 1779 + error_description: 1780 + type: string 1781 + example: <string> 1782 + examples: 1783 + Unauthorized: 1784 + value: 1785 + errors: 1786 + error: <string> 1787 + error_description: <string> 1788 + '404': 1789 + description: Not Found 1790 + content: 1791 + application/octet-stream: 1792 + examples: 1793 + Not Found: 1794 + value: '"<object>"' 1795 + '500': 1796 + description: Internal Server Error 1797 + content: 1798 + application/json: 1799 + schema: 1800 + type: object 1801 + properties: 1802 + errors: 1803 + type: object 1804 + properties: 1805 + code: 1806 + type: string 1807 + example: <string> 1808 + reason: 1809 + type: string 1810 + example: <string> 1811 + timestamp: 1812 + type: number 1813 + example: <number> 1814 + examples: 1815 + Internal Server Error: 1816 + value: 1817 + errors: 1818 + code: <string> 1819 + reason: <string> 1820 + timestamp: <number> 1821 + parameters: 1822 + - name: locationId 1823 + in: path 1824 + required: true 1825 + schema: 1826 + type: string 1827 + example: <string> 1828 + description: The locationId of the store you want results limited to. 1829 + /locations: 1830 + get: 1831 + security: 1832 + - OAuth2AuthorizationCode: [] 1833 + - OAuth2ClientCreds: [] 1834 + 1835 + tags: 1836 + - Locations 1837 + summary: Location list 1838 + description: >- 1839 + Provides access to a list of locations matching a given criteria. If the 1840 + parameter `filter.chain` is not provided, the results include all 1841 + locations and chains owned by The Kroger Co.<br> <h3>Starting Point 1842 + Required</h3> You must include one of the following parameters as a 1843 + starting point to narrow search results:<br><br> <ul> <li> 1844 + <code>filter.zipCode.near</code></li> <li> 1845 + <code>filter.latLong.near</code></li> <li> <code>filter.lat.near</code> 1846 + and <code>filter.lon.near</code></li> </ul><br> If you do not provide a 1847 + starting point or provide more than one starting point, an error warning 1848 + is returned. By default, the results are limited to 10 locations within 1849 + a 10-mile radius of the provided starting point. If you would like to 1850 + extend the search results, you can use the parameter 1851 + `filter.radiusInMiles` to set a new mile radius or `filter.limit` to set 1852 + the number of results returned. 1853 + operationId: locationList 1854 + parameters: 1855 + - name: filter.zipCode.near 1856 + in: query 1857 + schema: 1858 + type: string 1859 + example: <string> 1860 + description: The zip code you want to use as a starting point for results. 1861 + - name: filter.latLong.near 1862 + in: query 1863 + schema: 1864 + type: string 1865 + example: <string> 1866 + description: >- 1867 + The latitude and longitude you want to use as a starting point for 1868 + results. 1869 + - name: filter.lat.near 1870 + in: query 1871 + schema: 1872 + type: string 1873 + example: <string> 1874 + description: The latitude you want to use as a starting point for results. 1875 + - name: filter.lon.near 1876 + in: query 1877 + schema: 1878 + type: string 1879 + example: <string> 1880 + description: The longitude you want to use as a starting point for results. 1881 + - name: filter.radiusInMiles 1882 + in: query 1883 + schema: 1884 + type: string 1885 + example: '10' 1886 + description: The mile radius you want results limited to. 1887 + - name: filter.limit 1888 + in: query 1889 + schema: 1890 + type: string 1891 + example: '10' 1892 + description: The number of results you want returned. 1893 + - name: filter.chain 1894 + in: query 1895 + schema: 1896 + type: string 1897 + example: <string> 1898 + description: >- 1899 + The chain name of the chain you want results limited to. When using 1900 + this filter, only stores matching the provided chain name are 1901 + returned. 1902 + - name: filter.department 1903 + in: query 1904 + schema: 1905 + type: string 1906 + example: <string> 1907 + description: >- 1908 + The departmentId of the department you want results limited to. 1909 + Lists must be comma-separated. When using this filter, only stores 1910 + who have all of the departments provided are returned. 1911 + responses: 1912 + '200': 1913 + description: OK 1914 + content: 1915 + application/json: 1916 + schema: 1917 + type: object 1918 + properties: 1919 + data: 1920 + type: array 1921 + items: 1922 + type: object 1923 + properties: 1924 + address: 1925 + type: object 1926 + properties: 1927 + addressLine1: 1928 + type: string 1929 + example: <string> 1930 + addressLine2: 1931 + type: string 1932 + example: <string> 1933 + city: 1934 + type: string 1935 + example: <string> 1936 + county: 1937 + type: string 1938 + example: <string> 1939 + state: 1940 + type: string 1941 + example: <string> 1942 + zipCode: 1943 + type: string 1944 + example: <string> 1945 + chain: 1946 + type: string 1947 + example: <string> 1948 + departments: 1949 + type: array 1950 + items: 1951 + type: object 1952 + properties: 1953 + departmentId: 1954 + type: string 1955 + example: <string> 1956 + hours: 1957 + type: object 1958 + properties: 1959 + Open24: 1960 + type: boolean 1961 + example: <boolean> 1962 + friday: 1963 + type: object 1964 + properties: 1965 + close: 1966 + type: string 1967 + example: <string> 1968 + open: 1969 + type: string 1970 + example: <string> 1971 + open24: 1972 + type: boolean 1973 + example: <boolean> 1974 + monday: 1975 + type: object 1976 + properties: 1977 + close: 1978 + type: string 1979 + example: <string> 1980 + open: 1981 + type: string 1982 + example: <string> 1983 + open24: 1984 + type: boolean 1985 + example: <boolean> 1986 + saturday: 1987 + type: object 1988 + properties: 1989 + close: 1990 + type: string 1991 + example: <string> 1992 + open: 1993 + type: string 1994 + example: <string> 1995 + open24: 1996 + type: boolean 1997 + example: <boolean> 1998 + sunday: 1999 + type: object 2000 + properties: 2001 + close: 2002 + type: string 2003 + example: <string> 2004 + open: 2005 + type: string 2006 + example: <string> 2007 + open24: 2008 + type: boolean 2009 + example: <boolean> 2010 + thursday: 2011 + type: object 2012 + properties: 2013 + close: 2014 + type: string 2015 + example: <string> 2016 + open: 2017 + type: string 2018 + example: <string> 2019 + open24: 2020 + type: boolean 2021 + example: <boolean> 2022 + tuesday: 2023 + type: object 2024 + properties: 2025 + close: 2026 + type: string 2027 + example: <string> 2028 + open: 2029 + type: string 2030 + example: <string> 2031 + open24: 2032 + type: boolean 2033 + example: <boolean> 2034 + wednesday: 2035 + type: object 2036 + properties: 2037 + close: 2038 + type: string 2039 + example: <string> 2040 + open: 2041 + type: string 2042 + example: <string> 2043 + open24: 2044 + type: boolean 2045 + example: <boolean> 2046 + name: 2047 + type: string 2048 + example: <string> 2049 + phone: 2050 + type: string 2051 + example: <string> 2052 + example: 2053 + - departmentId: <string> 2054 + hours: 2055 + Open24: <boolean> 2056 + friday: 2057 + close: <string> 2058 + open: <string> 2059 + open24: <boolean> 2060 + monday: 2061 + close: <string> 2062 + open: <string> 2063 + open24: <boolean> 2064 + saturday: 2065 + close: <string> 2066 + open: <string> 2067 + open24: <boolean> 2068 + sunday: 2069 + close: <string> 2070 + open: <string> 2071 + open24: <boolean> 2072 + thursday: 2073 + close: <string> 2074 + open: <string> 2075 + open24: <boolean> 2076 + tuesday: 2077 + close: <string> 2078 + open: <string> 2079 + open24: <boolean> 2080 + wednesday: 2081 + close: <string> 2082 + open: <string> 2083 + open24: <boolean> 2084 + name: <string> 2085 + phone: <string> 2086 + - departmentId: <string> 2087 + hours: 2088 + Open24: <boolean> 2089 + friday: 2090 + close: <string> 2091 + open: <string> 2092 + open24: <boolean> 2093 + monday: 2094 + close: <string> 2095 + open: <string> 2096 + open24: <boolean> 2097 + saturday: 2098 + close: <string> 2099 + open: <string> 2100 + open24: <boolean> 2101 + sunday: 2102 + close: <string> 2103 + open: <string> 2104 + open24: <boolean> 2105 + thursday: 2106 + close: <string> 2107 + open: <string> 2108 + open24: <boolean> 2109 + tuesday: 2110 + close: <string> 2111 + open: <string> 2112 + open24: <boolean> 2113 + wednesday: 2114 + close: <string> 2115 + open: <string> 2116 + open24: <boolean> 2117 + name: <string> 2118 + phone: <string> 2119 + divisionNumber: 2120 + type: string 2121 + example: <string> 2122 + geolocation: 2123 + type: object 2124 + properties: 2125 + latLng: 2126 + type: string 2127 + example: <string> 2128 + latitude: 2129 + type: number 2130 + example: <number> 2131 + longitude: 2132 + type: number 2133 + example: <number> 2134 + hours: 2135 + type: object 2136 + properties: 2137 + Open24: 2138 + type: boolean 2139 + example: <boolean> 2140 + friday: 2141 + type: object 2142 + properties: 2143 + close: 2144 + type: string 2145 + example: <string> 2146 + open: 2147 + type: string 2148 + example: <string> 2149 + open24: 2150 + type: boolean 2151 + example: <boolean> 2152 + gmtOffset: 2153 + type: string 2154 + example: <string> 2155 + monday: 2156 + type: object 2157 + properties: 2158 + close: 2159 + type: string 2160 + example: <string> 2161 + open: 2162 + type: string 2163 + example: <string> 2164 + open24: 2165 + type: boolean 2166 + example: <boolean> 2167 + saturday: 2168 + type: object 2169 + properties: 2170 + close: 2171 + type: string 2172 + example: <string> 2173 + open: 2174 + type: string 2175 + example: <string> 2176 + open24: 2177 + type: boolean 2178 + example: <boolean> 2179 + sunday: 2180 + type: object 2181 + properties: 2182 + close: 2183 + type: string 2184 + example: <string> 2185 + open: 2186 + type: string 2187 + example: <string> 2188 + open24: 2189 + type: boolean 2190 + example: <boolean> 2191 + thursday: 2192 + type: object 2193 + properties: 2194 + close: 2195 + type: string 2196 + example: <string> 2197 + open: 2198 + type: string 2199 + example: <string> 2200 + open24: 2201 + type: boolean 2202 + example: <boolean> 2203 + timezone: 2204 + type: string 2205 + example: <string> 2206 + tuesday: 2207 + type: object 2208 + properties: 2209 + close: 2210 + type: string 2211 + example: <string> 2212 + open: 2213 + type: string 2214 + example: <string> 2215 + open24: 2216 + type: boolean 2217 + example: <boolean> 2218 + wednesday: 2219 + type: object 2220 + properties: 2221 + close: 2222 + type: string 2223 + example: <string> 2224 + open: 2225 + type: string 2226 + example: <string> 2227 + open24: 2228 + type: boolean 2229 + example: <boolean> 2230 + locationId: 2231 + type: string 2232 + example: <string> 2233 + name: 2234 + type: string 2235 + example: <string> 2236 + phone: 2237 + type: string 2238 + example: <string> 2239 + storeNumber: 2240 + type: string 2241 + example: <string> 2242 + example: 2243 + - address: 2244 + addressLine1: <string> 2245 + addressLine2: <string> 2246 + city: <string> 2247 + county: <string> 2248 + state: <string> 2249 + zipCode: <string> 2250 + chain: <string> 2251 + departments: 2252 + - departmentId: <string> 2253 + hours: 2254 + Open24: <boolean> 2255 + friday: 2256 + close: <string> 2257 + open: <string> 2258 + open24: <boolean> 2259 + monday: 2260 + close: <string> 2261 + open: <string> 2262 + open24: <boolean> 2263 + saturday: 2264 + close: <string> 2265 + open: <string> 2266 + open24: <boolean> 2267 + sunday: 2268 + close: <string> 2269 + open: <string> 2270 + open24: <boolean> 2271 + thursday: 2272 + close: <string> 2273 + open: <string> 2274 + open24: <boolean> 2275 + tuesday: 2276 + close: <string> 2277 + open: <string> 2278 + open24: <boolean> 2279 + wednesday: 2280 + close: <string> 2281 + open: <string> 2282 + open24: <boolean> 2283 + name: <string> 2284 + phone: <string> 2285 + - departmentId: <string> 2286 + hours: 2287 + Open24: <boolean> 2288 + friday: 2289 + close: <string> 2290 + open: <string> 2291 + open24: <boolean> 2292 + monday: 2293 + close: <string> 2294 + open: <string> 2295 + open24: <boolean> 2296 + saturday: 2297 + close: <string> 2298 + open: <string> 2299 + open24: <boolean> 2300 + sunday: 2301 + close: <string> 2302 + open: <string> 2303 + open24: <boolean> 2304 + thursday: 2305 + close: <string> 2306 + open: <string> 2307 + open24: <boolean> 2308 + tuesday: 2309 + close: <string> 2310 + open: <string> 2311 + open24: <boolean> 2312 + wednesday: 2313 + close: <string> 2314 + open: <string> 2315 + open24: <boolean> 2316 + name: <string> 2317 + phone: <string> 2318 + divisionNumber: <string> 2319 + geolocation: 2320 + latLng: <string> 2321 + latitude: <number> 2322 + longitude: <number> 2323 + hours: 2324 + Open24: <boolean> 2325 + friday: 2326 + close: <string> 2327 + open: <string> 2328 + open24: <boolean> 2329 + gmtOffset: <string> 2330 + monday: 2331 + close: <string> 2332 + open: <string> 2333 + open24: <boolean> 2334 + saturday: 2335 + close: <string> 2336 + open: <string> 2337 + open24: <boolean> 2338 + sunday: 2339 + close: <string> 2340 + open: <string> 2341 + open24: <boolean> 2342 + thursday: 2343 + close: <string> 2344 + open: <string> 2345 + open24: <boolean> 2346 + timezone: <string> 2347 + tuesday: 2348 + close: <string> 2349 + open: <string> 2350 + open24: <boolean> 2351 + wednesday: 2352 + close: <string> 2353 + open: <string> 2354 + open24: <boolean> 2355 + locationId: <string> 2356 + name: <string> 2357 + phone: <string> 2358 + storeNumber: <string> 2359 + - address: 2360 + addressLine1: <string> 2361 + addressLine2: <string> 2362 + city: <string> 2363 + county: <string> 2364 + state: <string> 2365 + zipCode: <string> 2366 + chain: <string> 2367 + departments: 2368 + - departmentId: <string> 2369 + hours: 2370 + Open24: <boolean> 2371 + friday: 2372 + close: <string> 2373 + open: <string> 2374 + open24: <boolean> 2375 + monday: 2376 + close: <string> 2377 + open: <string> 2378 + open24: <boolean> 2379 + saturday: 2380 + close: <string> 2381 + open: <string> 2382 + open24: <boolean> 2383 + sunday: 2384 + close: <string> 2385 + open: <string> 2386 + open24: <boolean> 2387 + thursday: 2388 + close: <string> 2389 + open: <string> 2390 + open24: <boolean> 2391 + tuesday: 2392 + close: <string> 2393 + open: <string> 2394 + open24: <boolean> 2395 + wednesday: 2396 + close: <string> 2397 + open: <string> 2398 + open24: <boolean> 2399 + name: <string> 2400 + phone: <string> 2401 + - departmentId: <string> 2402 + hours: 2403 + Open24: <boolean> 2404 + friday: 2405 + close: <string> 2406 + open: <string> 2407 + open24: <boolean> 2408 + monday: 2409 + close: <string> 2410 + open: <string> 2411 + open24: <boolean> 2412 + saturday: 2413 + close: <string> 2414 + open: <string> 2415 + open24: <boolean> 2416 + sunday: 2417 + close: <string> 2418 + open: <string> 2419 + open24: <boolean> 2420 + thursday: 2421 + close: <string> 2422 + open: <string> 2423 + open24: <boolean> 2424 + tuesday: 2425 + close: <string> 2426 + open: <string> 2427 + open24: <boolean> 2428 + wednesday: 2429 + close: <string> 2430 + open: <string> 2431 + open24: <boolean> 2432 + name: <string> 2433 + phone: <string> 2434 + divisionNumber: <string> 2435 + geolocation: 2436 + latLng: <string> 2437 + latitude: <number> 2438 + longitude: <number> 2439 + hours: 2440 + Open24: <boolean> 2441 + friday: 2442 + close: <string> 2443 + open: <string> 2444 + open24: <boolean> 2445 + gmtOffset: <string> 2446 + monday: 2447 + close: <string> 2448 + open: <string> 2449 + open24: <boolean> 2450 + saturday: 2451 + close: <string> 2452 + open: <string> 2453 + open24: <boolean> 2454 + sunday: 2455 + close: <string> 2456 + open: <string> 2457 + open24: <boolean> 2458 + thursday: 2459 + close: <string> 2460 + open: <string> 2461 + open24: <boolean> 2462 + timezone: <string> 2463 + tuesday: 2464 + close: <string> 2465 + open: <string> 2466 + open24: <boolean> 2467 + wednesday: 2468 + close: <string> 2469 + open: <string> 2470 + open24: <boolean> 2471 + locationId: <string> 2472 + name: <string> 2473 + phone: <string> 2474 + storeNumber: <string> 2475 + meta: 2476 + type: object 2477 + properties: 2478 + pagination: 2479 + type: object 2480 + properties: 2481 + limit: 2482 + type: number 2483 + example: <number> 2484 + start: 2485 + type: number 2486 + example: <number> 2487 + total: 2488 + type: number 2489 + example: <number> 2490 + warnings: 2491 + type: array 2492 + items: 2493 + type: string 2494 + example: <string> 2495 + example: 2496 + - <string> 2497 + - <string> 2498 + examples: 2499 + OK: 2500 + value: 2501 + data: 2502 + - address: 2503 + addressLine1: <string> 2504 + addressLine2: <string> 2505 + city: <string> 2506 + county: <string> 2507 + state: <string> 2508 + zipCode: <string> 2509 + chain: <string> 2510 + departments: 2511 + - departmentId: <string> 2512 + hours: 2513 + Open24: <boolean> 2514 + friday: 2515 + close: <string> 2516 + open: <string> 2517 + open24: <boolean> 2518 + monday: 2519 + close: <string> 2520 + open: <string> 2521 + open24: <boolean> 2522 + saturday: 2523 + close: <string> 2524 + open: <string> 2525 + open24: <boolean> 2526 + sunday: 2527 + close: <string> 2528 + open: <string> 2529 + open24: <boolean> 2530 + thursday: 2531 + close: <string> 2532 + open: <string> 2533 + open24: <boolean> 2534 + tuesday: 2535 + close: <string> 2536 + open: <string> 2537 + open24: <boolean> 2538 + wednesday: 2539 + close: <string> 2540 + open: <string> 2541 + open24: <boolean> 2542 + name: <string> 2543 + phone: <string> 2544 + - departmentId: <string> 2545 + hours: 2546 + Open24: <boolean> 2547 + friday: 2548 + close: <string> 2549 + open: <string> 2550 + open24: <boolean> 2551 + monday: 2552 + close: <string> 2553 + open: <string> 2554 + open24: <boolean> 2555 + saturday: 2556 + close: <string> 2557 + open: <string> 2558 + open24: <boolean> 2559 + sunday: 2560 + close: <string> 2561 + open: <string> 2562 + open24: <boolean> 2563 + thursday: 2564 + close: <string> 2565 + open: <string> 2566 + open24: <boolean> 2567 + tuesday: 2568 + close: <string> 2569 + open: <string> 2570 + open24: <boolean> 2571 + wednesday: 2572 + close: <string> 2573 + open: <string> 2574 + open24: <boolean> 2575 + name: <string> 2576 + phone: <string> 2577 + divisionNumber: <string> 2578 + geolocation: 2579 + latLng: <string> 2580 + latitude: <number> 2581 + longitude: <number> 2582 + hours: 2583 + Open24: <boolean> 2584 + friday: 2585 + close: <string> 2586 + open: <string> 2587 + open24: <boolean> 2588 + gmtOffset: <string> 2589 + monday: 2590 + close: <string> 2591 + open: <string> 2592 + open24: <boolean> 2593 + saturday: 2594 + close: <string> 2595 + open: <string> 2596 + open24: <boolean> 2597 + sunday: 2598 + close: <string> 2599 + open: <string> 2600 + open24: <boolean> 2601 + thursday: 2602 + close: <string> 2603 + open: <string> 2604 + open24: <boolean> 2605 + timezone: <string> 2606 + tuesday: 2607 + close: <string> 2608 + open: <string> 2609 + open24: <boolean> 2610 + wednesday: 2611 + close: <string> 2612 + open: <string> 2613 + open24: <boolean> 2614 + locationId: <string> 2615 + name: <string> 2616 + phone: <string> 2617 + storeNumber: <string> 2618 + - address: 2619 + addressLine1: <string> 2620 + addressLine2: <string> 2621 + city: <string> 2622 + county: <string> 2623 + state: <string> 2624 + zipCode: <string> 2625 + chain: <string> 2626 + departments: 2627 + - departmentId: <string> 2628 + hours: 2629 + Open24: <boolean> 2630 + friday: 2631 + close: <string> 2632 + open: <string> 2633 + open24: <boolean> 2634 + monday: 2635 + close: <string> 2636 + open: <string> 2637 + open24: <boolean> 2638 + saturday: 2639 + close: <string> 2640 + open: <string> 2641 + open24: <boolean> 2642 + sunday: 2643 + close: <string> 2644 + open: <string> 2645 + open24: <boolean> 2646 + thursday: 2647 + close: <string> 2648 + open: <string> 2649 + open24: <boolean> 2650 + tuesday: 2651 + close: <string> 2652 + open: <string> 2653 + open24: <boolean> 2654 + wednesday: 2655 + close: <string> 2656 + open: <string> 2657 + open24: <boolean> 2658 + name: <string> 2659 + phone: <string> 2660 + - departmentId: <string> 2661 + hours: 2662 + Open24: <boolean> 2663 + friday: 2664 + close: <string> 2665 + open: <string> 2666 + open24: <boolean> 2667 + monday: 2668 + close: <string> 2669 + open: <string> 2670 + open24: <boolean> 2671 + saturday: 2672 + close: <string> 2673 + open: <string> 2674 + open24: <boolean> 2675 + sunday: 2676 + close: <string> 2677 + open: <string> 2678 + open24: <boolean> 2679 + thursday: 2680 + close: <string> 2681 + open: <string> 2682 + open24: <boolean> 2683 + tuesday: 2684 + close: <string> 2685 + open: <string> 2686 + open24: <boolean> 2687 + wednesday: 2688 + close: <string> 2689 + open: <string> 2690 + open24: <boolean> 2691 + name: <string> 2692 + phone: <string> 2693 + divisionNumber: <string> 2694 + geolocation: 2695 + latLng: <string> 2696 + latitude: <number> 2697 + longitude: <number> 2698 + hours: 2699 + Open24: <boolean> 2700 + friday: 2701 + close: <string> 2702 + open: <string> 2703 + open24: <boolean> 2704 + gmtOffset: <string> 2705 + monday: 2706 + close: <string> 2707 + open: <string> 2708 + open24: <boolean> 2709 + saturday: 2710 + close: <string> 2711 + open: <string> 2712 + open24: <boolean> 2713 + sunday: 2714 + close: <string> 2715 + open: <string> 2716 + open24: <boolean> 2717 + thursday: 2718 + close: <string> 2719 + open: <string> 2720 + open24: <boolean> 2721 + timezone: <string> 2722 + tuesday: 2723 + close: <string> 2724 + open: <string> 2725 + open24: <boolean> 2726 + wednesday: 2727 + close: <string> 2728 + open: <string> 2729 + open24: <boolean> 2730 + locationId: <string> 2731 + name: <string> 2732 + phone: <string> 2733 + storeNumber: <string> 2734 + meta: 2735 + pagination: 2736 + limit: <number> 2737 + start: <number> 2738 + total: <number> 2739 + warnings: 2740 + - <string> 2741 + - <string> 2742 + '400': 2743 + description: Bad Request 2744 + content: 2745 + application/json: 2746 + schema: 2747 + type: object 2748 + properties: 2749 + errors: 2750 + type: string 2751 + example: <object> 2752 + examples: 2753 + Bad Request: 2754 + value: 2755 + errors: <object> 2756 + '401': 2757 + description: Unauthorized 2758 + content: 2759 + application/json: 2760 + schema: 2761 + type: object 2762 + properties: 2763 + errors: 2764 + type: object 2765 + properties: 2766 + error: 2767 + type: string 2768 + example: <string> 2769 + error_description: 2770 + type: string 2771 + example: <string> 2772 + examples: 2773 + Unauthorized: 2774 + value: 2775 + errors: 2776 + error: <string> 2777 + error_description: <string> 2778 + '500': 2779 + description: Internal Server Error 2780 + content: 2781 + application/json: 2782 + schema: 2783 + type: object 2784 + properties: 2785 + errors: 2786 + type: object 2787 + properties: 2788 + code: 2789 + type: string 2790 + example: <string> 2791 + reason: 2792 + type: string 2793 + example: <string> 2794 + timestamp: 2795 + type: number 2796 + example: <number> 2797 + examples: 2798 + Internal Server Error: 2799 + value: 2800 + errors: 2801 + code: <string> 2802 + reason: <string> 2803 + timestamp: <number> 2804 + /chains: 2805 + get: 2806 + security: 2807 + - OAuth2AuthorizationCode: [] 2808 + - OAuth2ClientCreds: [] 2809 + 2810 + tags: 2811 + - Locations 2812 + - Chains 2813 + summary: Chain list 2814 + description: Provides access to a list of all chains owned by The Kroger Co. 2815 + operationId: chainList 2816 + responses: 2817 + '200': 2818 + description: OK 2819 + content: 2820 + application/json: 2821 + schema: 2822 + type: object 2823 + properties: 2824 + data: 2825 + type: array 2826 + items: 2827 + type: object 2828 + properties: 2829 + divisionNumbers: 2830 + type: array 2831 + items: 2832 + type: string 2833 + example: <string> 2834 + example: 2835 + - <string> 2836 + - <string> 2837 + name: 2838 + type: string 2839 + example: <string> 2840 + example: 2841 + - divisionNumbers: 2842 + - <string> 2843 + - <string> 2844 + name: <string> 2845 + - divisionNumbers: 2846 + - <string> 2847 + - <string> 2848 + name: <string> 2849 + meta: 2850 + type: object 2851 + properties: 2852 + pagination: 2853 + type: object 2854 + properties: 2855 + limit: 2856 + type: number 2857 + example: <number> 2858 + start: 2859 + type: number 2860 + example: <number> 2861 + total: 2862 + type: number 2863 + example: <number> 2864 + warnings: 2865 + type: array 2866 + items: 2867 + type: string 2868 + example: <string> 2869 + example: 2870 + - <string> 2871 + - <string> 2872 + examples: 2873 + OK: 2874 + value: 2875 + data: 2876 + - divisionNumbers: 2877 + - <string> 2878 + - <string> 2879 + name: <string> 2880 + - divisionNumbers: 2881 + - <string> 2882 + - <string> 2883 + name: <string> 2884 + meta: 2885 + pagination: 2886 + limit: <number> 2887 + start: <number> 2888 + total: <number> 2889 + warnings: 2890 + - <string> 2891 + - <string> 2892 + '400': 2893 + description: Bad Request 2894 + content: 2895 + application/json: 2896 + schema: 2897 + type: object 2898 + properties: 2899 + errors: 2900 + type: string 2901 + example: <object> 2902 + examples: 2903 + Bad Request: 2904 + value: 2905 + errors: <object> 2906 + '401': 2907 + description: Unauthorized 2908 + content: 2909 + application/json: 2910 + schema: 2911 + type: object 2912 + properties: 2913 + errors: 2914 + type: object 2915 + properties: 2916 + error: 2917 + type: string 2918 + example: <string> 2919 + error_description: 2920 + type: string 2921 + example: <string> 2922 + examples: 2923 + Unauthorized: 2924 + value: 2925 + errors: 2926 + error: <string> 2927 + error_description: <string> 2928 + '500': 2929 + description: Internal Server Error 2930 + content: 2931 + application/json: 2932 + schema: 2933 + type: object 2934 + properties: 2935 + errors: 2936 + type: object 2937 + properties: 2938 + code: 2939 + type: string 2940 + example: <string> 2941 + reason: 2942 + type: string 2943 + example: <string> 2944 + timestamp: 2945 + type: number 2946 + example: <number> 2947 + examples: 2948 + Internal Server Error: 2949 + value: 2950 + errors: 2951 + code: <string> 2952 + reason: <string> 2953 + timestamp: <number> 2954 + /chains/{name}: 2955 + get: 2956 + security: 2957 + - OAuth2AuthorizationCode: [] 2958 + - OAuth2ClientCreds: [] 2959 + 2960 + tags: 2961 + - Locations 2962 + - Chains 2963 + summary: Chain details 2964 + description: >- 2965 + Provides access to the details of a specific chian by using the chain 2966 + `name`. 2967 + operationId: chainDetails 2968 + responses: 2969 + '200': 2970 + description: OK 2971 + content: 2972 + application/json: 2973 + schema: 2974 + type: object 2975 + properties: 2976 + data: 2977 + type: object 2978 + properties: 2979 + divisionNumbers: 2980 + type: array 2981 + items: 2982 + type: string 2983 + example: <string> 2984 + example: 2985 + - <string> 2986 + - <string> 2987 + name: 2988 + type: string 2989 + example: <string> 2990 + meta: 2991 + type: object 2992 + properties: {} 2993 + examples: 2994 + OK: 2995 + value: 2996 + data: 2997 + divisionNumbers: 2998 + - <string> 2999 + - <string> 3000 + name: <string> 3001 + meta: {} 3002 + '401': 3003 + description: Unauthorized 3004 + content: 3005 + application/json: 3006 + schema: 3007 + type: object 3008 + properties: 3009 + errors: 3010 + type: object 3011 + properties: 3012 + error: 3013 + type: string 3014 + example: <string> 3015 + error_description: 3016 + type: string 3017 + example: <string> 3018 + examples: 3019 + Unauthorized: 3020 + value: 3021 + errors: 3022 + error: <string> 3023 + error_description: <string> 3024 + '404': 3025 + description: Not Found 3026 + content: 3027 + application/octet-stream: 3028 + examples: 3029 + Not Found: 3030 + value: '"<object>"' 3031 + '500': 3032 + description: Internal Server Error 3033 + content: 3034 + application/json: 3035 + schema: 3036 + type: object 3037 + properties: 3038 + errors: 3039 + type: object 3040 + properties: 3041 + code: 3042 + type: string 3043 + example: <string> 3044 + reason: 3045 + type: string 3046 + example: <string> 3047 + timestamp: 3048 + type: number 3049 + example: <number> 3050 + examples: 3051 + Internal Server Error: 3052 + value: 3053 + errors: 3054 + code: <string> 3055 + reason: <string> 3056 + timestamp: <number> 3057 + parameters: 3058 + - name: name 3059 + in: path 3060 + required: true 3061 + schema: 3062 + type: string 3063 + example: <string> 3064 + description: >- 3065 + The name of a chain owned by The Kroger Co. Note the chain "name" is 3066 + returned from the /chains endpoint as "name" and from the /locations 3067 + endpoint as "chain". 3068 + /departments: 3069 + get: 3070 + security: 3071 + - OAuth2AuthorizationCode: [] 3072 + - OAuth2ClientCreds: [] 3073 + tags: 3074 + - Locations 3075 + - Departments 3076 + summary: Department list 3077 + description: >- 3078 + Provides access to a list of all departments, including departments of 3079 + chains owned by The Kroger Co. 3080 + operationId: departmentList 3081 + responses: 3082 + '200': 3083 + description: OK 3084 + content: 3085 + application/json: 3086 + schema: 3087 + type: object 3088 + properties: 3089 + data: 3090 + type: array 3091 + items: 3092 + type: object 3093 + properties: 3094 + departmentId: 3095 + type: string 3096 + example: <string> 3097 + name: 3098 + type: string 3099 + example: <string> 3100 + example: 3101 + - departmentId: <string> 3102 + name: <string> 3103 + - departmentId: <string> 3104 + name: <string> 3105 + meta: 3106 + type: object 3107 + properties: 3108 + pagination: 3109 + type: object 3110 + properties: 3111 + limit: 3112 + type: number 3113 + example: <number> 3114 + start: 3115 + type: number 3116 + example: <number> 3117 + total: 3118 + type: number 3119 + example: <number> 3120 + warnings: 3121 + type: array 3122 + items: 3123 + type: string 3124 + example: <string> 3125 + example: 3126 + - <string> 3127 + - <string> 3128 + examples: 3129 + OK: 3130 + value: 3131 + data: 3132 + - departmentId: <string> 3133 + name: <string> 3134 + - departmentId: <string> 3135 + name: <string> 3136 + meta: 3137 + pagination: 3138 + limit: <number> 3139 + start: <number> 3140 + total: <number> 3141 + warnings: 3142 + - <string> 3143 + - <string> 3144 + '401': 3145 + description: Unauthorized 3146 + content: 3147 + application/json: 3148 + schema: 3149 + type: object 3150 + properties: 3151 + errors: 3152 + type: object 3153 + properties: 3154 + error: 3155 + type: string 3156 + example: <string> 3157 + error_description: 3158 + type: string 3159 + example: <string> 3160 + examples: 3161 + Unauthorized: 3162 + value: 3163 + errors: 3164 + error: <string> 3165 + error_description: <string> 3166 + '500': 3167 + description: Internal Server Error 3168 + content: 3169 + application/json: 3170 + schema: 3171 + type: object 3172 + properties: 3173 + errors: 3174 + type: object 3175 + properties: 3176 + code: 3177 + type: string 3178 + example: <string> 3179 + reason: 3180 + type: string 3181 + example: <string> 3182 + timestamp: 3183 + type: number 3184 + example: <number> 3185 + examples: 3186 + Internal Server Error: 3187 + value: 3188 + errors: 3189 + code: <string> 3190 + reason: <string> 3191 + timestamp: <number> 3192 + /departments/{id}: 3193 + get: 3194 + tags: 3195 + - Locations 3196 + - Departments 3197 + summary: Department details 3198 + description: >- 3199 + Provides access to the details of a specific department by using the 3200 + `departmentId`. 3201 + operationId: departmentDetails 3202 + responses: 3203 + '200': 3204 + description: OK 3205 + content: 3206 + application/json: 3207 + schema: 3208 + type: object 3209 + properties: 3210 + data: 3211 + type: object 3212 + properties: 3213 + departmentId: 3214 + type: string 3215 + example: <string> 3216 + name: 3217 + type: string 3218 + example: <string> 3219 + meta: 3220 + type: object 3221 + properties: {} 3222 + examples: 3223 + OK: 3224 + value: 3225 + data: 3226 + departmentId: <string> 3227 + name: <string> 3228 + meta: {} 3229 + '400': 3230 + description: Bad Request 3231 + content: 3232 + application/json: 3233 + schema: 3234 + type: object 3235 + properties: 3236 + errors: 3237 + type: object 3238 + properties: 3239 + code: 3240 + type: string 3241 + example: <string> 3242 + reason: 3243 + type: string 3244 + example: <string> 3245 + timestamp: 3246 + type: number 3247 + example: <number> 3248 + examples: 3249 + Bad Request: 3250 + value: 3251 + errors: 3252 + code: <string> 3253 + reason: <string> 3254 + timestamp: <number> 3255 + '401': 3256 + description: Unauthorized 3257 + content: 3258 + application/json: 3259 + schema: 3260 + type: object 3261 + properties: 3262 + errors: 3263 + type: object 3264 + properties: 3265 + error: 3266 + type: string 3267 + example: <string> 3268 + error_description: 3269 + type: string 3270 + example: <string> 3271 + examples: 3272 + Unauthorized: 3273 + value: 3274 + errors: 3275 + error: <string> 3276 + error_description: <string> 3277 + '404': 3278 + description: Not Found 3279 + content: 3280 + application/octet-stream: 3281 + examples: 3282 + Not Found: 3283 + value: '"<object>"' 3284 + '500': 3285 + description: Internal Server Error 3286 + content: 3287 + application/json: 3288 + schema: 3289 + type: object 3290 + properties: 3291 + errors: 3292 + type: object 3293 + properties: 3294 + code: 3295 + type: string 3296 + example: <string> 3297 + reason: 3298 + type: string 3299 + example: <string> 3300 + timestamp: 3301 + type: number 3302 + example: <number> 3303 + examples: 3304 + Internal Server Error: 3305 + value: 3306 + errors: 3307 + code: <string> 3308 + reason: <string> 3309 + timestamp: <number> 3310 + parameters: 3311 + - name: id 3312 + in: path 3313 + required: true 3314 + schema: 3315 + type: string 3316 + example: <string> 3317 + description: The departmentId of the department you want returned. 3318 + tags: 3319 + - name: Identity 3320 + description: >- 3321 + The Identity API provides access to the profile ID of authenticated 3322 + customers. 3323 + 3324 + 3325 + Public Rate Limit: 5,000 per day 3326 + - name: Cart 3327 + description: >- 3328 + The Cart API provides you with access to add an item to an authenticated 3329 + customer's cart. 3330 + 3331 + 3332 + Public Rate Limit: 5,000 per day 3333 + - name: Products 3334 + description: |- 3335 + The Products API provides access to our entire product catalog. 3336 + 3337 + Public Rate Limit: 10,000 per day 3338 + - name: Locations 3339 + description: >- 3340 + The Locations API provides access to all locations, chains, and 3341 + departments that are owned by The Kroger Co. 3342 + 3343 + 3344 + Public Rate Limit: 1,600 a day per endpoint 3345 + - name: Chains 3346 + - name: Departments