Skip to content
This repository was archived by the owner on May 10, 2023. It is now read-only.

Commit 8d920f8

Browse files
committed
WIP: Add docs for API and webhooks
Add guides for using the engine API, and for using engine's webhooks feature. STATUS: very much WIP. NEXT STEPS: complete description of current state.
1 parent 39f073b commit 8d920f8

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

guides/api.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
layout: default
3+
title: Engine API
4+
has_children: false
5+
nav_order: 6
6+
parent: Guides
7+
permalink: /guides/api/
8+
---
9+
10+
{% include page_header.html %}
11+
12+
## API
13+
Engine offers a REST API for interacting with areas of the store. While the API
14+
does not touch every area, it offers access to the most-used resources. Our API
15+
is built atop the Solidus API, so the documentation for that API
16+
(https://solidus.docs.stoplight.io/) is a great place to start. Beyond the base
17+
Solidus API, we have also added the following resource endpoints:
18+
19+
* `/api/subscriptions`: create and update subscriptions

guides/webhooks.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
layout: default
3+
title: Webhooks
4+
has_children: false
5+
nav_order: 7
6+
parent: Guides
7+
permalink: /guides/webhooks/
8+
---
9+
10+
{% include page_header.html %}
11+
12+
## Webhooks
13+
14+
In addition to our REST API, we also offer a webhooks interface for clients who
15+
need more interactive access to events occurring on the store. Our webhooks are
16+
based on the REST Hooks convention (https://resthooks.org/). We support the
17+
following hook events within Engine:
18+
19+
* `carton_shipped`: occurs when a carton is marked as shipped.
20+
* `order_cancelled`: occurs when an order is marked as cancelled
21+
* `order_completed`: occurs when a customer completes the checkout process for an order
22+
* `order_inventory_cancelled`: occurs when an item on an order is cancelled from that order
23+
* `product_updated`: occurs when a product's information changes
24+
* `product_viewed`: occurs when a product page is viewed
25+
* `reimbursement_failed`: occurs when a return reimbursement fails to process
26+
* `reimbursement_succeeded`: occurs when a return reimbursement processes successfully

0 commit comments

Comments
 (0)