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) — the serial-number string doesn't need to pre-exist. The API creates a new record and links it to the target resource. - Transfer (
SalesOrderRow,StockTransferRow,StockAdjustmentRow) — the serial-number string MUST already exist (typically attached to a ManufacturingOrder output). The API moves the linkage from its current resource to the target. If the string isn't anywhere yet, the entry lands infailedwithreason: MISSING— the call still returns 200.
Partial failure is the norm, not the exception. The response
carries successful AND failed arrays; consumers must
handle both. A 200 status does NOT mean every input was applied —
check failed to learn which strings the API rejected.
422 cases: non-existent resource_id returns
422 UnprocessableEntityError with detail No entity found
(not 404). Invalid resource_type (e.g. Production)
returns 422 with an Ajv-style validation detail.
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) — the serial-number string doesn't need to pre-exist. The API creates a new record and links it to the target resource. - Transfer (
SalesOrderRow,StockTransferRow,StockAdjustmentRow) — the serial-number string MUST already exist (typically attached to a ManufacturingOrder output). The API moves the linkage from its current resource to the target. If the string isn't anywhere yet, the entry lands infailedwithreason: MISSING— the call still returns 200.
Partial failure is the norm, not the exception. The response
carries successful AND failed arrays; consumers must
handle both. A 200 status does NOT mean every input was applied —
check failed to learn which strings the API rejected.
422 cases: non-existent resource_id returns
422 UnprocessableEntityError with detail No entity found
(not 404). Invalid resource_type (e.g. Production)
returns 422 with an Ajv-style validation detail.
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) — the serial-number string doesn't need to pre-exist. The API creates a new record and links it to the target resource. - Transfer (
SalesOrderRow,StockTransferRow,StockAdjustmentRow) — the serial-number string MUST already exist (typically attached to a ManufacturingOrder output). The API moves the linkage from its current resource to the target. If the string isn't anywhere yet, the entry lands infailedwithreason: MISSING— the call still returns 200.
Partial failure is the norm, not the exception. The response
carries successful AND failed arrays; consumers must
handle both. A 200 status does NOT mean every input was applied —
check failed to learn which strings the API rejected.
422 cases: non-existent resource_id returns
422 UnprocessableEntityError with detail No entity found
(not 404). Invalid resource_type (e.g. Production)
returns 422 with an Ajv-style validation detail.
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) — the serial-number string doesn't need to pre-exist. The API creates a new record and links it to the target resource. - Transfer (
SalesOrderRow,StockTransferRow,StockAdjustmentRow) — the serial-number string MUST already exist (typically attached to a ManufacturingOrder output). The API moves the linkage from its current resource to the target. If the string isn't anywhere yet, the entry lands infailedwithreason: MISSING— the call still returns 200.
Partial failure is the norm, not the exception. The response
carries successful AND failed arrays; consumers must
handle both. A 200 status does NOT mean every input was applied —
check failed to learn which strings the API rejected.
422 cases: non-existent resource_id returns
422 UnprocessableEntityError with detail No entity found
(not 404). Invalid resource_type (e.g. Production)
returns 422 with an Ajv-style validation detail.
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]