| GET | /warehouseItems/{brand}/{posCode} | Get a list Paginated Warehouse Stock |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WarehouseStockElement:
# @ApiMember(Description="Article Code", IsRequired=true)
article_code: Optional[str] = None
"""
Article Code
"""
# @ApiMember(Description="Current Stock Quantity", IsRequired=true)
atp_quantity: int = 0
"""
Current Stock Quantity
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetWarehouseStockResponse:
# @ApiMember(Description="Total Pages", IsRequired=true)
total_pages: int = 0
"""
Total Pages
"""
# @ApiMember(Description="Total Results", IsRequired=true)
total_results: int = 0
"""
Total Results
"""
# @ApiMember(Description="Index of the result set returned", IsRequired=true)
page: int = 0
"""
Index of the result set returned
"""
# @ApiMember(Description="Size of the result set returned", IsRequired=true)
items: int = 0
"""
Size of the result set returned
"""
# @ApiMember(Description="List of movements", IsRequired=true)
elements: Optional[List[WarehouseStockElement]] = None
"""
List of movements
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetWarehouseStock(IPagedRequest):
# @ApiMember(Description="Brand", IsRequired=true)
brand: Optional[str] = None
"""
Brand
"""
# @ApiMember(Description="POS Legacy", IsRequired=true)
pos_code: Optional[str] = None
"""
POS Legacy
"""
# @ApiMember(Description="List of Article Codes")
article_codes: Optional[List[str]] = None
"""
List of Article Codes
"""
# @ApiMember(Description="Index of the result set returned")
page: int = 0
"""
Index of the result set returned
"""
# @ApiMember(Description="Size of the result set returned")
items: int = 0
"""
Size of the result set returned
"""
# @ApiMember(Description="Omit precise record count - save on performance")
no_count: bool = False
"""
Omit precise record count - save on performance
"""
# @ApiMember(Description="Sorting expression")
sort_by: Optional[str] = None
"""
Sorting expression
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /warehouseItems/{brand}/{posCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}