# Find payment-method correction targets

Source: https://docs.fiest.io/api/reference/get-payment-correction-workspace
Canonical sandbox contract: https://docs.fiest.io/openapi.yaml

## GET /v1/restaurants/{restaurantId}/payment-correction-workspace

Returns a correction-aware day or calendar-month report plus up to 500 exact payment source identities. Use scope=day for one business date, scope=month for a bounded calendar-month review, and query to narrow by receipt hash, order, tab, or tab-split identity. Select one returned source before previewing a correction. This is a gated write-preparation operation and does not mutate data. Organization-boundary tokens also require fiest.organization.read; when a token covers several organizations, organization_id must identify an exact organization returned by listOrganizations.

## Authentication

Send an OAuth access token in the `Authorization` header as
`Bearer $FIEST_ACCESS_TOKEN`.

Required scopes: `fiest.restaurant.read`, `fiest.accounting.read`, `fiest.analytics.read`, `fiest.accounting.corrections.write`

## Quick request

```bash
curl --request GET \
  --url 'https://api-sandbox.fiest.io/v1/restaurants/11111111-1111-4111-8111-111111111111/payment-correction-workspace?start_date=2026-07-15&end_date=2026-07-15&scope=day' \
  --header 'Authorization: Bearer $FIEST_ACCESS_TOKEN'
```

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `restaurantId` | path | Yes | string (uuid) | A restaurant identifier returned by the authorized restaurant list. |
| `organization_id` | query | No | string (uuid) | An organizationId returned by GET /v1/organizations. Required for restaurant-scoped calls when a Management portfolio authorization covers more than one organization; omitted for a single-restaurant authorization and optional for a one-organization grant. |
| `start_date` | query | Yes | string (date) | First restaurant business date, inclusive. |
| `end_date` | query | Yes | string (date) | Last restaurant business date, inclusive. It cannot be in the future and the range may contain at most 31 days. |
| `scope` | query | Yes | string | Report grain. day requires one date; month stays within one calendar month. |
| `query` | query | No | string | Optional exact-source search text. It may match a receipt hash, order identity, tab identity, or tab-split identity. |

## Success response

### 200 — The current payment-correction report, exact source identities, and supported destination methods.

```json
{
  "data": {
    "restaurantId": "11111111-1111-4111-8111-111111111111",
    "report": {
      "refundReporting": {
        "policy": "refund-event-date/v1",
        "legacyTiming": false,
        "incompleteEvidence": false
      },
      "restaurantId": "11111111-1111-4111-8111-111111111111",
      "scope": "day",
      "period": {
        "startDate": "2026-07-15",
        "endDate": "2026-07-15",
        "timeZone": "Europe/Helsinki",
        "dayStartHour": 4
      },
      "currency": "EUR",
      "rawRows": [
        {
          "key": "card",
          "label": "Card",
          "transactionCount": 459,
          "grossMinor": 2795000,
          "netMinor": 2390000,
          "vatMinor": 405000,
          "grossByRateMinor": null,
          "vatByRateMinor": null
        }
      ],
      "adjustedRows": null,
      "rawTotalMinor": 2795000,
      "adjustedTotalMinor": null,
      "status": "review_required",
      "warnings": [
        {
          "code": "correction_ledger_unavailable",
          "message": "Raw values are available; adjusted values need review.",
          "businessDate": null,
          "correctionId": null
        }
      ],
      "days": [],
      "corrections": [],
      "sources": [],
      "appliedCorrectionIds": [],
      "rawSourceBasis": "services_accounting",
      "calculationVersion": "services-accounting/payment-report/1",
      "schemaVersion": null,
      "currentSourceFingerprint": null,
      "readOnly": true
    },
    "sources": [
      {
        "sourceKind": "order",
        "sourceRecordId": "fiest-50b6d34f-bc6e-4248-b3d6-839b3dda31a1",
        "sourceKey": "order:fiest-50b6d34f-bc6e-4248-b3d6-839b3dda31a1",
        "receiptHash": "receipt-hash-example",
        "parentReceiptHash": null,
        "componentId": null,
        "tabSplitId": null,
        "businessDate": "2026-07-15",
        "methodKey": "card",
        "grossMinor": 1350,
        "transactionCount": 1,
        "sourceGroupId": null,
        "sourceGroupGrossMinor": null,
        "grossByRateMinor": {
          "zero": 0,
          "special": 0,
          "reduced": 1350,
          "standard": 0,
          "unknown": 0
        },
        "vatByRateMinor": {
          "zero": 0,
          "special": 0,
          "reduced": 161,
          "standard": 0,
          "unknown": 0
        },
        "resolutionStatus": "resolved"
      }
    ],
    "methods": [
      {
        "key": "card",
        "label": "Card"
      },
      {
        "key": "cash",
        "label": "Cash"
      },
      {
        "key": "online",
        "label": "Online"
      }
    ],
    "canWrite": true
  }
}
```

## Error responses

### 400 — The request parameters are invalid.

```json
{
  "error": "invalid_request",
  "message": "The requested date range is invalid.",
  "request_id": "req_sandbox_invalid_request"
}
```

### 401 — The access token is missing, invalid, or expired.

```json
{
  "error": "invalid_token",
  "error_description": "The access token is invalid.",
  "request_id": "req_sandbox_invalid_token"
}
```

### 403 — The authorization has expired or does not include the required scope.

```json
{
  "error": "insufficient_scope",
  "error_description": "The operation requires an OAuth scope that is not granted.",
  "request_id": "req_sandbox_insufficient_scope"
}
```

### 404 — The restaurant or requested resource does not exist or is outside the authorization.

```json
{
  "error": "not_found",
  "request_id": "req_sandbox_not_found"
}
```

### 429 — The partner request limit has been exceeded.

```json
{
  "error": "rate_limited",
  "request_id": "req_sandbox_rate_limited"
}
```

### 503 — The capability is disabled in this environment or a required service is unavailable.

```json
{
  "error": "capability_disabled",
  "request_id": "req_sandbox_capability_disabled"
}
```

## Related

- [Quick start](https://docs.fiest.io/api/quickstart)
- [Stable API errors](https://docs.fiest.io/api/reference/errors)
- [OpenAPI 3.1 contract, YAML](https://docs.fiest.io/openapi.yaml)
- [OpenAPI 3.1 contract, JSON](https://docs.fiest.io/openapi.json)
- [Authorize and call the Fiest Partner API](https://docs.fiest.io/api/quickstart)