katana_public_api_client.api.services.create_service¶
katana_public_api_client.api.services.create_service
¶
Classes¶
Functions¶
asyncio(*, client, body)
async
¶
Create Service
Create a new Service. (See: Create Service)
Parameters:
-
body(CreateServiceRequest) –Request payload for creating a new service with variants and specifications Example: {'name': 'Assembly Service', 'uom': 'hours', 'category_name': 'Manufacturing Services', 'additional_info': 'Professional product assembly service', 'is_sellable': True, 'custom_field_collection_id': 1, 'variants': [{'sku': 'ASSM-001', 'sales_price': 75.0, 'default_cost': 50.0, 'custom_fields': [{'field_name': 'Skill Level', 'field_value': 'Expert'}]}]}.
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:
-
DetailedErrorResponse | ErrorResponse | Service | None–Union[DetailedErrorResponse, ErrorResponse, Service]
Source code in katana_public_api_client/api/services/create_service.py
asyncio_detailed(*, client, body)
async
¶
Create Service
Create a new Service. (See: Create Service)
Parameters:
-
body(CreateServiceRequest) –Request payload for creating a new service with variants and specifications Example: {'name': 'Assembly Service', 'uom': 'hours', 'category_name': 'Manufacturing Services', 'additional_info': 'Professional product assembly service', 'is_sellable': True, 'custom_field_collection_id': 1, 'variants': [{'sku': 'ASSM-001', 'sales_price': 75.0, 'default_cost': 50.0, 'custom_fields': [{'field_name': 'Skill Level', 'field_value': 'Expert'}]}]}.
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[DetailedErrorResponse | ErrorResponse | Service]–Response[Union[DetailedErrorResponse, ErrorResponse, Service]]
Source code in katana_public_api_client/api/services/create_service.py
sync(*, client, body)
¶
Create Service
Create a new Service. (See: Create Service)
Parameters:
-
body(CreateServiceRequest) –Request payload for creating a new service with variants and specifications Example: {'name': 'Assembly Service', 'uom': 'hours', 'category_name': 'Manufacturing Services', 'additional_info': 'Professional product assembly service', 'is_sellable': True, 'custom_field_collection_id': 1, 'variants': [{'sku': 'ASSM-001', 'sales_price': 75.0, 'default_cost': 50.0, 'custom_fields': [{'field_name': 'Skill Level', 'field_value': 'Expert'}]}]}.
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:
-
DetailedErrorResponse | ErrorResponse | Service | None–Union[DetailedErrorResponse, ErrorResponse, Service]
Source code in katana_public_api_client/api/services/create_service.py
sync_detailed(*, client, body)
¶
Create Service
Create a new Service. (See: Create Service)
Parameters:
-
body(CreateServiceRequest) –Request payload for creating a new service with variants and specifications Example: {'name': 'Assembly Service', 'uom': 'hours', 'category_name': 'Manufacturing Services', 'additional_info': 'Professional product assembly service', 'is_sellable': True, 'custom_field_collection_id': 1, 'variants': [{'sku': 'ASSM-001', 'sales_price': 75.0, 'default_cost': 50.0, 'custom_fields': [{'field_name': 'Skill Level', 'field_value': 'Expert'}]}]}.
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[DetailedErrorResponse | ErrorResponse | Service]–Response[Union[DetailedErrorResponse, ErrorResponse, Service]]