---
title: "Create Writeoff"
method: POST
path: "/api/v1/expeditor/writeoffs"
tags: ["expeditor"]
---

# Create Writeoff

`POST /api/v1/expeditor/writeoffs`

## Request

- Base URL: `https://api.food24.kz` (the document declares no server; this is the origin it was published from)
- URL: `https://api.food24.kz/api/v1/expeditor/writeoffs`
- Auth: OAuth 2
  - Password
  - Token URL: `/api/v1/auth/login`
- TypeScript: <https://skmtc.dev/food24/apis/goodfood/docs/api/v1/expeditor/writeoffs/post.ts> (a function with typed inputs; its response is checked against the schema)

Создать списание товаров.

## Request body

- WriteOffLogCreate
  - `location_id` integer, required: ID локации
  - `writeoff_date` string, date, nullable: Дата списания (опционально, используется текущая дата)
  - `reason` string: Причина: expired, damaged, other
  - `notes` string, nullable: Примечания
  - `items` WriteOffItemCreate[], required: Список товаров для списания
    - `product_id` integer, required: ID товара
    - `quantity` integer, required: Количество товара
  - `photo_base64` string, nullable: Фото в base64 (опционально)

## Response `200`

Successful Response

- WriteOffLogResponse
  - `location_id` integer, required: ID локации
  - `writeoff_date` string, date, nullable: Дата списания (опционально, используется текущая дата)
  - `reason` string: Причина: expired, damaged, other
  - `notes` string, nullable: Примечания
  - `id` integer, required
  - `expeditor_id` integer, nullable, required
  - `expeditor_name` string, nullable, required
  - `location_name` string, required
  - `photo_url` string, nullable, required
  - `total_cost` string, required
  - `items` WriteOffItemResponse[], required
    - `product_id` integer, required: ID товара
    - `quantity` integer, required: Количество товара
    - `id` integer, required
    - `product_name` string, required
    - `cost_price` string, required
    - `total_cost` string, required
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/food24/apis/goodfood.md) - [All operations](https://skmtc.dev/food24/apis/goodfood/llms.txt) - [OpenAPI document](https://skmtc.dev/food24/apis/goodfood/revisions/f75c731597d3?raw)
