Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 39 additions & 194 deletions .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,7 @@ types:
- collection_item_created
- collection_item_changed
- collection_item_deleted
- collection_item_published
- collection_item_unpublished
- comment_created
docs: >
Expand Down Expand Up @@ -3252,15 +3253,6 @@ types:
[Subscription
plan](https://help.webflow.com/hc/en-us/articles/33961432087955-Add-and-manage-products-and-categories#subscription)
for the SKU
track-inventory:
type: optional<boolean>
docs: >-
A boolean indicating whether inventory for this product should be
tracked.
default: false
quantity:
type: optional<double>
docs: Quantity of SKU that will be tracked as items are ordered.
main-image:
type: optional<string>
docs: The URL for the main image of the SKU
Expand Down Expand Up @@ -4152,231 +4144,87 @@ types:
fieldData: SingleLocaleCreatedPayloadFieldData
source:
openapi: ../../../openapi/referenced-specs/v2.yml
LocalizedItem:
properties:
_cid:
type: string
docs: Collection ID the item belongs to
validation:
format: uuid
_id:
type: string
docs: Unique identifier for the item
validation:
format: uuid
_locale:
type: string
docs: Locale identifier for this version of the item
validation:
format: uuid
_draft:
type: boolean
docs: Whether the item is in draft state
_archived:
type: boolean
docs: Whether the item is archived
name:
type: string
docs: Name of the item
slug:
type: string
docs: URL-friendly version of the name
updated-on:
type: datetime
docs: Timestamp of last update
updated-by:
type: string
docs: Identifier of user who last updated the item
created-on:
type: datetime
docs: Timestamp of creation
created-by:
type: string
docs: Identifier of user who created the item
published-on:
type: optional<datetime>
docs: Timestamp of last publish, if published
published-by:
type: optional<string>
docs: Identifier of user who last published the item
source:
openapi: ../../../openapi/referenced-specs/v2.yml
MultiLocaleCreatedPayload:
properties:
siteId:
type: string
docs: Unique identifier of the site
validation:
format: uuid
workspaceId:
type: string
docs: Unique identifier of the workspace
validation:
format: uuid
collectionId:
type: string
docs: Unique identifier of the collection
validation:
format: uuid
cmsLocaleId:
type: optional<string>
docs: Unique identifier of the CMS locale for this item
validation:
format: uuid
fieldData:
type: map<string, LocalizedItem>
docs: Collection of localized items, keyed by locale index (0-n)
source:
openapi: ../../../openapi/referenced-specs/v2.yml
CollectionItemCreatedPayload:
discriminated: false
union:
- type: SingleLocaleCreatedPayload
- type: MultiLocaleCreatedPayload
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
CollectionItemCreated:
docs: The Webhook payload for when a Collection Item is created
properties:
triggerType:
type: literal<"collection_item_created">
docs: The type of event that triggered the request
payload: CollectionItemCreatedPayload
source:
openapi: ../../../openapi/referenced-specs/v2.yml
SingleLocaleChangedPayloadFieldData:
properties:
name: string
slug: string
extra-properties: true
payload:
type: SingleLocaleCreatedPayload
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
SingleLocaleChangedPayload:
CollectionItemChanged:
docs: The Webhook payload for when a Collection Item is changed
properties:
id:
type: string
docs: Unique identifier for the Item
validation:
format: uuid
workspaceId:
type: string
docs: Unique identifier of the workspace
validation:
format: uuid
siteId:
type: string
docs: Unique identifier of the site
validation:
format: uuid
collectionId:
type: string
docs: Unique identifier of the collection
validation:
format: uuid
cmsLocaleId:
type: optional<string>
docs: Unique identifier of the CMS locale for this item
validation:
format: uuid
lastPublished:
type: optional<datetime>
lastUpdated:
type: optional<datetime>
createdOn:
type: optional<datetime>
isArchived:
type: optional<boolean>
isDraft:
type: optional<boolean>
fieldData: SingleLocaleChangedPayloadFieldData
triggerType:
type: literal<"collection_item_changed">
docs: The type of event that triggered the request
payload:
type: SingleLocaleCreatedPayload
source:
openapi: ../../../openapi/referenced-specs/v2.yml
MultiLocaleChangedPayloadFieldData:
CollectionItemRemovedPayloadFieldData:
properties:
name: string
slug: string
_locale:
type: string
docs: Locale identifier for this version of the item
validation:
format: uuid
extra-properties: true
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
MultiLocaleChangedPayload:
CollectionItemRemovedPayload:
docs: The payload of data sent from Webflow
properties:
id:
type: string
docs: Unique identifier for the Item
validation:
format: uuid
workspaceId:
type: string
docs: Unique identifier of the workspace
validation:
format: uuid
type: optional<string>
docs: The ID of the collection item that was deleted
siteId:
type: string
docs: Unique identifier of the site
validation:
format: uuid
type: optional<string>
docs: The ID of the site
workspaceId:
type: optional<string>
docs: The ID of the workspace
collectionId:
type: string
docs: Unique identifier of the collection
validation:
format: uuid
type: optional<string>
docs: The ID of the collection
cmsLocaleId:
type: optional<string>
docs: Unique identifier of the CMS locale for this item
validation:
format: uuid
lastPublished:
type: optional<datetime>
lastUpdated:
type: optional<datetime>
createdOn:
type: optional<datetime>
isArchived:
type: optional<boolean>
isDraft:
type: optional<boolean>
fieldData: MultiLocaleChangedPayloadFieldData
source:
openapi: ../../../openapi/referenced-specs/v2.yml
CollectionItemChangedPayload:
discriminated: false
union:
- type: SingleLocaleChangedPayload
- type: MultiLocaleChangedPayload
lastPublished: optional<datetime>
lastUpdated: optional<datetime>
createdOn: optional<datetime>
isArchived: optional<boolean>
isDraft: optional<boolean>
fieldData: optional<CollectionItemRemovedPayloadFieldData>
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
CollectionItemChanged:
docs: The Webhook payload for when a Collection Item is changed
CollectionItemRemoved:
properties:
triggerType:
type: literal<"collection_item_changed">
type: optional<string>
docs: The type of event that triggered the request
payload: CollectionItemChangedPayload
payload:
type: optional<CollectionItemRemovedPayload>
docs: The payload of data sent from Webflow
source:
openapi: ../../../openapi/referenced-specs/v2.yml
CollectionItemRemovedPayloadFieldData:
PayloadFieldData:
properties:
name: string
slug: string
extra-properties: true
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
CollectionItemRemovedPayload:
Payload:
docs: The payload of data sent from Webflow
properties:
id:
type: optional<string>
docs: The ID of the collection item that was deleted
docs: The ID of the collection item that was unpublished
siteId:
type: optional<string>
docs: The ID of the site
Expand All @@ -4396,18 +4244,15 @@ types:
createdOn: optional<datetime>
isArchived: optional<boolean>
isDraft: optional<boolean>
fieldData: optional<CollectionItemRemovedPayloadFieldData>
fieldData: optional<PayloadFieldData>
source:
openapi: ../../../openapi/referenced-specs/v2.yml
inline: true
CollectionItemRemoved:
CollectionItemPublished:
properties:
triggerType:
type: optional<string>
docs: The type of event that triggered the request
payload:
type: optional<CollectionItemRemovedPayload>
docs: The payload of data sent from Webflow
payload: optional<Payload>
source:
openapi: ../../../openapi/referenced-specs/v2.yml
CollectionItemUnpublishedPayloadFieldData:
Expand Down
32 changes: 18 additions & 14 deletions .mock/definition/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ service:
base-path: ''
endpoints:
list:
path: /collections/{collection_id}/items/{item_id}/inventory
path: /collections/{sku_collection_id}/items/{sku_id}/inventory
method: GET
auth: true
docs: |
Expand All @@ -15,12 +15,14 @@ service:
source:
openapi: ../../../openapi/referenced-specs/v2.yml
path-parameters:
collection_id:
sku_collection_id:
type: string
docs: Unique identifier for a Collection
item_id:
docs: >-
Unique identifier for a SKU collection. Use the List Collections API
to find this ID.
sku_id:
type: string
docs: Unique identifier for an Item
docs: Unique identifier for a SKU
display-name: List Inventory
response:
docs: Request was successful
Expand All @@ -36,15 +38,15 @@ service:
- root.InternalServerError
examples:
- path-parameters:
collection_id: 580e63fc8c9a982ac9b8b745
item_id: 580e64008c9a982ac9b8b754
sku_collection_id: 6377a7c4b7a79608c34a46f7
sku_id: 5e8518516e147040726cc415
response:
body:
id: 5bfedb42bab0ad90fa7dad39
quantity: 100
inventoryType: finite
update:
path: /collections/{collection_id}/items/{item_id}/inventory
path: /collections/{sku_collection_id}/items/{sku_id}/inventory
method: PATCH
auth: true
docs: >
Expand All @@ -65,12 +67,14 @@ service:
source:
openapi: ../../../openapi/referenced-specs/v2.yml
path-parameters:
collection_id:
sku_collection_id:
type: string
docs: Unique identifier for a Collection
item_id:
docs: >-
Unique identifier for a SKU collection. Use the List Collections API
to find this ID.
sku_id:
type: string
docs: Unique identifier for an Item
docs: Unique identifier for a SKU
display-name: Update Item Inventory
request:
name: InventoryUpdateRequest
Expand Down Expand Up @@ -100,8 +104,8 @@ service:
- root.InternalServerError
examples:
- path-parameters:
collection_id: 580e63fc8c9a982ac9b8b745
item_id: 580e64008c9a982ac9b8b754
sku_collection_id: 6377a7c4b7a79608c34a46f7
sku_id: 5e8518516e147040726cc415
request:
inventoryType: infinite
response:
Expand Down
Loading