@@ -20502,6 +20502,236 @@ paths:
2050220502 message: Failed to store catalog
2050320503 schema:
2050420504 "$ref": "#/components/schemas/error"
20505+ "/ecommerce/connectors/{id}/events":
20506+ post:
20507+ summary: Submit a product event
20508+ parameters:
20509+ - name: Intercom-Version
20510+ in: header
20511+ schema:
20512+ "$ref": "#/components/schemas/intercom_version_preview"
20513+ - name: id
20514+ in: path
20515+ required: true
20516+ description: The unique identifier of the ecommerce connector.
20517+ schema:
20518+ type: string
20519+ example: '42939'
20520+ tags:
20521+ - Ecommerce Connectors
20522+ operationId: submitEcommerceProductEvent
20523+ description: |
20524+ Send a single product change to an ecommerce connector. Use product events to keep
20525+ Fin's product knowledge current between full catalog uploads. Each request carries
20526+ one event.
20527+
20528+ A full catalog must be uploaded with
20529+ [Upload a product catalog](/docs/references/preview/rest-api/api.intercom.io/ecommerce-connectors/uploadecommercecatalog)
20530+ before you send events. Until then, this endpoint returns `409 Conflict`.
20531+
20532+ ## Event types
20533+
20534+ | `type` | `data` | Effect |
20535+ |---|---|---|
20536+ | `product.created` | `product` | Adds the product, or updates it if a product with the same `id` already exists. |
20537+ | `product.updated` | `product` | Updates the product with the same `id`, or adds it if it does not exist yet. |
20538+ | `product.deleted` | `product_id` | Removes the product from Fin's knowledge. |
20539+
20540+ For `product.created` and `product.updated`, send the full product object, not only the
20541+ fields that changed. It uses the same fields as a catalog product
20542+ ([`ecommerce_catalog_product`](/docs/references/preview/rest-api/api.intercom.io/models/ecommerce_catalog_product)),
20543+ plus a required `updated_at` timestamp. The product is matched by `id`. The serialized
20544+ product must be 60 KB or smaller.
20545+
20546+ For `product.deleted`, send only `data.product_id`.
20547+
20548+ `occurred_at` is required on every event and must be an ISO 8601 timestamp.
20549+
20550+ ## Ordering
20551+
20552+ Events can arrive out of order. The newest version of a product wins:
20553+
20554+ - If the stored product has a newer `updated_at` than the product in a
20555+ `product.created` or `product.updated` event, the event is ignored.
20556+ - If the stored product has a newer `updated_at` than a `product.deleted` event's
20557+ `occurred_at`, the delete is ignored.
20558+ - Once a product is deleted, an update with an older `updated_at` than the delete's
20559+ `occurred_at` does not bring it back.
20560+ - Events sent while a full catalog upload is running are kept.
20561+
20562+ ## Processing
20563+
20564+ The endpoint returns `202 Accepted` with an `event_id` once the event is queued.
20565+ Processing is asynchronous, so the change may take a short time to reach Fin.
20566+ requestBody:
20567+ content:
20568+ application/json:
20569+ schema:
20570+ "$ref": "#/components/schemas/ecommerce_product_event_request"
20571+ examples:
20572+ product_created:
20573+ summary: Product created
20574+ value:
20575+ type: product.created
20576+ occurred_at: '2026-10-14T09:30:00Z'
20577+ data:
20578+ product:
20579+ id: 'tent-2p-ultralight'
20580+ title: 'Ridgeline 2-Person Ultralight Tent'
20581+ url: 'https://example.com/products/ridgeline-2p-tent'
20582+ description: 'A freestanding two-person backpacking tent that weighs under 1.5 kg.'
20583+ featured_image_url: 'https://cdn.example.com/images/ridgeline-2p.jpg'
20584+ price_min: 349.0
20585+ price_max: 379.0
20586+ currency: 'USD'
20587+ in_stock: true
20588+ category_path:
20589+ - 'Camping'
20590+ - 'Tents'
20591+ collections:
20592+ - 'Backpacking'
20593+ tags:
20594+ - 'ultralight'
20595+ - 'freestanding'
20596+ available_options:
20597+ - name: 'Color'
20598+ values:
20599+ - 'Green'
20600+ - 'Orange'
20601+ variants:
20602+ - id: 'tent-2p-ultralight-green'
20603+ title: 'Green'
20604+ price: 349.0
20605+ in_stock: true
20606+ selected_options:
20607+ - name: 'Color'
20608+ value: 'Green'
20609+ - id: 'tent-2p-ultralight-orange'
20610+ title: 'Orange'
20611+ price: 379.0
20612+ in_stock: true
20613+ selected_options:
20614+ - name: 'Color'
20615+ value: 'Orange'
20616+ created_at: '2026-10-14T09:30:00Z'
20617+ updated_at: '2026-10-14T09:30:00Z'
20618+ product_updated:
20619+ summary: Product updated
20620+ value:
20621+ type: product.updated
20622+ occurred_at: '2026-10-15T14:05:00Z'
20623+ data:
20624+ product:
20625+ id: 'tent-2p-ultralight'
20626+ title: 'Ridgeline 2-Person Ultralight Tent'
20627+ url: 'https://example.com/products/ridgeline-2p-tent'
20628+ description: 'A freestanding two-person backpacking tent that weighs under 1.5 kg.'
20629+ featured_image_url: 'https://cdn.example.com/images/ridgeline-2p.jpg'
20630+ price_min: 299.0
20631+ price_max: 379.0
20632+ currency: 'USD'
20633+ in_stock: true
20634+ category_path:
20635+ - 'Camping'
20636+ - 'Tents'
20637+ collections:
20638+ - 'Backpacking'
20639+ - 'Sale'
20640+ tags:
20641+ - 'ultralight'
20642+ - 'freestanding'
20643+ available_options:
20644+ - name: 'Color'
20645+ values:
20646+ - 'Green'
20647+ - 'Orange'
20648+ variants:
20649+ - id: 'tent-2p-ultralight-green'
20650+ title: 'Green'
20651+ price: 299.0
20652+ compare_at_price: 349.0
20653+ in_stock: true
20654+ selected_options:
20655+ - name: 'Color'
20656+ value: 'Green'
20657+ - id: 'tent-2p-ultralight-orange'
20658+ title: 'Orange'
20659+ price: 379.0
20660+ in_stock: false
20661+ selected_options:
20662+ - name: 'Color'
20663+ value: 'Orange'
20664+ created_at: '2026-10-14T09:30:00Z'
20665+ updated_at: '2026-10-15T14:05:00Z'
20666+ product_deleted:
20667+ summary: Product deleted
20668+ value:
20669+ type: product.deleted
20670+ occurred_at: '2026-10-20T08:00:00Z'
20671+ data:
20672+ product_id: 'tent-2p-ultralight'
20673+ responses:
20674+ '202':
20675+ description: Event accepted and queued for processing.
20676+ content:
20677+ application/json:
20678+ examples:
20679+ Event accepted:
20680+ value:
20681+ event_id: 81273
20682+ schema:
20683+ "$ref": "#/components/schemas/ecommerce_product_event_response"
20684+ '400':
20685+ description: The event is invalid. All validation errors are returned in `message`, separated by `; `.
20686+ content:
20687+ application/json:
20688+ examples:
20689+ Invalid type:
20690+ value:
20691+ type: invalid_event
20692+ message: type must be one of product.created, product.updated, product.deleted
20693+ Invalid product:
20694+ value:
20695+ type: invalid_event
20696+ message: data.product.title is required; data.product.updated_at must be an ISO 8601 timestamp
20697+ Missing product id on delete:
20698+ value:
20699+ type: invalid_event
20700+ message: data.product_id is required
20701+ Product too large:
20702+ value:
20703+ type: invalid_event
20704+ message: data.product exceeds 60KB
20705+ schema:
20706+ "$ref": "#/components/schemas/ecommerce_product_event_error"
20707+ '401':
20708+ "$ref": "#/components/responses/Unauthorized"
20709+ '404':
20710+ description: Not found.
20711+ content:
20712+ application/json:
20713+ examples:
20714+ Connector not found:
20715+ value:
20716+ type: import_source_not_found
20717+ message: No connector found with the provided import_source_id.
20718+ Feature not available:
20719+ value:
20720+ type: not_found
20721+ message: The events API is not available for this workspace.
20722+ schema:
20723+ "$ref": "#/components/schemas/ecommerce_product_event_error"
20724+ '409':
20725+ description: No full catalog has been uploaded to this connector yet.
20726+ content:
20727+ application/json:
20728+ examples:
20729+ Catalog not uploaded:
20730+ value:
20731+ type: catalog_not_uploaded
20732+ message: Upload a full catalog before sending product events.
20733+ schema:
20734+ "$ref": "#/components/schemas/ecommerce_product_event_error"
2050520735 "/events":
2050620736 post:
2050720737 summary: Submit a data event
@@ -40144,6 +40374,88 @@ components:
4014440374 sku: 'TSHIRT-BLU-L'
4014540375 vendor: 'Acme Apparel'
4014640376 nullable: true
40377+ ecommerce_product_event_error:
40378+ title: Ecommerce Product Event Error
40379+ type: object
40380+ description: Returned when a product event is rejected.
40381+ properties:
40382+ type:
40383+ type: string
40384+ description: The error code.
40385+ enum:
40386+ - invalid_event
40387+ - import_source_not_found
40388+ - not_found
40389+ - catalog_not_uploaded
40390+ example: invalid_event
40391+ message:
40392+ type: string
40393+ description: A human-readable description of the error. For `invalid_event`, every validation error is listed, separated by `; `.
40394+ example: data.product.id is required
40395+ ecommerce_product_event_product:
40396+ title: Ecommerce Product Event Product
40397+ description: |
40398+ The full product sent in a `product.created` or `product.updated` event. It uses the same
40399+ fields as `ecommerce_catalog_product`, plus `updated_at`, which is required. The serialized
40400+ product must be 60 KB or smaller.
40401+ allOf:
40402+ - "$ref": "#/components/schemas/ecommerce_catalog_product"
40403+ - type: object
40404+ required:
40405+ - updated_at
40406+ properties:
40407+ created_at:
40408+ type: string
40409+ format: date-time
40410+ description: When the product was created in your store, as an ISO 8601 timestamp.
40411+ example: '2026-10-14T09:30:00Z'
40412+ nullable: true
40413+ updated_at:
40414+ type: string
40415+ format: date-time
40416+ description: When the product was last changed in your store, as an ISO 8601 timestamp. Used to order events, so an older version never overwrites a newer one.
40417+ example: '2026-10-15T14:05:00Z'
40418+ ecommerce_product_event_request:
40419+ title: Ecommerce Product Event Request
40420+ type: object
40421+ description: A single product event.
40422+ required:
40423+ - type
40424+ - occurred_at
40425+ - data
40426+ properties:
40427+ type:
40428+ type: string
40429+ description: The kind of product change.
40430+ enum:
40431+ - product.created
40432+ - product.updated
40433+ - product.deleted
40434+ example: product.updated
40435+ occurred_at:
40436+ type: string
40437+ format: date-time
40438+ description: When the change happened, as an ISO 8601 timestamp. For `product.deleted`, this is compared with the stored product's `updated_at` to decide whether the delete applies.
40439+ example: '2026-10-15T14:05:00Z'
40440+ data:
40441+ type: object
40442+ description: The event payload. Send `product` for `product.created` and `product.updated`, and `product_id` for `product.deleted`.
40443+ properties:
40444+ product:
40445+ "$ref": "#/components/schemas/ecommerce_product_event_product"
40446+ product_id:
40447+ type: string
40448+ description: The `id` of the product to delete. Required for `product.deleted`.
40449+ example: 'tent-2p-ultralight'
40450+ ecommerce_product_event_response:
40451+ title: Ecommerce Product Event Response
40452+ type: object
40453+ description: Returned when a product event is accepted and queued.
40454+ properties:
40455+ event_id:
40456+ type: integer
40457+ description: The unique identifier for the queued event.
40458+ example: 81273
4014740459 email_address_header:
4014840460 title: Email Address Header
4014940461 type: object
0 commit comments