ERPNext
App · Accounting & Finance · 18 actions
Manage customers, suppliers, inventory, sales, purchases and HR in ERPNext, the open-source ERP system.
Actions
| Action | What it does |
|---|---|
| Create customer | Create a new customer in ERPNext. |
| Create employee | Create a new employee record. |
| Create expense claim | Create an employee expense claim. |
| Create item | Create a new inventory item. |
| Create leave application | Submit a leave application for an employee. |
| Create purchase invoice | Create a draft purchase invoice from a supplier. |
| Create purchase order | Create a new purchase order for a supplier. |
| Create sales invoice | Create a draft sales invoice for a customer. |
| Create sales order | Create a new sales order for a customer. |
| Get customer | Retrieve a specific customer by name (ERPNext's document id). |
| Get invoice | Retrieve a specific sales invoice by name. |
| Get sales order | Retrieve a specific sales order by name. |
| List customers | Fetch a list of customers from ERPNext. |
| List employees | Fetch a list of employees from ERPNext. |
| List invoices | Fetch a list of sales invoices from ERPNext. |
| List items | Fetch a list of inventory items from ERPNext. |
| List suppliers | Fetch a list of suppliers from ERPNext. |
| Update customer | Update an existing customer's email or phone. |
Create customer
Create a new customer in ERPNext.
Inputs
- Customer name
customer_nametextRequired - The customer's name.
- Customer type
customer_typetextRequired - Either 'Individual' or 'Company'.One of:
Individual,Company. - Email
emailtext - The customer's email address.
- Phone
phonetext - The customer's mobile number.
Outputs
customerobject- The created customer record
Example output
{
"customer": {
"name": "example_value"
}
}Create employee
Create a new employee record.
Inputs
- Employee name
employee_nametextRequired - The employee's first name.
- Gender
gendertextRequired - A Gender record in ERPNext, e.g. 'Male' or 'Female'.
- Date of birth
date_of_birthdateRequired - The employee's date of birth.
- Date of joining
date_of_joiningdate - The employee's start date.
Outputs
employeeobject- The created employee record
Example output
{
"employee": {
"name": "example_value"
}
}Create expense claim
Create an employee expense claim.
Inputs
- Employee
employeetextRequired - The employee's ERPNext document name.
- Posting date
posting_datedate - The date the claim is posted. Defaults to today.
- Expenses
expenseslistRequired - The claim's expense lines; at least one is required. Each entry needs 'expense_type' (an Expense Claim Type, e.g. 'Travel') and 'amount', and may include 'sanctioned_amount', 'expense_date', 'description' and 'default_account' (needed when the expense type has no default account for the employee's company).
- Expense approver
expense_approvertext - The user who approves the claim. Defaults to the employee's expense approver, or the connected ERPNext user.
Outputs
expense_claimobject- The created expense claim
Example output
{
"expense_claim": {}
}Create item
Create a new inventory item.
Inputs
- Item code
item_codetextRequired - A unique code identifying the item.
- Item name
item_nametextRequired - The item's display name.
- Item group
item_grouptext - The item group this item belongs to. Defaults to 'All Item Groups'.
- Track stock
is_stock_itemtrue/false - Whether ERPNext tracks inventory for this item. Stock items need a warehouse on every order; turn this off for services. Defaults to ERPNext's own setting (tracked).
Outputs
itemobject- The created item record
Example output
{
"item": {}
}Create leave application
Submit a leave application for an employee.
Inputs
- Employee
employeetextRequired - The employee's ERPNext document name.
- From date
from_datedateRequired - The first day of leave.
- To date
to_datedateRequired - The last day of leave.
- Leave type
leave_typetextRequired - The type of leave, e.g. 'Casual Leave'. Every type except 'Leave Without Pay' needs a Leave Allocation covering the dates.
- Leave approver
leave_approvertext - The user who approves the leave. Defaults to the employee's leave approver, or the connected ERPNext user.
Outputs
leave_applicationobject- The created leave application
Example output
{
"leave_application": {}
}Create purchase invoice
Create a draft purchase invoice from a supplier.
Inputs
- Supplier
suppliertextRequired - The supplier's ERPNext document name.
- Items
itemslistRequired - The document's line items; at least one is required. Each entry needs 'item_code' and 'qty', and may include 'rate', 'warehouse', and a per-line 'delivery_date' (sales orders) or 'schedule_date' (purchase orders).
- Posting date
posting_datedate - The date the invoice is posted.
Outputs
purchase_invoiceobject- The created purchase invoice
Example output
{
"purchase_invoice": {}
}Create purchase order
Create a new purchase order for a supplier.
Inputs
- Supplier
suppliertextRequired - The supplier's ERPNext document name.
- Items
itemslistRequired - The document's line items; at least one is required. Each entry needs 'item_code' and 'qty', and may include 'rate', 'warehouse', and a per-line 'delivery_date' (sales orders) or 'schedule_date' (purchase orders).
- Order date
transaction_datedate - The date the order was placed. Defaults to today.
- Required by
schedule_datedate - The date the goods are needed. Defaults to the order date.
- Target warehouse
warehousetext - The warehouse every line is received into unless it names its own. Needed for stock items when the site has no default warehouse.
Outputs
purchase_orderobject- The created purchase order
Example output
{
"purchase_order": {}
}Create sales invoice
Create a draft sales invoice for a customer.
Inputs
- Customer
customertextRequired - The customer's ERPNext document name.
- Items
itemslistRequired - The document's line items; at least one is required. Each entry needs 'item_code' and 'qty', and may include 'rate', 'warehouse', and a per-line 'delivery_date' (sales orders) or 'schedule_date' (purchase orders).
- Posting date
posting_datedate - The date the invoice is posted.
- Due date
due_datedate - The date payment is due.
Outputs
sales_invoiceobject- The created sales invoice
Example output
{
"sales_invoice": {
"name": "example_value"
}
}Create sales order
Create a new sales order for a customer.
Inputs
- Customer
customertextRequired - The customer's ERPNext document name.
- Items
itemslistRequired - The document's line items; at least one is required. Each entry needs 'item_code' and 'qty', and may include 'rate', 'warehouse', and a per-line 'delivery_date' (sales orders) or 'schedule_date' (purchase orders).
- Order date
transaction_datedate - The date the order was placed.
- Delivery date
delivery_datedate - The date the order is expected to be delivered.
- Source warehouse
warehousetext - The warehouse every line ships from unless it names its own. Needed for stock items when the site has no default warehouse.
Outputs
sales_orderobject- The created sales order
Example output
{
"sales_order": {
"name": "example_value"
}
}Get customer
Retrieve a specific customer by name (ERPNext's document id).
Inputs
- Customer
customer_nametextRequired - The customer's ERPNext document name.
Outputs
customerobject- The customer record
Example output
{
"customer": {}
}Get invoice
Retrieve a specific sales invoice by name.
Inputs
- Invoice
invoice_nametextRequired - The sales invoice's ERPNext document name.
Outputs
invoiceobject- The sales invoice
Example output
{
"invoice": {}
}Get sales order
Retrieve a specific sales order by name.
Inputs
- Sales order
order_nametextRequired - The sales order's ERPNext document name.
Outputs
sales_orderobject- The sales order
Example output
{
"sales_order": {}
}List customers
Fetch a list of customers from ERPNext.
Inputs
- Limit
limitnumber - Maximum number of customers to return.From 1 to 500. Default:
10. - Offset
offsetnumber - Number of customers to skip before the first one returned.At least 0. Default:
0.
Outputs
countnumber- Customers returned
customerslist- Customer records
Example output
{
"count": 1,
"customers": []
}List employees
Fetch a list of employees from ERPNext.
Inputs
- Limit
limitnumber - Maximum number of employees to return.From 1 to 500. Default:
10.
Outputs
countnumber- Employees returned
employeeslist- Employee records
Example output
{
"count": 1,
"employees": []
}List invoices
Fetch a list of sales invoices from ERPNext.
Inputs
- Limit
limitnumber - Maximum number of invoices to return.From 1 to 500. Default:
10.
Outputs
countnumber- Invoices returned
invoiceslist- Sales invoice records
Example output
{
"count": 1,
"invoices": []
}List items
Fetch a list of inventory items from ERPNext.
Inputs
- Limit
limitnumber - Maximum number of items to return.From 1 to 500. Default:
10.
Outputs
countnumber- Items returned
itemslist- Item records
Example output
{
"count": 1,
"items": []
}List suppliers
Fetch a list of suppliers from ERPNext.
Inputs
- Limit
limitnumber - Maximum number of suppliers to return.From 1 to 500. Default:
10.
Outputs
countnumber- Suppliers returned
supplierslist- Supplier records
Example output
{
"count": 1,
"suppliers": []
}Update customer
Update an existing customer's email or phone.
Inputs
- Customer
customer_nametextRequired - The customer's ERPNext document name.
- Email
emailtext - The customer's email address.
- Phone
phonetext - The customer's mobile number.
Outputs
customerobject- The updated customer record
Example output
{
"customer": {}
}