---
title: "Finish product | Customer&#x27;s Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/preflight/web-api/finish/"
archived: false
applies_to:
  - product: "Customer's Canvas On-Premises"
    entity_id: "https://customerscanvas.com/glossary/customers-canvas-on-premises#software-application"
  - product: "Customer's Canvas Hub"
    versions: ["cloud"]
    entity_id: "https://customerscanvas.com/products/hub#software-application"
  - product: "Preflight Tool"
    versions: ["2.0"]
    entity_id: "https://customerscanvas.com/glossary/preflight-tool#software-application"
---

# Finish product

**Applies to:** Customer's Canvas On-Premises; Customer's Canvas Hub cloud; Preflight Tool 2.0

> You can complete the product workflow by using the **POST ~/api/product/finish** endpoint. This endpoint finalizes the product state and returns the print-ready files.

## Request payload

To finish a product, pass the `stateId` in the request body:

```json
{
    "stateId": "4afcbe97-b51d-4f6f-b9db-70c55536b80a"
}
```

## Example call

```js
const finishProduct = async () => {
    const response = await fetch(appUrl + "api/product/finish", {
        method: "POST",
        body: JSON.stringify({
            stateId: "4afcbe97-b51d-4f6f-b9db-70c55536b80a"
        }),
        headers: {
            'Content-Type': 'application/json'
        }
    });
    const result = await response.json();
    console.log(result);
};
```

## Success response

This endpoint returns preview URLs, hi-res URLs, origin file data, and the state identifier. Preview and hi-res URLs are dictionaries keyed by page index:

```
Status Code: 200 OK
Content:
{
    "previewUrls": {
        "0": "http://example.com/pt/api/files/get/preview-1.jpg"
    },
    "hiresUrls": {
        "0": "http://example.com/pt/api/files/get/print-1.pdf"
    },
    "originUrls": {},
    "stateId": "4afcbe97-b51d-4f6f-b9db-70c55536b80a"
}
```

The `originUrls` dictionary contains `OriginFileModel` values. Its fields depend on the origin file saved by the back end.

## Error response

When the `DisableFinishEndpoint` parameter is set to `true` in the configuration, this endpoint returns:

```
Status Code: 403 Forbidden
Content:
{
    "error": "The finish endpoint is disabled"
}
```

## Configuration

To disable this endpoint, set the `DisableFinishEndpoint` parameter to `true` in your [configuration](https://customerscanvas.com/docs/on-premises/preflight/config-backend.md).

## Related topics

- [Save Product](https://customerscanvas.com/docs/on-premises/preflight/web-api/save.md) - Save the product state to Asset Storage
- [Configuration Options](https://customerscanvas.com/docs/on-premises/preflight/config-backend.md) - Learn about `DisableFinishEndpoint` and other parameters
