# Lots ```{eval-rst} .. autoclass:: ab.api.endpoints.lots.LotsEndpoint :members: :undoc-members: ``` ## Per-endpoint reference Each route-backed method has its own page rendering the HTTP route, the Python and CLI call signatures, and the request/response model field tables. This is the page `help(api.lots.)` links to via its `Docs:` footer. These pages are generated by `scripts/generate_endpoint_docs.py` and kept current by a CI freshness gate. ```{toctree} :maxdepth: 1 :glob: lots/* ``` ## Methods ### create `POST /Lot` — Create a new lot. ```python from ab import ABConnectAPI api = ABConnectAPI(env="staging") api.lots.create({"catalogId": 1, "name": "New Lot"}) ``` ### list `GET /Lot` — List lots with optional filters (paginated). **Returns:** {class}`~ab.api.models.shared.PaginatedList`\[{class}`~ab.api.models.lots.LotDto`\] ```python # List all lots lots = api.lots.list(page_number=1, page_size=25) # Filter by lot number lots = api.lots.list(lot_number="L001") ``` ### get `GET /Lot/{id}` — Get a lot by ID. **Returns:** {class}`~ab.api.models.lots.LotDto` ```python lot = api.lots.get(100) ``` ### update `PUT /Lot/{id}` — Update a lot. ```python api.lots.update(100, {"name": "Updated Lot"}) ``` ### delete `DELETE /Lot/{id}` — Delete a lot. ```python api.lots.delete(100) ``` ### get_overrides `POST /Lot/overrides` — Get lot overrides for customer items. **Returns:** `list[`{class}`~ab.api.models.lots.LotOverrideDto`]` ```python overrides = api.lots.get_overrides(["item-id-1", "item-id-2"]) ```