# Storefront · Workflows

Part of AppEngine API Documentation. Full index: https://appengine.appmint.io/documentation.md
## POST /storefront/workflows/order-management

**Create an order management workflow**

`operationId: StorefrontController_createOrderManagementWorkflow`

Creates a standard order-management workflow from the built-in template, giving orders a pipeline with the usual fulfilment stages. Customise the stages afterwards through the workflow API — this endpoint only scaffolds the template.

#### Signature

```http
POST /storefront/workflows/order-management (body) -> The created workflow
```

#### Access

Public — no credentials required.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| `400` | WORKFLOW_EXISTS | A workflow with this name already exists | The org already has a workflow with that name. | Read the existing one with `GET /storefront/workflows/order-management/{name}`, or create it under a different name. |

Plus the standard platform errors: `429`, `500`.

#### See also

- `GET /storefront/workflows/order-management/{name}`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgid` | header | string | yes | Organization (tenant) identifier. Every request is scoped to this org; data from other orgs is never visible. Issued with your API credentials. |

### Request body

Workflow name.

```json
{}
```

### Responses

| Status | Meaning |
| --- | --- |
| `201` | The created workflow |
| `400` | A workflow with this name already exists — The org already has a workflow with that name. |
| `429` | Too Many Requests — More than 100,000 requests from one IP within 5 minutes (configurable per deployment). CORS preflights and requests from inside the platform cluster are not counted. The limiter answers before the error filter, so the body is `{ statusCode, error, message }` with no `path`, `method` or `timeStamp`; the `RateLimit-*` response headers say when the window resets. |
| `500` | An unexpected error occurred. Our team has been notified. — An unhandled server-side failure. |

## GET /storefront/workflows/order-management/{name}

**Get the order management workflow**

`operationId: StorefrontController_getOrderManagementWorkflow`

Fetches an order-management workflow by name. Omit the `name` segment and the workflow is found instead by its owner — the one bound to `sf_order` — which is the reliable way to ask "what pipeline are orders running on?" without knowing what it was called.

#### Signature

```http
GET /storefront/workflows/order-management/{name} (name: string) -> The workflow definition
```

#### Access

Public — no credentials required.

#### Errors

| Status | Code | Message | When | What to do |
| --- | --- | --- | --- | --- |
| `404` | WORKFLOW_NOT_FOUND | Order management workflow not found | No workflow matches the name, or none is bound to `sf_order`. | Create one with `POST /storefront/workflows/order-management`. |

Plus the standard platform errors: `429`, `500`.

#### See also

- `POST /storefront/workflows/order-management`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgid` | header | string | yes | Organization (tenant) identifier. Every request is scoped to this org; data from other orgs is never visible. Issued with your API credentials. |
| `name` | path | string | yes | Workflow name. Omit to find the workflow bound to `sf_order`. |

### Responses

| Status | Meaning |
| --- | --- |
| `200` | The workflow definition |
| `404` | Order management workflow not found — No workflow matches the name, or none is bound to `sf_order`. |
| `429` | Too Many Requests — More than 100,000 requests from one IP within 5 minutes (configurable per deployment). CORS preflights and requests from inside the platform cluster are not counted. The limiter answers before the error filter, so the body is `{ statusCode, error, message }` with no `path`, `method` or `timeStamp`; the `RateLimit-*` response headers say when the window resets. |
| `500` | An unexpected error occurred. Our team has been notified. — An unhandled server-side failure. |

