# receiptAdvice query


`receiptAdvice` is a GraphQL query of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Returns one receipt advice by its MAX id. Use it to read back an advice you created or one
that a receipt answers.

- Requires the `advice.read` permission.
- Returns null when the advice does not exist or is outside your API key's scope.

## Arguments

- `id`: [`UUID!`](/chameleoon-max/type/uuid) · required

## Returns

[`ReceiptAdvice`](/chameleoon-max/type/receipt-advice)

## Example

**Query**

```graphql
query receiptAdvice($id: UUID!) {
  receiptAdvice(id: $id) {
    id
    number
    kind
    status
    state
    supplierId
    supplier {
      id
      code
      name
      registrationId
      taxId
      vatId
    }
    warehouseId
    warehouse {
      id
      code
      name
      street
      city
      postalCode
    }
    legalEntityId
    supplierReference
    advisedAt
    expectedAt
    currencyCode
    pricesIncludeVat
    note
    openedAt
    closedAt
    cancelledAt
    lines(first: 10) {
      totalCount
    }
    parameters(first: 10) {
      totalCount
    }
    progress {
      linesStarted
      linesDone
      linesInProgress
      linesRemaining
      activeDocuments
      startedAt
    }
    receipts(first: 10) {
      totalCount
    }
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001"
}
```

**Response**

```json
{
  "data": {
    "receiptAdvice": {
      "id": "00000000-0000-4000-8000-000000000001",
      "number": "example",
      "kind": "DELIVERY_NOTE",
      "status": "DRAFT",
      "state": "DRAFT",
      "supplierId": "00000000-0000-4000-8000-000000000001",
      "supplier": {
        "id": "00000000-0000-4000-8000-000000000001",
        "code": "example",
        "name": "example",
        "registrationId": "example",
        "taxId": "example",
        "vatId": "example"
      },
      "warehouseId": "00000000-0000-4000-8000-000000000001",
      "warehouse": {
        "id": "00000000-0000-4000-8000-000000000001",
        "code": "example",
        "name": "example",
        "street": "example",
        "city": "example",
        "postalCode": "example"
      },
      "legalEntityId": "00000000-0000-4000-8000-000000000001",
      "supplierReference": "example",
      "advisedAt": "2026-01-01T00:00:00Z",
      "expectedAt": "2026-01-01T00:00:00Z",
      "currencyCode": "example",
      "pricesIncludeVat": true,
      "note": "example",
      "openedAt": "2026-01-01T00:00:00Z",
      "closedAt": "2026-01-01T00:00:00Z",
      "cancelledAt": "2026-01-01T00:00:00Z",
      "lines": {
        "totalCount": 1
      },
      "parameters": {
        "totalCount": 1
      },
      "progress": {
        "linesStarted": 1,
        "linesDone": 1,
        "linesInProgress": 1,
        "linesRemaining": 1,
        "activeDocuments": 1,
        "startedAt": "2026-01-01T00:00:00Z"
      },
      "receipts": {
        "totalCount": 1
      }
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
