import 'package:openapi/api.dart';
All URIs are relative to https://demo.erpnext.com
Method | HTTP request | Description |
---|---|---|
apiMethodDottedPathToMethodGet | GET /api/method/{dotted_path_to_method} | Call a remote procedure |
apiMethodDottedPathToMethodPost | POST /api/method/{dotted_path_to_method} | Post data to a remote procedure |
apiResourceDocTypeDocumentNameDelete | DELETE /api/resource/{DocType}/{DocumentName} | Delete a specific document |
apiResourceDocTypeDocumentNameGet | GET /api/resource/{DocType}/{DocumentName} | Get a specific document |
apiResourceDocTypeDocumentNamePut | PUT /api/resource/{DocType}/{DocumentName} | Update a specific document |
apiResourceDocTypeGet | GET /api/resource/{DocType} | Get a list of documents |
apiResourceDocTypeGet_0 | GET /api/resource/DocType | Get a list of Doctypes |
apiResourceDocTypePost | POST /api/resource/{DocType} | Create a new document |
apiMethodDottedPathToMethodGet(dottedPathToMethod)
Call a remote procedure
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var dottedPathToMethod = frappe.auth.get_logged_user; // String | Path to the function you'd like to call, separated by dots.
try {
api_instance.apiMethodDottedPathToMethodGet(dottedPathToMethod);
} catch (e) {
print("Exception when calling GeneralApi->apiMethodDottedPathToMethodGet: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
dottedPathToMethod | String | Path to the function you'd like to call, separated by dots. | [default to null] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apiMethodDottedPathToMethodPost(dottedPathToMethod)
Post data to a remote procedure
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var dottedPathToMethod = frappe.auth.get_logged_user; // String | Path to the function you'd like to call, separated by dots.
try {
api_instance.apiMethodDottedPathToMethodPost(dottedPathToMethod);
} catch (e) {
print("Exception when calling GeneralApi->apiMethodDottedPathToMethodPost: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
dottedPathToMethod | String | Path to the function you'd like to call, separated by dots. | [default to null] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse202 apiResourceDocTypeDocumentNameDelete(docType, documentName)
Delete a specific document
TBD
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var docType = docType_example; // String | The type of the document you'd like to delete. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc.
var documentName = documentName_example; // String | The name (ID) of the document you'd like to delete. For example EMP001 (of type Employee).
try {
var result = api_instance.apiResourceDocTypeDocumentNameDelete(docType, documentName);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypeDocumentNameDelete: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
docType | String | The type of the document you'd like to delete. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc. | [default to null] |
documentName | String | The name (ID) of the document you'd like to delete. For example EMP001 (of type Employee). | [default to null] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 apiResourceDocTypeDocumentNameGet(docType, documentName, fields, filters)
Get a specific document
Get a document by it's name, for example EMP001 of DocType Employee.
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var docType = docType_example; // String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc.
var documentName = documentName_example; // String | The name (ID) of the document you'd like to receive. For example EMP001 (of type Employee).
var fields = []; // List<String> | By default, only the \"name\" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=[\"name\",\"country\"]
var filters = []; // List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[[\"Customer\", \"country\", \"=\", \"India\"]]
try {
var result = api_instance.apiResourceDocTypeDocumentNameGet(docType, documentName, fields, filters);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypeDocumentNameGet: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
docType | String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc. | [default to null] |
documentName | String | The name (ID) of the document you'd like to receive. For example EMP001 (of type Employee). | [default to null] |
fields | List<String> | By default, only the "name" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=["name","country"] | [optional] [default to []] |
filters | List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[["Customer", "country", "=", "India"]] | [optional] [default to []] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 apiResourceDocTypeDocumentNamePut(docType, documentName)
Update a specific document
TBD
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var docType = docType_example; // String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc.
var documentName = documentName_example; // String | The name (ID) of the document you'd like to update. For example EMP001 (of type Employee).
try {
var result = api_instance.apiResourceDocTypeDocumentNamePut(docType, documentName);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypeDocumentNamePut: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
docType | String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc. | [default to null] |
documentName | String | The name (ID) of the document you'd like to update. For example EMP001 (of type Employee). | [default to null] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DocList apiResourceDocTypeGet(docType, fields, filters, limitPageLength, limitStart)
Get a list of documents
Returns a list of documents of the given type
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var docType = docType_example; // String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc.
var fields = []; // List<String> | By default, only the \"name\" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=[\"name\",\"country\"]
var filters = []; // List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[[\"Customer\", \"country\", \"=\", \"India\"]]
var limitPageLength = 56; // int | By default, all listings are returned paginated. With this parameter you can change the page size (how many items are teturned at once).
var limitStart = 56; // int | To request successive pages, pass a multiple of your limit_page_length as limit_start. For Example, to request the second page, pass limit_start as 20.
try {
var result = api_instance.apiResourceDocTypeGet(docType, fields, filters, limitPageLength, limitStart);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypeGet: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
docType | String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc. | [default to null] |
fields | List<String> | By default, only the "name" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=["name","country"] | [optional] [default to []] |
filters | List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[["Customer", "country", "=", "India"]] | [optional] [default to []] |
limitPageLength | int | By default, all listings are returned paginated. With this parameter you can change the page size (how many items are teturned at once). | [optional] [default to 20] |
limitStart | int | To request successive pages, pass a multiple of your limit_page_length as limit_start. For Example, to request the second page, pass limit_start as 20. | [optional] [default to 0] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2002 apiResourceDocTypeGet_0(fields, filters, limitPageLength, limitStart)
Get a list of Doctypes
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var fields = []; // List<String> | By default, only the \"name\" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=[\"name\",\"country\"]
var filters = []; // List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[[\"Customer\", \"country\", \"=\", \"India\"]]
var limitPageLength = 56; // int | By default, all listings are returned paginated. With this parameter you can change the page size (how many items are teturned at once).
var limitStart = 56; // int | To request successive pages, pass a multiple of your limit_page_length as limit_start. For Example, to request the second page, pass limit_start as 20.
try {
var result = api_instance.apiResourceDocTypeGet_0(fields, filters, limitPageLength, limitStart);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypeGet_0: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
fields | List<String> | By default, only the "name" field is included in the listing, to add more fields, you can pass the fields param to GET request. For example, fields=["name","country"] | [optional] [default to []] |
filters | List<List<String>> | You can filter the listing using sql conditions by passing them as the filters GET param. Each condition is an array of the format, [{doctype}, {field}, {operator}, {value}]. For example, filters=[["Customer", "country", "=", "India"]] | [optional] [default to []] |
limitPageLength | int | By default, all listings are returned paginated. With this parameter you can change the page size (how many items are teturned at once). | [optional] [default to 20] |
limitStart | int | To request successive pages, pass a multiple of your limit_page_length as limit_start. For Example, to request the second page, pass limit_start as 20. | [optional] [default to 0] |
No authorization required
- Content-Type: Not defined
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 apiResourceDocTypePost(docType, body)
Create a new document
import 'package:openapi/api.dart';
var api_instance = GeneralApi();
var docType = docType_example; // String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc.
var body = Object(); // Object |
try {
var result = api_instance.apiResourceDocTypePost(docType, body);
print(result);
} catch (e) {
print("Exception when calling GeneralApi->apiResourceDocTypePost: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
docType | String | The DocType you'd like to receive. For example Customer, Supplier, Employee, Account, Lead, Company, Sales Invoice, Purchase Invoice, Stock Entry, etc. | [default to null] |
body | Object | [optional] |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, text/html,
[Back to top] [Back to API list] [Back to Model list] [Back to README]