# prov.authorize.checkoutApprovals.get

prov.authorize.checkoutApprovals.get in Node SDK. One cart approval: its status and, once approved, the token and what you learn about the approver.

## Signature

```ts
prov.authorize.checkoutApprovals.get(id: string): Promise<CheckoutApproval>
```

## Parameters

- `id` (string)

## Returns

`Promise<CheckoutApproval>`

## HTTP operation

[`GET /v1/authorize/checkout_approvals/{id}`](https://provenanceauth.com/docs/api/checkout-approvals.md#get-v1-authorize-checkout-approvals-id): Retrieve a cart approval

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`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 step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/checkout_approvals`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "cart": {
      "order_id": "ord_8816",
      "total": 3800,
      "currency": "USD",
      "merchant_id": "quillstack",
      "origin": "https://quillstack.example",
      "items": [
        {
          "sku": "nb-a5",
          "name": "Linen notebook, A5",
          "quantity": 2,
          "unit_amount": 1900
        }
      ]
    },
    "display": {
      "merchant_name": "Quillstack"
    },
    "retry_url": "https://quillstack.example/checkout",
    "billing_address": {
      "line1": "18 Harrow Lane",
      "city": "Portland",
      "region": "OR",
      "postal_code": "97205",
      "country": "US"
    }
  }),
})).json();
const coapId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/checkout_approvals/${coapId}`, {
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/checkout_approvals", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "cart": {
        "order_id": "ord_8816",
        "total": 3800,
        "currency": "USD",
        "merchant_id": "quillstack",
        "origin": "https://quillstack.example",
        "items": [
            {
                "sku": "nb-a5",
                "name": "Linen notebook, A5",
                "quantity": 2,
                "unit_amount": 1900
            }
        ]
    },
    "display": {
        "merchant_name": "Quillstack"
    },
    "retry_url": "https://quillstack.example/checkout",
    "billing_address": {
        "line1": "18 Harrow Lane",
        "city": "Portland",
        "region": "OR",
        "postal_code": "97205",
        "country": "US"
    }
}).json()
coap_id = step1["id"]
data = httpx.get(f"{api}/v1/authorize/checkout_approvals/{coap_id}", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}).json()
```
