# Order routes: revise, screen, start

URL: /code/api/order/verbs-revise · Id: `page:code/api/order/verbs-revise`

> The Order Verbs revise, screen, start as api.sb routes, with inputs, result, refusals and an example.

Reference for [Order](/business/nouns/order), one group of [Order routes](/code/api/order).

### Order.revise
Revise sends delivered lines back for one counted revision, with the changes the Customer asks for. [Verb page](/business/nouns/order/revise?interface=api).

```text
POST /{namespace}/orders/{order}/revise
```

Path: `order`. Body, as JSON: the other inputs. Emits [`Order.revised`](/business/events/Order.revised).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The delivered Order. |
| `lines` | `json` | No | The lines sent back; every delivered line when absent. |
| `changes` | `text` | Yes | What the Customer wants changed, such as a shorter summary. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The Order, its `fulfillment` set to `revising`. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/orders/order_dswDnxf2vt/revise \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"changes":"Example changes"}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "order": {
    "$id": "https://api.sb/leaseline.app/orders/order_dswDnxf2vt",
    "$type": "Order",
    "total": {
      "amount": 29,
      "currency": "USD"
    },
    "status": "placed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Order.revise",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Order.screen
Screen scores an Order’s payment before it is charged and allows, authenticates, holds or blocks it by the Startup’s risk Policy. [Verb page](/business/nouns/order/screen?interface=api).

```text
POST /{namespace}/orders/{order}/screen
```

Path: `order`. Emits [`Order.screened`](/business/events/Order.screened).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The placed Order whose payment is screened. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `outcome` | `string` | Yes | `allow` charges, `authenticate` asks the buyer to confirm with their card issuer, `review` waits for an Approval, `block` cancels. |
| `risk` | `number` | Yes | The payment’s risk score from 0 to 99, as Stripe scored it. |
| `rule` | `string` | No | The risk Policy rule that decided the outcome, when one did. |
| `order` | [Order](/business/nouns/order) | Yes | The Order screened. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/orders/order_dswDnxf2vt/screen \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "outcome": "allow",
  "risk": 1,
  "rule": "Example rule",
  "order": {
    "$id": "https://api.sb/leaseline.app/orders/order_dswDnxf2vt",
    "$type": "Order",
    "total": {
      "amount": 29,
      "currency": "USD"
    },
    "status": "placed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Order.screen",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```

### Order.start
Start checks a Service Order’s inputs against its brief, then moves it from intake to working and starts its deadline. [Verb page](/business/nouns/order/start?interface=api).

```text
POST /{namespace}/orders/{order}/start
```

Path: `order`. Body, as JSON: the other inputs. Emits [`Order.started`](/business/events/Order.started).

**Inputs**

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The Order in intake. |
| `received` | `json` | Yes | What the Customer supplied, measured as the brief measures it, such as a 79,400-word manuscript. |

**Returns**

| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | [Order](/business/nouns/order) | Yes | The Order, its `fulfillment` set to `working`, or still `intake` while a Question is open. |

**Refuses when**

| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |

**Example**

```bash
curl -X POST https://api.sb/leaseline.app/orders/order_dswDnxf2vt/start \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"received":{}}'
```

```json
{
  "api": "https://api.sb/leaseline.app",
  "order": {
    "$id": "https://api.sb/leaseline.app/orders/order_dswDnxf2vt",
    "$type": "Order",
    "total": {
      "amount": 29,
      "currency": "USD"
    },
    "status": "placed"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Order.start",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}
```