Get Invoice Fields and Associated Products crm.invoice.fields

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: crm

Who can execute the method: any user

DEPRECATED

Development of this method has been halted. Please use Universal Methods for Invoices.

This method returns the description of the fields of an invoice, including custom fields.

No parameters are required.

Code Examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/crm.invoice.fields
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/crm.invoice.fields
        
try
        {
        	const response = await $b24.callMethod(
        		'crm.invoice.fields',
        		{}
        	);
        	
        	const result = response.getData().result;
        	if (result.error())
        	{
        		console.error(result.error());
        	}
        	else
        	{
        		console.dir(result);
        	}
        }
        catch(error)
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'crm.invoice.fields',
                    []
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error());
            } else {
                echo 'Success: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error fetching invoice fields: ' . $e->getMessage();
        }
        
BX24.callMethod(
            "crm.invoice.fields",
            {},
            function(result)
            {
                if(result.error())
                    console.error(result.error());
                else
                    console.dir(result.data());
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'crm.invoice.fields',
            []
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

Returned Data

Required parameters are marked with *

Name
type

Description

Note

ID
integer

Identifier

Read-only

ACCOUNT_NUMBER*
string

Number

COMMENTS
text

Manager's comment

CREATED_BY
integer

Created by user

Read-only

CURRENCY
crm_currency

Currency identifier

Read-only

DATE_BILL
date

Billing date

DATE_INSERT
datetime

Creation date

DATE_MARKED
datetime

Rejection date

Provided if the invoice is rejected

DATE_PAY_BEFORE
date

Payment due date

DATE_PAYED
datetime

Date changed to paid status

Read-only

DATE_STATUS
datetime

Date of status change

Read-only

DATE_UPDATE
datetime

Date of update

Read-only

EMP_PAYED_ID
integer

Identifier of the user who last marked the invoice as paid

Read-only

EMP_STATUS_ID
integer

Identifier of the user who last changed the invoice status

Read-only

LID
integer

Site identifier

Read-only

XML_ID
string

External code

ORDER_TOPIC*
string

Subject

PAY_SYSTEM_ID*
integer

Identifier of the payment form

PAY_VOUCHER_DATE
date

Payment date

Provided if the invoice is paid

PAY_VOUCHER_NUM
string

Payment document number

Provided if the invoice is paid

PAYED
char

Payment status

Read-only

PERSON_TYPE_ID*
integer

Payer type identifier

PRICE
double

Amount

Read-only

REASON_MARKED
string

Status comment

Provided if the invoice is paid or rejected

RESPONSIBLE_EMAIL
string

Responsible person's e-mail

Read-only

RESPONSIBLE_ID
integer

Identifier of the responsible person

RESPONSIBLE_LAST_NAME
string

Last name of the responsible person

Read-only

RESPONSIBLE_LOGIN
string

Login of the responsible person

Read-only

RESPONSIBLE_NAME
string

First name of the responsible person

Read-only

RESPONSIBLE_PERSONAL_PHOTO
integer

Identifier of the responsible person's photo

Read-only

RESPONSIBLE_SECOND_NAME
string

Middle name of the responsible person

Read-only

RESPONSIBLE_WORK_POSITION
string

Position of the responsible person

Read-only

STATUS_ID
crm_status

Status identifier

Identifier from the "INVOICE_STATUS" reference

TAX_VALUE
double

Tax amount

Read-only

UF_COMPANY_ID
integer

Company identifier

Provided if the payer is a "Legal Entity"

UF_CONTACT_ID
integer

Contact identifier

Provided if the payer is an "Individual" or as a contact person for the company

UF_MYCOMPANY_ID
integer

Identifier of your company

Provided as the company with invoice details (the link to the details is set separately)

UF_DEAL_ID
integer

Identifier of the associated deal

USER_DESCRIPTION
string

Comment

PR_LOCATION
integer

Location identifier

Required if using document tax mode

INVOICE_PROPERTIES
array

List of properties

If the client is a company, the following keys may be specified (all values are of type string):

  • COMPANY - Company name;
  • COMPANY_ADR - Address;
  • CONTACT_PERSON - Contact person;
  • EMAIL - E-mail;
  • PHONE - Phone;
  • INN - Tax ID;
  • KPP - Tax Registration Reason Code.

If the client is a contact:

  • FIO - Full name;
  • ADDRESS - Address;
  • EMAIL - E-mail;
  • PHONE - Phone.

PRODUCT_ROWS
array

List of product items

Fields of the product item:

  • ID - Identifier (integer), use 0 for a new record;
  • PRICE - Price (double);
  • DISCOUNT_PRICE - Discount per product unit (double);
  • PRODUCT_ID - Product identifier in the catalog (integer), 0 if not from the catalog;
  • PRODUCT_NAME - Name of the product item (string);
  • VAT_RATE - VAT rate coefficient (double);
  • VAT_INCLUDED - VAT included in the price ('Y' or 'N') (char);
  • MEASURE_CODE - Measurement unit code (integer);
  • MEASURE_NAME - Measurement unit designation (string);
  • CATALOG_XML_ID - External catalog code (string), read-only;
  • PRODUCT_XML_ID - External product item code (string), matches the external product code if it is from the catalog. Read-only.
  • QUANTITY - Quantity.