Skip to main content

SkuService

A list of all methods in the SkuService service. Click on the method name to view detailed information about that method.

MethodsDescription
retrieve_skuRetrieve the details of an SKU.
update_skuChange or modify an SKU.
delete_skuDelete an SKU from the Rapyd platform.
list_skuRetrieve a list of all SKUs.
create_skuCreate an SKU and attach it to a product.

retrieve_sku

Retrieve the details of an SKU.

  • HTTP Method: GET
  • Endpoint: /v1/skus/{skuId}

Parameters

NameTypeRequiredDescription
sku_idstrID of the 'sku' object. String starting with sku_.

Return Type

InlineResponse200_72

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment

sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)

result = sdk.sku.retrieve_sku(sku_id="skuId")

print(result)

update_sku

Change or modify an SKU.

  • HTTP Method: POST
  • Endpoint: /v1/skus/{skuId}

Parameters

NameTypeRequiredDescription
request_bodySkusSkuIdBodyThe request body.
sku_idstrID of the 'sku' object. String starting with sku_.

Return Type

InlineResponse200_72

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment
from rapyd_sdk.models import SkusSkuIdBody

sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)

request_body = SkusSkuIdBody(
currency="GBP",
inventory={
"type_": "finite",
"quantity": 9,
"value": "in_stock"
},
price=3.63,
product="product",
active=True,
attributes=[
"attributes"
],
image="image",
metadata={},
package_dimensions={
"length": 3.17,
"height": 6.46,
"weight": 2.6,
"width": 2.52
}
)

result = sdk.sku.update_sku(
request_body=request_body,
sku_id="skuId"
)

print(result)

delete_sku

Delete an SKU from the Rapyd platform.

  • HTTP Method: DELETE
  • Endpoint: /v1/skus/{skuId}

Parameters

NameTypeRequiredDescription
sku_idstrID of the 'sku' object. String starting with sku_.

Return Type

InlineResponse200_73

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment

sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)

result = sdk.sku.delete_sku(sku_id="skuId")

print(result)

list_sku

Retrieve a list of all SKUs.

  • HTTP Method: GET
  • Endpoint: /v1/skus

Parameters

NameTypeRequiredDescription
activeboolDetermines whether the query returns active SKUs or inactive SKUs. Default is true.
starting_afterfloatThe ID of the SKU created before the first SKU you want to retrieve.
ending_beforefloatThe ID of the SKU created after the last SKU you want to retrieve.
limitfloatThe maximum number of SKUs to return. Range 1-100. Default is 10.

Return Type

InlineResponse200_74

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment

sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)

result = sdk.sku.list_sku(
active=False,
starting_after=9.68,
ending_before=5.31,
limit=1.17
)

print(result)

create_sku

Create an SKU and attach it to a product.

  • HTTP Method: POST
  • Endpoint: /v1/skus

Parameters

NameTypeRequiredDescription
request_bodyV1SkusBodyThe request body.

Return Type

InlineResponse200_72

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment
from rapyd_sdk.models import V1SkusBody

sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)

request_body = V1SkusBody(
currency="GBP",
inventory={
"type_": "finite",
"quantity": 9,
"value": "in_stock"
},
price=1.08,
product="product",
active=False,
attributes=[
"attributes"
],
image="image",
metadata={},
package_dimensions={
"length": 3.17,
"height": 6.46,
"weight": 2.6,
"width": 2.52
}
)

result = sdk.sku.create_sku(request_body=request_body)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →