Skip to content

Retrieve

products.retrieve(strcode) -> ProductRetrieveResponse
GET/products/{code}

Retrieves a product by code.

ParametersExpand Collapse
code: str

Product code. Must not include #, /, or :.

ReturnsExpand Collapse
class ProductRetrieveResponse:
data: Product

Product object.

id: str

FRAGMENT generated unique ID.

code: str

Product code.

created: datetime

Timestamp when the product was created. Uses ISO 8601 format.

formatdate-time
update_version: float

Current version of the product.

workspace_id: str

Workspace ID of the product.

description: Optional[str]

Product description.

Retrieve

from fragment import Fragment

client = Fragment()
product = client.products.retrieve(
    "PROD_001",
)
print(product.data)
{
  "data": {
    "id": "product_1234567890",
    "code": "PROD_001",
    "created": "2024-01-13T00:00:00Z",
    "update_version": 1,
    "workspace_id": "ws_1234567890",
    "description": "Premium subscription service"
  }
}
Returns Examples
{
  "data": {
    "id": "product_1234567890",
    "code": "PROD_001",
    "created": "2024-01-13T00:00:00Z",
    "update_version": 1,
    "workspace_id": "ws_1234567890",
    "description": "Premium subscription service"
  }
}