# prov.authorize.storeOrders.reportOutcome

prov.authorize.storeOrders.reportOutcome in Node SDK. Report what happened to a store order after its decision (free); the latest report wins.

## Signature

```ts
prov.authorize.storeOrders.reportOutcome(id: string, params: ReportOutcomeParams): Promise<OrderOutcome>
```

## Parameters

- `id` (string)
- `params` (ReportOutcomeParams)

## Returns

`Promise<OrderOutcome>`

## HTTP operation

[`POST /v1/authorize/store_orders/{id}/outcome`](https://provenanceauth.com/docs/api/store-integrations.md#post-v1-authorize-store-orders-id-outcome): Report a store order's outcome

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`manage_policies_required`](https://provenanceauth.com/docs/platform/errors.md#manage_policies_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/outcome`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "outcome": "legitimate",
    "note": "Customer confirmed the order by phone"
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/store_orders/sto_01M7V7QYS7FQ9HETWF1HF5SM2H/outcome", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "outcome": "legitimate",
    "note": "Customer confirmed the order by phone"
}).json()
```
