A list of all methods in the SkuService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
retrieve_sku | Retrieve the details of an SKU. |
update_sku | Change or modify an SKU. |
delete_sku | Delete an SKU from the Rapyd platform. |
list_sku | Retrieve a list of all SKUs. |
create_sku | Create an SKU and attach it to a product. |
Retrieve the details of an SKU.
- HTTP Method:
GET
- Endpoint:
/v1/skus/{skuId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
sku_id | str | ✅ | ID of the 'sku' object. String starting with sku_. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_44
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",
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)
Change or modify an SKU.
- HTTP Method:
POST
- Endpoint:
/v1/skus/{skuId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | SkusSkuIdBody | ❌ | The request body. |
sku_id | str | ✅ | ID of the 'sku' object. String starting with sku_. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_44
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": 7,
"value": "in_stock"
},
price=7.7,
product="product",
active=True,
attributes=[
"attributes"
],
image="image",
metadata={},
package_dimensions={
"length": 3.24,
"height": 6.75,
"weight": 1.32,
"width": 3.41
}
)
result = sdk.sku.update_sku(
request_body=request_body,
sku_id="skuId",
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)
Delete an SKU from the Rapyd platform.
- HTTP Method:
DELETE
- Endpoint:
/v1/skus/{skuId}
Parameters
Name | Type | Required | Description |
---|---|---|---|
sku_id | str | ✅ | ID of the 'sku' object. String starting with sku_. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_23
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",
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)
Retrieve a list of all SKUs.
- HTTP Method:
GET
- Endpoint:
/v1/skus
Parameters
Name | Type | Required | Description |
---|---|---|---|
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
active | bool | ❌ | Determines whether the query returns active SKUs or inactive SKUs. Default is true. |
starting_after | float | ❌ | The ID of the SKU created before the first SKU you want to retrieve. |
ending_before | float | ❌ | The ID of the SKU created after the last SKU you want to retrieve. |
limit | float | ❌ | The maximum number of SKUs to return. Range 1-100. Default is 10. |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_45
Example Usage Code Snippet
from rapyd_sdk import RapydSdk, Environment
sdk = RapydSdk(
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.sku.list_sku(
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
active=True,
starting_after=9.07,
ending_before=3.69,
limit=1.19,
idempotency="idempotency"
)
print(result)
Create an SKU and attach it to a product.
- HTTP Method:
POST
- Endpoint:
/v1/skus
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | V1SkusBody | ❌ | The request body. |
access_key | str | ✅ | Unique access key provided by Rapyd for each authorized user. |
content_type | str | ✅ | Indicates that the data appears in JSON format. Set to application/json. |
salt | str | ✅ | Random string. Recommended length: 8-16 characters. |
signature | str | ✅ | Signature calculated for each request individually. See Request Signatures. |
timestamp | str | ✅ | Timestamp for the request, in Unix time (seconds). |
idempotency | str | ❌ | A unique key that prevents the platform from creating the same object twice. |
Return Type
InlineResponse200_44
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": 7,
"value": "in_stock"
},
price=0.85,
product="product",
active=False,
attributes=[
"attributes"
],
image="image",
metadata={},
package_dimensions={
"length": 3.24,
"height": 6.75,
"weight": 1.32,
"width": 3.41
}
)
result = sdk.sku.create_sku(
request_body=request_body,
access_key="access_key",
content_type="Content-Type",
salt="salt",
signature="signature",
timestamp="timestamp",
idempotency="idempotency"
)
print(result)