stock_batch_invoice


Changelog

May 19, 2026
  • New PATCH method to update the stock batch invoice based on fields list.
April 17, 2026
  • GET method added new properties customer_phone and agent_comments in the header object
  • POST method added new parameters customer_phone and agent_comments in the header object

GET /stock_batch_invoice

To get a specific stock batch invoice by 365 code or shopping cart code.

/stock_batch_invoice?token=XXXXX&batch_invoice_code=BI8032020005&by_365_code=false


GET /stock_batch_invoice

To get a specific stock batch invoice by table id, store and station code.

/stock_batch_invoice?token=XXXXX&table_id=10&store_code_365=002&station_code_365=0025


POST /stock_batch_invoice

To create a new stock batch invoice.


field type description
api_credentials
token string Credentials provided by Powersoft that allow access to the API
batch_invoice
invoice_header
shopping_cart_code string The unique number of the invoice in your system
invoice_type string The type of the invoice. Allowed values "I" for sale and "C" for sale return
invoice_date_utc0 datetime This is the Coordinated Universal Time (UTC). ie at time zone +0 for transaction date/time
invoice_delivery_date_utc0 datetime This is the Coordinated Universal Time (UTC). ie at time zone +0 for delivery date/time
store_code_365 string The 365 store code. Not required. If not provided the default store code is the one linked with the token.
station_code_365 string The 365 station code. Not required. If not provided the default station code is the one linked with the token.
agent_code_365 string The code of the agent in 365. Pass "" if none.
customer_code_365 string The code of the customer in 365.
user_code_365 string The user code. Not Required
customer_email string The email of the customer.
customer_phone string The customer phone. It can also be provided as a delimited string of multiple numbers. The total length must not exceed 100 characters.
total_sub decimal The total amount of the entire invoice before vat, and before any discount
total_discount decimal The total discount amount applied to this invoice before additional discount at the end of the invoice, in case there is one. If there is no discount, pass 0.00
total_vat decimal The total vat amount of the entire invoice before additional discount at the end of the invoice
total_grand decimal The total that the buyer is charged for this invoice before additional discount at the end of the invoice. total_grand = total_sub - total_discount + total_vat
invoice_additional_discount_type string The discount type applied at the end of the invoice, if there is one. The accepted values are "amount" or "percentage". In case there is no discount at the end of the invoice pass empty string "" or do not pass this field. It is not required.
invoice_additional_discount_percentage decimal The additional discount percentage applied at the end of the invoice. The value must be between 0 and 100. If there is no additional discount at the end of the invoice you don't need to pass it. It is not required. If the discount applied is type amount the percentage value must be calculated as round(invoice_additional_discount_amount/total_grand * 100,2)
invoice_additional_discount_amount decimal The additional discount amount applied at the end of the invoice. The value must be less than total_grand. If there is no additional discount at the end of the invoice you don't need to pass it. It is not required. If the discount applied is type percentage the value must be calculated as round(total_grand*invoice_additional_discount_percentage/100,2)
invoice_total_value_after_additional_discount decimal The total the buyer is charged after the additional discount. If there is no additional discount at the end of the invoice you don't need to pass it. It is not required. invoice_total_value_after_additional_discount = total_grand - invoice_additional_discount_amount
delivery_address_line_1 string The address line 1.eg. Street number and name.
delivery_address_line_2 string The address line 2. Pass "" if none.
delivery_address_line_3 string The address line 3. Pass "" if none.
delivery_postal_code string The postal code of the customer.
delivery_town string The town of the customer.
delivery_country_code_iso2 string The 2 digit ISO code of the country. eg CY for Cyprus.
delivery_country_name string The name of the country.
status_code_365 string The 365 code for batch invoice status. Not required. If not provided the default status set in 365 settings will be considered.
comments string Batch invoice comments, if any. Not required
agent_comments string Batch invoice agent comments, if any. Not required
table
compartment_name string Required. The compartment name of the table as is provided in the floor tables. The table object is required only if the batch is linked to a dinning table.
table_id string Required. The table id as is provided in the floor tables.
table_number string Required. The table number as is provided in the floor tables.
table_name string Required. The table name. It can be provided the customer name
table_no_person integer Required. The number of persons at the table. Minimum 1 person is accepted.
table_notes string Not required. Some table notes, if any.
list_invoice_details
line_number int The position of this line in the invoice list. eg 1
item_code_365 string The code of the item in 365
line_quantity decimal The number of pieces of the item for this invoice line
line_price_incl_vat decimal The price including VAT of the item for this invoice line
line_total_sub decimal The total amount of this line of the invoice before vat, and before any discount. line_total_sub = round((it.line_price_incl_vat * it.line_quantity) / (1 + line_total_vat_percentage / 100),2)
line_total_discount decimal The total discount amount of this line of the invoice. If there is no discount, pass 0.00. line_total_discount = round(line_total_sub * line_total_discount_percentage / 100,2)
line_total_discount_percentage decimal The total discount percentage of this line of the invoice. eg. If the discount is 10%, pass 10.00 If there is no discount, pass 0.00
line_vat_code_365 string The code of the vat in 365
line_total_vat decimal The total vat amount of this line of the invoice. line_total_vat = round(line_total_grand - (line_total_sub - line_total_discount),2)
line_total_vat_percentage decimal The total vat percentage of this line of the invoice. eg. If the vat is 19%, pass 19.00
line_total_grand decimal The total amount for this line of the invoice. line_total_grand = round((line_price_incl_vat * line_quantity)*(1 - line_total_discount_percentage / 100),2)
line_notes string Notes per line
is_modifier boolean Indicates that charged item in the invoice is linked to a modifier
is_subitem boolean Indicates if in the line is a subitem
exclude_print boolean Indicates if the subitem is excluded from the invoice printing. The value is taken from the subitems information
root_line_number string Indicates the parent line id to which the chargeable modifier is linked
list_modifiers
modifier_prefix string Prefix of the modifier(e.g. EXTRA, NO, WITHOUT, PLUS)
modifier_code_365 string The 365 modifier code (e.g. AVOCADO,TOMATO and so on)
modifier_name string The modifier name
list_invoice_payments
payment_number string Payment number on your side
payment_type_code_365 string 365 payment type code (e.g. CASH, JCC and so on)
payment_amount decimal Payment amount
payment_description string Payment description
payment_comments string Payment comments

Returns

Returns the standard api_response object. The Powersoft 365 batch invoice code is returned in the response_id field.


PATCH /stock_batch_invoice

To modify an existing stock batch invoice based on a fields list.

field type description
api_credentials
token string Credentials provided by Powersoft that allow access to the API
batch_invoice
batch_invoice_number_365 string The 365 unique code of the stock batch invoice.
fields_list
field_name string The name of the field. Here is the list of the fields that are allowed to be changed.
field_value the type is determined by the field that is updated The new value of the field.

Returns

Returns the standard api_response object. The Powersoft 365 batch invoice code is returned in the response_id field.