Lots
- class ab.api.endpoints.lots.LotsEndpoint(client)[source]
Operations on lots (Catalog API).
- Parameters:
client (HttpClient)
- create(*, data)[source]
POST /Lot.
- Parameters:
data (AddLotRequest | dict) – Lot creation payload with
customer_item_id,image_links,initial_data(aLotDataDtowith the measurements),catalogs(list ofLotCatalogDto), andoverriden_data. Accepts anAddLotRequestinstance or a dict.- Return type:
Request model:
AddLotRequestDocs: https://ab-sdk.readthedocs.io/en/latest/api/lots/create.html Request model: AddLotRequest Response model: LotDto
- list(*, id=None, customer_item_id=None, lot_number=None, page_size=25, page_number=1)[source]
List lots with optional filters.
- Parameters:
- Returns:
Paginated lot results.
- Return type:
- get(lot_id)[source]
Retrieve a single lot by ID.
Docs: https://ab-sdk.readthedocs.io/en/latest/api/lots/get.html Response model: LotDto
- update(lot_id, *, data)[source]
PUT /Lot/{id}.
- Parameters:
lot_id (int) – Lot identifier.
data (UpdateLotRequest | dict) – Lot update payload with
customer_item_id,image_links,overriden_data, andcatalogs. (initial_datais create-only — it cannot be updated via PUT.) Accepts anUpdateLotRequestinstance or a dict.
- Return type:
Request model:
UpdateLotRequestDocs: https://ab-sdk.readthedocs.io/en/latest/api/lots/update.html Request model: UpdateLotRequest Response model: LotDto
- delete(lot_id)[source]
Delete a lot.
- Parameters:
lot_id (int) – Lot identifier.
- Return type:
None
Docs: https://ab-sdk.readthedocs.io/en/latest/api/lots/delete.html
- get_overrides(customer_item_ids)[source]
Retrieve lot overrides for the given customer item IDs.
- Parameters:
customer_item_ids (List[str]) – List of customer item ID strings.
- Returns:
Override data for matched lots.
- Return type:
Docs: https://ab-sdk.readthedocs.io/en/latest/api/lots/get_overrides.html Response model: List[LotOverrideDto]
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.<method>) links to via its Docs: footer.
These pages are generated by scripts/generate_endpoint_docs.py and kept
current by a CI freshness gate.
Methods
create
POST /Lot — Create a new lot.
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: PaginatedList[LotDto]
# 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: LotDto
lot = api.lots.get(100)
update
PUT /Lot/{id} — Update a lot.
api.lots.update(100, {"name": "Updated Lot"})
delete
DELETE /Lot/{id} — Delete a lot.
api.lots.delete(100)
get_overrides
POST /Lot/overrides — Get lot overrides for customer items.
Returns: list[LotOverrideDto]`
overrides = api.lots.get_overrides(["item-id-1", "item-id-2"])