Skip to main content
Browse docs

Shares API

4 endpoints — authenticate with a workspace access token via Authorization: Bearer. See the API introduction for base URLs, pagination, and rate limits.

List Shares

GET/api/shares/

List products. **Scopes**: `shares:read` `shares:write`

Query parameters

idstring | string[] | null

Filter by share ID.

workspace_idstring | string[] | null

Filter by workspace ID.

querystring | null

Filter by share name.

is_archivedboolean | null

Filter on archived products.

visibility"draft" | "private" | "public"[] | null

Filter by visibility.

pageinteger

Page number, defaults to 1.

limitinteger

Size of a page, defaults to 10. Maximum is 100.

sorting"name" | "-name" | "created_at" | "-created_at" | "price_amount" | "-price_amount" | "price_amount_type" | "-price_amount_type"[] | null

Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign `-` before the criteria name to sort by descending order.

metadataobject | null

Filter by metadata key-value pairs using ``deepObject`` style, e.g. ``?metadata[key]=value``.

Returns 200 with PaginatedList_Share_.

curl -X GET \
  https://api.rapidly.tech/api/shares/ \
  -H "Authorization: Bearer $RAPIDLY_ACCESS_TOKEN"

Create Share

POST/api/shares/

Create a share. **Scopes**: `shares:write`

Request body ShareCreate

metadataobject

Custom key-value attributes. Keys: string, max **40** chars. Values: string (max **500** chars), integer, float, or boolean. Limit: **50** pairs.

namestringrequired

The name of the share.

descriptionstring | null

The description of the share.

visibility"draft" | "private" | "public"

Publishing lifecycle state for storefront exposure.

pricesobject[]required

List of available prices for this share. It should contain at most one static price (fixed, custom or free).

mediasstring[] | null

List of file IDs. Each one must be on the same workspace as the share, of type `product_media` and correctly uploaded.

attached_custom_fieldsAttachedCustomFieldCreate[]

List of custom fields to attach.

workspace_idstring | null

The ID of the workspace owning the share. **Required unless you use an workspace token.**

Returns 201 with Share.

curl -X POST \
  https://api.rapidly.tech/api/shares/ \
  -H "Authorization: Bearer $RAPIDLY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Get Share

GET/api/shares/{id}

Get a share by ID. **Scopes**: `shares:read` `shares:write`

Path parameters

idstringrequired

The share ID.

Returns 200 with Share.

curl -X GET \
  https://api.rapidly.tech/api/shares/{id} \
  -H "Authorization: Bearer $RAPIDLY_ACCESS_TOKEN"

Update Share

PATCH/api/shares/{id}

Update a share. **Scopes**: `shares:write`

Path parameters

idstringrequired

The share ID.

Request body ShareUpdate

metadataobject

Custom key-value attributes. Keys: string, max **40** chars. Values: string (max **500** chars), integer, float, or boolean. Limit: **50** pairs.

namestring | null

Name

descriptionstring | null

The description of the share.

is_archivedboolean | null

Whether the share is archived. If `true`, the share won't be available for purchase anymore.

visibility"draft" | "private" | "public" | null

The visibility of the share.

pricesExistingSharePrice | object[] | null

List of available prices for this share. If you want to keep existing prices, include them in the list as an `ExistingSharePrice` object.

mediasstring[] | null

List of file IDs. Each one must be on the same workspace as the share, of type `product_media` and correctly uploaded.

attached_custom_fieldsAttachedCustomFieldCreate[] | null

Attached Custom Fields

Returns 200 with Share.

curl -X PATCH \
  https://api.rapidly.tech/api/shares/{id} \
  -H "Authorization: Bearer $RAPIDLY_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'