---
title: "Regenerate invoice from Shopify"
description: "Force re-sync the invoice from the Shopify order data and regenerate the PDF. Useful when an order has been edited in Shopify."
url: https://docs.invoicefalcon.com/api/invoices/regenerate-invoice-from-shopify/
api: "API v1 reference"
method: POST
path: "/invoices/{slug}/regenerate"
---

# Regenerate invoice from Shopify

`POST https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/regenerate`

Force re-sync the invoice from the Shopify order data and regenerate the PDF. Useful when an order has been edited in Shopify.

## Path parameters

- `slug` (string, required): The invoice's unique slug (UUID).

## Query parameters

- `template_id` (integer): Optional template ID for PDF regeneration.
- `packing_slip` (boolean): Set `true` to regenerate the packing slip instead of the invoice. Inferred automatically when `template_id` points at a packing slip template.

## Returns

The [invoice object](https://docs.invoicefalcon.com/api/invoices/).

Rate limit: this call costs 2 points ([rate limits](https://docs.invoicefalcon.com/docs/rate-limiting/)).

## Example request

```sh
curl -X POST "https://app.invoicefalcon.com/api/v1/external/invoices/{slug}/regenerate" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY"
```

## 200

Invoice regenerated.

```json
{
  "invoice": {
    "id": 48213,
    "slug": "k7xq2m9d4r",
    "number": "INV-1042",
    "invoice_type": "invoice",
    "total_price": "100.94",
    "currency": "USD",
    "financial_status": "paid",
    "fulfillment_status": "fulfilled",
    "order_name": "#1042",
    "order_number": 1042,
    "processed_at": "2026-01-15T09:30:00Z",
    "note": "Please leave at the front desk.",
    "created_at": "2026-01-15T09:31:12Z",
    "updated_at": "2026-01-15T09:31:40Z",
    "customer": {
      "id": 9177,
      "email": "jane.doe@example.com",
      "first_name": "Jane",
      "last_name": "Doe"
    },
    "billing_address": {
      "first_name": "Jane",
      "last_name": "Doe",
      "company": "Doe Studio",
      "address1": "12 Example Street",
      "address2": "Suite 4",
      "city": "Springfield",
      "province": "Illinois",
      "country": "United States",
      "zip": "62701",
      "phone": "+1 555 010 0199"
    },
    "shipping_address": {
      "first_name": "Jane",
      "last_name": "Doe",
      "company": null,
      "address1": "12 Example Street",
      "address2": null,
      "city": "Springfield",
      "province": "Illinois",
      "country": "United States",
      "zip": "62701",
      "phone": "+1 555 010 0199"
    },
    "line_items": [
      {
        "title": "Canvas tote bag",
        "variant_title": "Natural / Large",
        "quantity": 2,
        "price": "45.00",
        "sku": "TOTE-NAT-L"
      },
      {
        "title": "Gift wrapping",
        "variant_title": null,
        "quantity": 1,
        "price": "5.00",
        "sku": null
      }
    ],
    "tax_lines": [
      {
        "title": "State tax",
        "rate": 0.0625,
        "price": "5.94"
      }
    ]
  }
}
```

## 401

Missing or invalid API key.

```json
{
  "error": "Invalid API key"
}
```

## 403

The store is not on a paid plan. API access requires a paid Invoice Falcon plan.

```json
{
  "error": "REST API access requires a paid plan"
}
```

## 404

Resource not found.

```json
{
  "error": "Not found"
}
```

## 422

Request could not be processed.

```json
{
  "error": "param is missing or the value is empty: customer",
  "errors": {}
}
```

## 429

Rate limit exceeded. Check `X-RateLimit-Reset` header.

```json
{
  "error": "Rate limit exceeded",
  "retry_after": 30,
  "message": "You have exceeded the rate limit of 40 points per 60 seconds. Read requests cost 1 point(s) and write requests cost 2 point(s). Please retry after 30 second(s)."
}
```

