Forbix Open-APIs (v1)

Download OpenAPI specification:

Documents of Forbix Open-APIs

OpenAPI Banking

The OpenAPI Banking section provides comprehensive APIs for accessing and managing banking services. These endpoints allow you to retrieve account information, check balances, view transaction statements, and access deposit details. All banking operations are secured with proper authentication and authorization mechanisms to ensure data privacy and compliance with banking regulations.

Get List Of Company Connected Deposits

By calling this API, you can receive the list of company connected accounts, including customer number, account title, and connected deposit numbers.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ]
}

Get Deposit Information

By calling this API, you can receive general information related to the entered deposit number.

Authorizations:
None
path Parameters
depositNumber
required
string
Example: 1020-10-2008748-1

Deposit Number

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ]
}

Get Deposit Balance

By calling this API, you can receive the balance of the entered deposit number.

Authorizations:
None
path Parameters
depositNumber
required
string
Example: 1020-10-2008748-1

Deposit Number

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Transactions

By calling this API, you can receive the list of transactions for the entered deposit number.

Authorizations:
None
path Parameters
depositNumber
required
string
Example: 1020-10-2008748-1

Deposit Number

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

OpenAPI Accounting

The OpenAPI Accounting section offers powerful APIs for managing accounting operations including chart of accounts, vouchers, and financial transactions. These endpoints enable automated bookkeeping, financial record management, and accounting data integration. All accounting operations maintain data integrity and follow standard accounting principles.

Create Voucher

This endpoint allows you to create a new voucher in the system

Authorizations:
openAPIKey
Request Body schema: application/json
required
companyId
required
string
companyFinancialYearId
required
string
number
number
description
required
string
createDate
number
type
string
Enum: "MANUAL" "AUTO"
autoOptions
object
deletedBy
number
required
Array of objects (EachVoucherItemDto)
creatorId
string
isOpenningVoucher
boolean
voucherKind
string
Enum: "DRAFT" "REGULAR" "OPENNING_BALANCE" "CLOSING_TEMPORARY_ACCOUNTS" "CLOSING_BALANCE"

Responses

Request samples

Content type
application/json
{
  • "companyId": "string",
  • "companyFinancialYearId": "string",
  • "number": 0,
  • "description": "string",
  • "createDate": 0,
  • "type": "MANUAL",
  • "autoOptions": { },
  • "deletedBy": 0,
  • "voucherItems": [
    ],
  • "creatorId": "string",
  • "isOpenningVoucher": true,
  • "voucherKind": "DRAFT"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

Get voucher list with filters

Get voucher list with optional filters including accCode for voucher items, date ranges, and advanced search capabilities

Authorizations:
openAPIKey
query Parameters
companyFinancialYearId
string
Example: companyFinancialYearId=COMPANY_FINANCIAL_YEAR_ID_HERE

Company financial year ID (uses default if not provided)

accCode
string
Example: accCode=1000005

Filter by account code in voucher items

page
number
Example: page=0

Page number for pagination

pageSize
number
Example: pageSize=10

Number of items per page

sortBy
string
Example: sortBy=number

Field to sort by

order
string
Enum: "asc" "desc"
Example: order=desc

Sort order

createDateFrom
number
Example: createDateFrom=1640995200000

Filter by create date from (timestamp)

createDateTo
number
Example: createDateTo=1672531199000

Filter by create date to (timestamp)

description
string
Example: description=فاکتور فروش

Search by voucher description

numberFrom
number
Example: numberFrom=1

Filter by voucher number from

numberTo
number
Example: numberTo=100

Filter by voucher number to

voucherKind
string
Example: voucherKind=REGULAR

Filter by voucher kind

searchParamName
string
Enum: "generalType" "subsidiaryType" "detailedType" "accountSlug" "accountSlug2"
Example: searchParamName=generalType

The field to search in voucher items (generalType, subsidiaryType, detailedType, accountSlug, accountSlug2)

searchParamValue
string
Example: searchParamValue=1000

The value to search for in the specified field

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "items": [
    ],
  • "totalCount": 100,
  • "totalPages": 10
}

Get Company Chart Of Accounts

Get Company Chart Of Accounts

Authorizations:
openAPIKey

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

OpenAPI Items

The OpenAPI Items section provides APIs for managing product and service items within your inventory system. These endpoints allow you to retrieve item information, manage product catalogs, and access item details for integration with sales and inventory management systems.

Create a new item via OpenAPI

Create a new item for the authenticated company.

Authorizations:
None
Request Body schema: application/json
required
name
required
string

The name of the item

type
required
string
Enum: "PRODUCT" "SERVICE" "APPOINTMENT"

The type of the item (PRODUCT, SERVICE, APPOINTMENT)

object

Barcode information for the main item. Will be overridden by variant barcode if specified for a variant.

imageUrl
string

URL of the main image for the item.

isInternalUseOnly
boolean
Default: false

Whether the item is for internal use only (not for sale)

description
string

Description of the item

catalogDescription
string

Description for catalog display(Not used currently)

sku
string

Stock Keeping Unit

inventoryCount
number

Current inventory count

unitPrice
number

Unit price of the item

purchaseUnitPrice
number

Purchase unit price of the item

unit
string

Unit of measurement

taxable
object

Tax information (string for backward compatibility, or number for rate)

itemCategory
string

Item category

itemSubCategory
string

Item subcategory

minimumStockAlert
string

Minimum stock alert threshold

openingStockDate
number

Opening stock date timestamp

discountRate
number

Discount rate percentage

discountFlat
number

Flat discount amount

images
Array of strings

Array of image URLs

attachments
Array of strings

Array of attachment URLs

hideInCatalog
boolean

Whether to hide the item in catalog

doNotSave
boolean
Default: false

If true, this item might be a temporary item or not meant to be saved permanently (e.g. in drafts).

Array of objects (AvailableVariantItemDto)

Array of available variants for this item. Each variant can have its own pricing, stock, and attributes.

appointmentPlans
Array of objects

Appointment plans for appointment-type items.

govId
required
string

the government ID of the item, used for tax purposes

Responses

Request samples

Content type
application/json
{
  • "name": "Product Name",
  • "type": "PRODUCT",
  • "barcode": {
    },
  • "imageUrl": "media/image.jpg",
  • "isInternalUseOnly": false,
  • "description": "This is a detailed description of the product",
  • "catalogDescription": "Catalog description of the product",
  • "sku": "SKU123456",
  • "inventoryCount": 100,
  • "unitPrice": 99.99,
  • "purchaseUnitPrice": 99.99,
  • "unit": "piece",
  • "taxable": "10",
  • "itemCategory": "Electronics",
  • "itemSubCategory": "Smartphones",
  • "minimumStockAlert": "10",
  • "openingStockDate": 1646092800000,
  • "discountRate": 10,
  • "discountFlat": 5,
  • "hideInCatalog": false,
  • "doNotSave": false,
  • "availableVariants": [
    ],
  • "appointmentPlans": [
    ],
  • "govId": "1231fsdf234553426"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "_id": "60d21b4667d0d8992e610c85"
}

Get a list of items for the authenticated company via OpenAPI

Retrieve a paginated list of items for the authenticated company.

Authorizations:
None
query Parameters
page
number
Default: 0

Page number

pageSize
number
Default: 10

Number of items per page

sortBy
string

Field to sort by

order
string
Enum: "asc" "desc"

Sort order

createDateFrom
number

Filter by creation date from

createDateTo
number

Filter by creation date to

barcodeData
string

Filter by barcode data

name
string

Filter by name

sku
string

Filter by SKU

type
string

Filter by type, it can be single or an array joined by , like: a,b,c

category
string

Filter by category

unit
string

Filter by unit

unitPrice
string

Filter by unit price

openingStockDateFrom
number

Filter by opening stock date from

openingStockDateTo
number

Filter by opening stock date to

inventoryCountFrom
number

Filter by inventory count from

inventoryCountTo
number

Filter by inventory count to

itemCategory
string

Filter by item category

itemSubCategory
string

Filter by item sub-category

fromPrice
number

Filter by price from

toPrice
number

Filter by price to

isArchived
boolean

Is the item archived

creatorUserId
string

ID of the creator user

isInternalUseOnly
boolean

Filter by whether the item is for internal use only (e.g., true or false). If not provided, items are not filtered by this property.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ],
  • "totalCount": 10,
  • "totalPages": 10
}

Update an existing item via OpenAPI

Update an existing item for the authenticated company.

Authorizations:
None
path Parameters
itemId
required
string

ID of the item to update

Request Body schema: application/json
required
name
required
string

The name of the item

type
required
string

The type of the item (PRODUCT, SERVICE, APPOINTMENT)

object

Barcode information for the main item. Will be overridden by variant barcode if specified for a variant.

barcodeUrl
string

URL of the barcode image for the main item. Send null to delete.

imageUrl
string

URL of the main image for the item. Send null to delete.

appointmentPlans
Array of objects

Appointment plans for appointment-type items.

isInternalUseOnly
boolean

Whether the item is for internal use only (not for sale)

description
string

Description of the item

catalogDescription
string

Description for catalog display

sku
string

Stock Keeping Unit

inventoryCount
number

Current inventory count

unitPrice
number

Unit price of the item

purchaseUnitPrice
number

Purchase unit price of the item

unit
string

Unit of measurement

taxable
object

Tax information (string for backward compatibility, or number for rate)

itemCategory
string

Item category

itemSubCategory
string

Item subcategory

minimumStockAlert
string

Minimum stock alert threshold

openingStockDate
number

Opening stock date timestamp

discountRate
number

Discount rate percentage

discountFlat
number

Flat discount amount

images
Array of strings

Array of image URLs

attachments
Array of strings

Array of attachment URLs

hideInCatalog
boolean

Whether to hide the item in catalog

isArchived
boolean

Whether the item is archived

Array of objects (AvailableVariantItemDto)

Array of available variants for this item. Each variant can have its own pricing, stock, and attributes.

doNotSave
boolean
Default: false

If true, the item will not be saved to the database. Useful for validation or testing purposes.

Responses

Request samples

Content type
application/json
{
  • "name": "Product Name",
  • "type": "PRODUCT",
  • "barcode": {
    },
  • "barcodeUrl": "media/barcode.png",
  • "imageUrl": "media/image.jpg",
  • "appointmentPlans": [
    ],
  • "isInternalUseOnly": false,
  • "description": "This is a detailed description of the product",
  • "catalogDescription": "Catalog description of the product",
  • "sku": "SKU123456",
  • "inventoryCount": 100,
  • "unitPrice": 99.99,
  • "purchaseUnitPrice": 99.99,
  • "unit": "piece",
  • "taxable": "10",
  • "itemCategory": "Electronics",
  • "itemSubCategory": "Smartphones",
  • "minimumStockAlert": "10",
  • "openingStockDate": 1646092800000,
  • "discountRate": 10,
  • "discountFlat": 5,
  • "hideInCatalog": false,
  • "isArchived": false,
  • "availableVariants": [
    ],
  • "doNotSave": false
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "_id": "60d21b4667d0d8992e610c85"
}

Get item details via OpenAPI

Retrieve detailed information about a specific item.

Authorizations:
None
path Parameters
itemId
required
string

ID of the item to retrieve

Responses

Response samples

Content type
application/json
{
  • "message": "You are not authorized to call this API",
  • "statusCode": 400
}

OpenAPI Customers

The OpenAPI Customers section offers comprehensive customer relationship management APIs. These endpoints enable you to create, retrieve, update customer information, manage customer data, and integrate customer records with your CRM systems. All customer operations ensure data privacy and security compliance.

Create a customer via OpenAPI

Create a new customer for the authenticated company.

Authorizations:
None
Request Body schema: application/json
required
type
required
string
Enum: "BUSINESS" "INDIVIDUAL"
customerDisplayName
required
string
companyName
string
email
string
phone
string
mobile
string
salutation
string
Enum: "MR" "MRS"
nationalId
string
economicId
string
Array of objects (ContactPersonDto)
avatarUrl
string

URL of the customer avatar

Array of objects (Field)
object (Address)
object (Address)
crmGroupId
required
Array of strings

CRM group IDs

isEmployee
boolean
Default: false

Whether the customer is an employee

employeeTitle
string

Employee title/position

Responses

Request samples

Content type
application/json
{
  • "type": "BUSINESS",
  • "customerDisplayName": "John Doe",
  • "companyName": "Johns Company",
  • "email": "john.doe@example.com",
  • "phone": "1234567890",
  • "mobile": "1234567890",
  • "salutation": "MR",
  • "nationalId": "1234567890",
  • "economicId": "1234567890",
  • "contacts": [
    ],
  • "avatarUrl": "string",
  • "customFields": [
    ],
  • "billingAddress": {
    },
  • "shippingAddress": {
    },
  • "crmGroupId": [
    ],
  • "isEmployee": false,
  • "employeeTitle": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

Get a list of customers for the authenticated company via OpenAPI

Retrieve a paginated list of customers for the authenticated company.

Authorizations:
None
query Parameters
page
number
Default: 0

Page number

pageSize
number
Default: 10

Number of items per page

sortBy
string

Field to sort by

order
string
Enum: "asc" "desc"

Sort order

createDateFrom
number

Filter by creation date from

createDateTo
number

Filter by creation date to

fullName
string

Full name filter

email
string

Email filter

phone
string

Phone filter

mobile
string

Mobile filter

type
string

Type filter

balanceFinancialYearId
string

balanceFinancialYearId

customerCategory
string

Customer category filter

crmGroupId
required
string

CRM group IDs filter

isEmployee
boolean

Filter by employee status

isUser
boolean

Filter by whether isUser field exists

accCode
string

Filter by account code

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ],
  • "totalCount": 10,
  • "totalPages": 10
}

Get customer by customer ID via OpenAPI

Retrieve a specific customer by its ID for the authenticated company.

Authorizations:
None
path Parameters
customerId
required
string

ID of the customer to retrieve

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

Update a customer via OpenAPI

Update an existing customer for the authenticated company.

Authorizations:
None
path Parameters
customerId
required
string

ID of the customer to update

Request Body schema: application/json
required
type
string
Enum: "BUSINESS" "INDIVIDUAL"
customerDisplayName
string
companyName
string
email
string
phone
string
mobile
string
salutation
string
Enum: "MR" "MRS"
nationalId
string
economicId
string
Array of objects (ContactPersonDto)
avatarUrl
string

URL of the customer avatar

Array of objects (Field)
isEmployee
boolean
Default: false

Whether the customer is an employee

employeeTitle
string

Employee title/position

Responses

Request samples

Content type
application/json
{
  • "type": "BUSINESS",
  • "customerDisplayName": "John Doe",
  • "companyName": "Johns Company",
  • "email": "john.doe@example.com",
  • "phone": "1234567890",
  • "mobile": "1234567890",
  • "salutation": "MR",
  • "nationalId": "1234567890",
  • "economicId": "1234567890",
  • "contacts": [
    ],
  • "avatarUrl": "string",
  • "customFields": [
    ],
  • "isEmployee": false,
  • "employeeTitle": "string"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

OpenAPI Invoices

The OpenAPI Invoices section provides robust APIs for sales invoice management and processing. These endpoints allow you to create, retrieve, update invoices, manage billing processes, and integrate invoice data with accounting and payment systems. Supports both regular and zero-amount invoices for flexible business operations.

Create an invoice via OpenAPI

Create a new invoice for the authenticated company. Supports zero-amount invoices.

Authorizations:
None
Request Body schema: application/json
required
customerId
required
string

Id of customer

shippingAmount
required
number

shipping

termsAndConditions
required
string

terms and conditions

gatewayIds
required
Array of strings
required
Array of objects (InvoiceItemDto)
createDate
number

Create date

dueDate
number

Due date

sentDate
number

shipping

attachments
Array of strings
notes
string

notes

invoiceNumber
string

custom invoice number

paymentDescription
string

payment description

referenceNumber
string

reference number

discountFlat
number

discount flat

discountRate
number

discount flat

wasEstimate
boolean

Responses

Request samples

Content type
application/json
{
  • "customerId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "shippingAmount": 1000,
  • "termsAndConditions": "string",
  • "gatewayIds": [
    ],
  • "items": [
    ],
  • "createDate": 1598947200000,
  • "dueDate": 1598947200000,
  • "sentDate": "0",
  • "attachments": [
    ],
  • "notes": "this is a note",
  • "invoiceNumber": "INV-1234",
  • "paymentDescription": "this is a payment description",
  • "referenceNumber": "12231",
  • "discountFlat": 0,
  • "discountRate": 0,
  • "wasEstimate": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

Get a list of invoices for the authenticated company via OpenAPI

Retrieve a paginated list of invoices for the authenticated company.

Authorizations:
None
query Parameters
estimateNumber
string

Estimate number for search

invoiceNumber
string

Invoice number for search

referenceNumber
string

Reference number for search

creatorUserId
string

ID of the creator user

customerId
string

ID of the customer

state
string
Enum: "UNPAID" "PAID" "PARTIAL_PAYMENT" "OVERDUE"

State of the invoice

deliveryStatus
string
Enum: "NOT_DELIVERED" "PARTIALLY_DELIVERED" "FULLY_DELIVERED"

Filter by delivery status

debitOrCredit
string
Enum: "debit" "credit"

debit or credit

totalEstimatePrice
number

Total estimate price

totalInvoicePrice
number

Total invoice price

totalInvoicePriceFrom
number

Total invoice price from

totalInvoicePriceTo
number

Total invoice price to

discountFlat
number

Flat discount amount

discountRate
number

Discount rate

sentDateFrom
number

Sent date from

sentDateTo
number

Sent date to

dueDateFrom
number

Due date from

dueDateTo
number

Due date to

createDateFrom
number

create date from

createDateTo
number

create date to

isArchived
boolean

Is the invoice archived

hasReturns
boolean

the invoices has returns from sale

hasOfficialTaxInfo
boolean

the invoices has officialTaxInfo

page
number
Default: 0

page number

pageSize
number
Default: 10

page size

sortBy
string

sort key

order
string
Enum: "asc" "desc"

sort order

search
string

search based on customer name or invoice number

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ],
  • "totalCount": 10,
  • "totalPages": 10
}

Get invoice by invoice ID via OpenAPI

Retrieve a specific invoice by its ID for the authenticated company.

Authorizations:
None
path Parameters
invoiceId
required
string

ID of the invoice to retrieve

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

Update an invoice via OpenAPI

Update an existing invoice for the authenticated company.

Authorizations:
None
path Parameters
invoiceId
required
string

ID of the invoice to update

Request Body schema: application/json
required
_id
required
string

Id of invoice

companyId
required
string

Id of company

customerId
string

Id of customer

shippingAmount
number

shipping

termsAndConditions
string

terms and conditions

gatewayIds
Array of strings

if array is empty, it will delete all gateways

Array of objects (InvoiceItemDto)
dueDate
number

Due date

sentDate
number

shipping

createDate
number

Create date

attachments
Array of strings

if attachments array is empty, it will delete all attachments

notes
string

notes

invoiceNumber
string

custom invoice number

paymentDescription
string

payment description

referenceNumber
string

reference number

discountFlat
number

discount flat

discountRate
number

discount flat

isArchived
boolean

is archived

Responses

Request samples

Content type
application/json
{
  • "_id": "5f4e3f3b8f8b9a001f3b3b3b",
  • "companyId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "customerId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "shippingAmount": 1000,
  • "termsAndConditions": "string",
  • "gatewayIds": [
    ],
  • "items": [
    ],
  • "dueDate": 1598947200000,
  • "sentDate": "0",
  • "createDate": 1598947200000,
  • "attachments": [
    ],
  • "notes": "this is a note",
  • "invoiceNumber": "INV-1234",
  • "paymentDescription": "this is a payment description",
  • "referenceNumber": "12231",
  • "discountFlat": 0,
  • "discountRate": 0,
  • "isArchived": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": {
    }
}

OpenAPI Invoice Purchase

The OpenAPI Invoice Purchase section offers APIs for managing purchase invoices and supplier billing. These endpoints enable you to create, retrieve, and update purchase invoices, manage supplier transactions, and integrate purchase data with accounting and procurement systems. Supports comprehensive purchase invoice lifecycle management.

Create a purchase invoice via OpenAPI

Create a new purchase invoice for the authenticated company. Supports zero-amount invoices.

Authorizations:
None
Request Body schema: application/json
required
invoiceNumber
string

custom invoice number

supplierId
required
string

Supplier/Vendor ID

dueDate
number

Due date

sentDate
number

shipping

createDate
number

Create date

required
Array of objects (PurchaseInvoiceItemDto)
attachments
Array of strings
discountFlat
number

Flat discount amount

discountRate
number

Discount rate percentage

referenceNumber
string

reference number

shippingAmount
required
number

shipping

termsAndConditions
required
string

terms and conditions

notes
string

notes

Responses

Request samples

Content type
application/json
{
  • "invoiceNumber": "INV-1234",
  • "supplierId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "dueDate": 1598947200000,
  • "sentDate": "0",
  • "createDate": 1598947200000,
  • "items": [
    ],
  • "attachments": [
    ],
  • "discountFlat": 0,
  • "discountRate": 0,
  • "referenceNumber": "12231",
  • "shippingAmount": 1000,
  • "termsAndConditions": "string",
  • "notes": "this is a note"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "_id": "60d21b4667d0d8992e610c85"
}

Get a list of purchase invoices for the authenticated company via OpenAPI

Retrieve a paginated list of purchase invoices for the authenticated company.

Authorizations:
None
query Parameters
invoiceNumber
string

Invoice number for search

creatorUserId
string

ID of the creator user

customerId
string

ID of the customer

state
string

state of invoice purchase

debitOrCredit
string
Enum: "debit" "credit"

debit or credit

totalInvoicePrice
number

Total invoice price

discountFlat
number

Flat discount amount

discountRate
number

Discount rate

sentDateFrom
number

Sent date from

sentDateTo
number

Sent date to

dueDateFrom
number

Due date from

dueDateTo
number

Due date to

createDateFrom
number

create date from

createDateTo
number

create date to

isArchived
boolean

Is the invoice archived

page
number
Default: 0

page number

pageSize
number
Default: 10

page size

sortBy
string

sort key

order
string
Enum: "asc" "desc"

sort order

search
string

search based on customer name or invoice number

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL",
  • "data": [
    ],
  • "totalCount": 10,
  • "totalPages": 10
}

Update a purchase invoice via OpenAPI

Update an existing purchase invoice for the authenticated company.

Authorizations:
None
path Parameters
invoiceId
required
string

ID of the purchase invoice to update

Request Body schema: application/json
required
invoiceId
required
string

ID of the invoice to update

supplierId
required
string

Supplier/Vendor ID

dueDate
number

Due date

sentDate
number

shipping

createDate
number

Create date

required
Array of objects (PurchaseInvoiceItemDto)
attachments
Array of strings
discountFlat
number

Flat discount amount

discountRate
number

Discount rate percentage

referenceNumber
string

reference number

shippingAmount
required
number

shipping

termsAndConditions
required
string

terms and conditions

notes
string

notes

isArchived
boolean

is archived

Responses

Request samples

Content type
application/json
{
  • "invoiceId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "supplierId": "5f4e3f3b8f8b9a001f3b3b3b",
  • "dueDate": 1598947200000,
  • "sentDate": "0",
  • "createDate": 1598947200000,
  • "items": [
    ],
  • "attachments": [
    ],
  • "discountFlat": 0,
  • "discountRate": 0,
  • "referenceNumber": "12231",
  • "shippingAmount": 1000,
  • "termsAndConditions": "string",
  • "notes": "this is a note",
  • "isArchived": true
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "SUCCESSFUL"
}