katana_public_api_client.api.serial_number.create_serial_numbers¶
katana_public_api_client.api.serial_number.create_serial_numbers
¶
Classes¶
Functions¶
asyncio(*, client, body)
async
¶
Create serial numbers
Mints new or transfers existing serial numbers to a resource.
Write semantics differ by resource_type (see
CreateSerialNumberResourceType):
- Mint —
ManufacturingOrder,PurchaseOrderRow. - Transfer (move an existing serial number onto the target) —
SalesOrderRow,StockTransferRow,StockAdjustmentRow,Production. The serial-number string must already exist.
Error cases (verified live 2026-07-14, #980): a non-existent
resource_id returns 404 NotFoundError with a type-specific
message (e.g. manufacturing order <id> not found /
production <id> not found). A resource_type outside the
CreateSerialNumberResourceType enum returns 422 with an
Ajv-style validation detail. A serial-number string the tenant
doesn't already know is rejected with 422 — observed for
SalesOrderRow (serial numbers not found) and Production
(UnknownSerialNumber). The successful / failed
partial-outcome response shape below was NOT reproduced for these
cases and needs re-verification — tracked in #983.
Transfer response quirks: on a successful transfer the moved
record's transaction_id may be the literal string
undefined and resource_id may be null — re-fetch via
GET /serial_numbers to confirm the landing state.
Parameters:
-
body(CreateSerialNumbersRequest) –Request payload for creating serial numbers for a resource
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse | None–CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse
Source code in katana_public_api_client/api/serial_number/create_serial_numbers.py
asyncio_detailed(*, client, body)
async
¶
Create serial numbers
Mints new or transfers existing serial numbers to a resource.
Write semantics differ by resource_type (see
CreateSerialNumberResourceType):
- Mint —
ManufacturingOrder,PurchaseOrderRow. - Transfer (move an existing serial number onto the target) —
SalesOrderRow,StockTransferRow,StockAdjustmentRow,Production. The serial-number string must already exist.
Error cases (verified live 2026-07-14, #980): a non-existent
resource_id returns 404 NotFoundError with a type-specific
message (e.g. manufacturing order <id> not found /
production <id> not found). A resource_type outside the
CreateSerialNumberResourceType enum returns 422 with an
Ajv-style validation detail. A serial-number string the tenant
doesn't already know is rejected with 422 — observed for
SalesOrderRow (serial numbers not found) and Production
(UnknownSerialNumber). The successful / failed
partial-outcome response shape below was NOT reproduced for these
cases and needs re-verification — tracked in #983.
Transfer response quirks: on a successful transfer the moved
record's transaction_id may be the literal string
undefined and resource_id may be null — re-fetch via
GET /serial_numbers to confirm the landing state.
Parameters:
-
body(CreateSerialNumbersRequest) –Request payload for creating serial numbers for a resource
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse]–Response[CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse]
Source code in katana_public_api_client/api/serial_number/create_serial_numbers.py
sync(*, client, body)
¶
Create serial numbers
Mints new or transfers existing serial numbers to a resource.
Write semantics differ by resource_type (see
CreateSerialNumberResourceType):
- Mint —
ManufacturingOrder,PurchaseOrderRow. - Transfer (move an existing serial number onto the target) —
SalesOrderRow,StockTransferRow,StockAdjustmentRow,Production. The serial-number string must already exist.
Error cases (verified live 2026-07-14, #980): a non-existent
resource_id returns 404 NotFoundError with a type-specific
message (e.g. manufacturing order <id> not found /
production <id> not found). A resource_type outside the
CreateSerialNumberResourceType enum returns 422 with an
Ajv-style validation detail. A serial-number string the tenant
doesn't already know is rejected with 422 — observed for
SalesOrderRow (serial numbers not found) and Production
(UnknownSerialNumber). The successful / failed
partial-outcome response shape below was NOT reproduced for these
cases and needs re-verification — tracked in #983.
Transfer response quirks: on a successful transfer the moved
record's transaction_id may be the literal string
undefined and resource_id may be null — re-fetch via
GET /serial_numbers to confirm the landing state.
Parameters:
-
body(CreateSerialNumbersRequest) –Request payload for creating serial numbers for a resource
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse | None–CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse
Source code in katana_public_api_client/api/serial_number/create_serial_numbers.py
sync_detailed(*, client, body)
¶
Create serial numbers
Mints new or transfers existing serial numbers to a resource.
Write semantics differ by resource_type (see
CreateSerialNumberResourceType):
- Mint —
ManufacturingOrder,PurchaseOrderRow. - Transfer (move an existing serial number onto the target) —
SalesOrderRow,StockTransferRow,StockAdjustmentRow,Production. The serial-number string must already exist.
Error cases (verified live 2026-07-14, #980): a non-existent
resource_id returns 404 NotFoundError with a type-specific
message (e.g. manufacturing order <id> not found /
production <id> not found). A resource_type outside the
CreateSerialNumberResourceType enum returns 422 with an
Ajv-style validation detail. A serial-number string the tenant
doesn't already know is rejected with 422 — observed for
SalesOrderRow (serial numbers not found) and Production
(UnknownSerialNumber). The successful / failed
partial-outcome response shape below was NOT reproduced for these
cases and needs re-verification — tracked in #983.
Transfer response quirks: on a successful transfer the moved
record's transaction_id may be the literal string
undefined and resource_id may be null — re-fetch via
GET /serial_numbers to confirm the landing state.
Parameters:
-
body(CreateSerialNumbersRequest) –Request payload for creating serial numbers for a resource
Raises:
-
UnexpectedStatus–If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
-
TimeoutException–If the request takes longer than Client.timeout.
Returns:
-
Response[CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse]–Response[CreateSerialNumbersResponse | DetailedErrorResponse | ErrorResponse]