---
title: "Creates new purchase invoice from file"
method: POST
path: "/v1/purchaseinvoices/file"
tags: ["PurchaseInvoices"]
---

# Creates new purchase invoice from file

`POST /v1/purchaseinvoices/file`

## Request

- Base URL: `https://api.altoviz.com`
- URL: `https://api.altoviz.com/v1/purchaseinvoices/file`
- Auth: none required
- TypeScript: <https://skmtc.dev/altoviz/apis/altoviz-api/docs/v1/purchaseinvoices/file/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body `multipart/form-data`

- object
  - `file` string, binary: file

## Response `200`

OK

- PurchaseInvoice: Purchase invoice
  - `date` string, date: Date
  - `id` integer: Expense ID
  - `notes` string, nullable: Notes
  - `pdfUrl` string, nullable: Pdf url
  - `reference` string, nullable: Reference
  - `region` 'FR' | 'EU' | 'IE' | 'DOM' | 'Corse' | 'Monaco'
  - `status` 'Done' | 'Pending' | 'Paid'
  - `subject` string, nullable: Subject
  - `supplier` Supplier: Supplier
    - `active` boolean: Whether the supplier is active
    - `address` AddressFields
      - `city` string, nullable
      - `countryIso` string, nullable
      - `countryName` string, nullable
      - `formattedAddress` string, nullable
      - `inlineAddress` string, nullable
      - `street` string, nullable
      - `zipcode` string, nullable
    - `cellPhone` string, nullable: Cell phone number
    - `companyInformations` CompanyInfo
      - `effectiveElectronicAddress` string, nullable
      - `electronicAddress` string, nullable
      - `siret` string, nullable
      - `vatNumber` string, nullable
    - `createdAt` string, date-time, nullable: Created date
    - `createdById` string, nullable: Created by user ID
    - `defaultPaymentMethod` 'Transfer' | 'Order' | 'Check' | 'Cash' | 'Card' | 'Bill' | 'Usec' | 'Other'
    - `email` string, nullable: Email
    - `firstName` string, nullable: First name
    - `id` integer: Supplier ID
    - `internalId` string, nullable: Internal Id
    - `internalNotes` string, nullable: Internal notes
    - `lastName` string, nullable: Last name
    - `name` string, nullable: Company name
    - `number` string, nullable: Number
    - `phone` string, nullable: Phone number
    - `title` string, nullable: Title
    - `updatedAt` string, date-time, nullable: Updated date
    - `updatedById` string, nullable: Updated by user ID
  - `taxIncludedAmount` number, double: Tax included amount
  - `vatReverseCharge` boolean: Vat reverse charge

## Other responses

- `400`: Bad Request

## Changes

- **2026-08-18** `e65392ac5b5f`: 1 info
  - added the optional property `supplier/active` to the response with the `200` status

[Operation history](https://skmtc.dev/altoviz/apis/altoviz-api/changes/v1/purchaseinvoices/file/post.md)

---

[API](https://skmtc.dev/altoviz/apis/altoviz-api.md) - [All operations](https://skmtc.dev/altoviz/apis/altoviz-api/llms.txt) - [OpenAPI document](https://skmtc.dev/altoviz/apis/altoviz-api/revisions/4f7fa64cf9e3?raw)
