
## Invoice product fields

`GET /v1/invoices/:id/products/fields`

Returns the field descriptions for invoice product lines: names, types, read and write availability.

## Parameters

| Parameter | Type | Req. | Description |
|----------|-----|:-----:|---------|
| `id` (path) | number | yes | Invoice ID |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/invoices/741/products/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/invoices/741/products/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/741/products/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data).length)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/invoices/741/products/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | RO | Req. | Description |
|------|-----|:--:|:-----:|---------|
| `id` | integer | yes | | Line ID |
| `productId` | integer | | yes | Product ID. Catalog: `GET /v1/products` |
| `productName` | string | | | Product name |
| `price` | double | | | Price |
| `quantity` | double | | | Quantity |
| `discountSum` | double | | | Discount amount |
| `discountRate` | double | | | Discount value (%) |
| `discountTypeId` | integer | | | Discount type |
| `taxRate` | double | | | Tax (%) |
| `taxIncluded` | char | | | Tax included in the price (`Y`/`N`) |
| `priceExclusive` | double | yes | | Price excluding tax with discount |
| `priceNetto` | double | yes | | Net price |
| `priceBrutto` | double | yes | | Gross price |
| `measureCode` | integer | | | Unit of measure code |
| `measureName` | string | | | Unit of measure |
| `customized` | char | | | Modified (`Y`/`N`) |
| `sort` | integer | | | Sort order |
| `type` | integer | yes | | Type |
| `storeId` | integer | yes | | Store ID |
| `ownerId` | integer | | yes | Owner (invoice) ID |
| `ownerType` | string | | yes | Owner type |

## Response example

```json
{
  "success": true,
  "data": {
    "id": { "type": "integer", "isRequired": false, "isReadOnly": true, "title": "ID" },
    "ownerId": { "type": "integer", "isRequired": true, "isReadOnly": false, "isImmutable": true, "title": "Owner ID" },
    "ownerType": { "type": "string", "isRequired": true, "isReadOnly": false, "isImmutable": true, "title": "Owner type" },
    "productId": { "type": "integer", "isRequired": true, "isReadOnly": false, "title": "Product" },
    "productName": { "type": "string", "isRequired": false, "isReadOnly": false, "title": "Product name" },
    "price": { "type": "double", "isRequired": false, "isReadOnly": false, "title": "Price" },
    "priceExclusive": { "type": "double", "isRequired": false, "isReadOnly": true, "title": "Price excluding tax with discount" },
    "priceNetto": { "type": "double", "isRequired": false, "isReadOnly": true, "title": "PRICE_NETTO" },
    "priceBrutto": { "type": "double", "isRequired": false, "isReadOnly": true, "title": "PRICE_BRUTTO" },
    "quantity": { "type": "double", "isRequired": false, "isReadOnly": false, "title": "Quantity" },
    "discountTypeId": { "type": "integer", "isRequired": false, "isReadOnly": false, "title": "Discount type" },
    "discountRate": { "type": "double", "isRequired": false, "isReadOnly": false, "title": "Discount value" },
    "discountSum": { "type": "double", "isRequired": false, "isReadOnly": false, "title": "Discount amount" },
    "taxRate": { "type": "double", "isRequired": false, "isReadOnly": false, "title": "Tax" },
    "taxIncluded": { "type": "char", "isRequired": false, "isReadOnly": false, "title": "Tax included in the price" },
    "customized": { "type": "char", "isRequired": false, "isReadOnly": false, "title": "Modified" },
    "measureCode": { "type": "integer", "isRequired": false, "isReadOnly": false, "title": "Unit of measure code" },
    "measureName": { "type": "string", "isRequired": false, "isReadOnly": false, "title": "Unit of measure" },
    "sort": { "type": "integer", "isRequired": false, "isReadOnly": false, "title": "Sort order" },
    "type": { "type": "integer", "isRequired": false, "isReadOnly": true, "title": "TYPE" },
    "storeId": { "type": "integer", "isRequired": false, "isReadOnly": true, "title": "STORE_ID" }
  }
}
```

## Error response example

404 — invoice not found:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Item not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | Invoice not found |
| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## See also

- [Product lines](/docs/entities/invoices/products-get) — get invoice products
- [Add a product](/docs/entities/invoices/products-add) — add a line
- [Set products](/docs/entities/invoices/products-set) — replace all lines
- [Invoice fields](/docs/entities/invoices/fields) — invoice field descriptions
