> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CPF — Upload workbook

> Upload a CPF .xlsx workbook for the current Gu1 instance. Not billed as a lookup.

## Request

```http theme={null}
POST /api/integration-services/ar_gueno_cpf_service/corpus/upload
```

`multipart/form-data` with a single field:

| Field | Rule |
| - | - |
| `file` | `.xlsx`, 32 MB maximum. The file name is the stored object name and must not include a path. |

Gu1 chooses the instance that stores the file. Do not send a tenant field. The same file name with different content is rejected until you use another name. A workbook whose content was already loaded is kept and reported as already present. You do not need a follow-up call to process the file.

**Billing:** not billed as a lookup. Requires the CPF service enabled for the organization, `services:execute`, and `services:upload`. Lookups stay on `services:execute`.

## Success

`200` with `data.status` `loaded` means the workbook was stored. `recordCount` is the number of operations inserted. When `duplicateContent` is `true`, the file was stored and the operations were already present (`recordCount` is `0`).

`200` with `data.status` `already_loaded` means this instance already had that same file. Nothing was rewritten.

```json theme={null}
{
  "success": true,
  "data": {
    "integrationCode": "ar_gueno_cpf_service",
    "status": "loaded",
    "tenant": "bna",
    "r2Key": "bna/cpf/incoming/operaciones.xlsx",
    "fileName": "operaciones.xlsx",
    "fileHash": "<sha256>",
    "recordCount": 1200,
    "duplicateContent": false
  }
}
```

## Queued

`202` with `data.status` `accepted_pending` means the file was stored and processing is waiting. `reason` is `holders_busy`, `holders_day_pending`, or `lock_held`.

## Errors

| HTTP | `error.code` | When |
| - | - | - |
| 400 | `missing_file` | No `file` field |
| 400 | `invalid_name` | Name is not `.xlsx` or includes a path |
| 400 | `file_too_large` | Larger than 32 MB |
| 400 | `invalid_tenant` | This instance cannot store the file |
| 409 | `conflict` | That name already exists with different content |
| 422 | `invalid_format` | The workbook is not the CPF format. `error.message` names the missing column |
| 503 | `TENANT_SLUG_REQUIRED` | This instance is not configured to store the file |
| 503 | `SERVICE_UNAVAILABLE` | The service is not available |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.