|
dolibarr 20.0.5
|


Public Member Functions | |
| __construct () | |
| Constructor. | |
| getOrderingMethods ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of ordering methods. | |
| getOrderingOrigins ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of ordering origins. | |
| getPaymentTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of payments types. | |
| getListOfRegions ($sortfield="code_region", $sortorder='ASC', $limit=100, $page=0, $country=0, $filter='', $sqlfilters='') | |
| Get the list of regions. | |
| getRegionByID ($id) | |
| Get region by ID. | |
| getRegionByCode ($code) | |
| Get region by Code. | |
| getListOfStates ($sortfield="code_departement", $sortorder='ASC', $limit=100, $page=0, $country=0, $filter='', $sqlfilters='') | |
| Get the list of states/provinces. | |
| getStateByID ($id) | |
| Get state by ID. | |
| getStateByCode ($code) | |
| Get state by Code. | |
| getListOfCountries ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $filter='', $lang='', $sqlfilters='') | |
| Get the list of countries. | |
| getCountryByID ($id, $lang='') | |
| Get country by ID. | |
| getCountryByCode ($code, $lang='') | |
| Get country by Code. | |
| getCountryByISO ($iso, $lang='') | |
| Get country by Iso. | |
| getAvailability ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of delivery times. | |
| getListOfEventTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $type='', $module='', $active=1, $sqlfilters='') | |
| Get the list of events types. | |
| getListOfExpenseReportsTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $module='', $active=1, $sqlfilters='') | |
| Get the list of Expense Report types. | |
| getListOfContactTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $type='', $module='', $active=1, $lang='', $sqlfilters='') | |
| Get the list of contacts types. | |
| getListOfCivilities ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $module='', $active=1, $lang='', $sqlfilters='') | |
| Get the list of civilities. | |
| getListOfCurrencies ($multicurrency=0, $sortfield="code_iso", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of currencies. | |
| getListOfExtrafields ($sortfield="t.pos", $sortorder='ASC', $elementtype='', $sqlfilters='') | |
| Get the list of extra fields. | |
| deleteExtrafieldsFromNames ($attrname, $elementtype) | |
| Delete extrafield. | |
| getExtrafields ($attrname, $elementtype) | |
| get Extrafield object | |
| postExtrafields ($attrname, $elementtype, $request_data=null) | |
| Create Extrafield object. | |
| updateExtrafields ($attrname, $elementtype, $request_data=null) | |
| Update Extrafield object. | |
| getListOfTowns ($sortfield="zip,town", $sortorder='ASC', $limit=100, $page=0, $zipcode='', $town='', $active=1, $sqlfilters='') | |
| Get the list of towns. | |
| getPaymentTerms ($sortfield="sortorder", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of payments terms. | |
| getShippingModes ($limit=100, $page=0, $active=1, $lang='', $sqlfilters='') | |
| Get the list of shipping methods. | |
| getListOfMeasuringUnits ($sortfield="rowid", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of measuring units. | |
| getListOfLegalForm ($sortfield="rowid", $sortorder='ASC', $limit=100, $page=0, $country=0, $active=1, $sqlfilters='') | |
| Get the list of legal form of business. | |
| getListOfStaff ($sortfield="id", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of staff. | |
| getListOfsocialNetworks ($sortfield="rowid", $sortorder='ASC', $limit=100, $page=0, $active=1, $sqlfilters='') | |
| Get the list of social networks. | |
| getTicketsCategories ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $lang='', $sqlfilters='') | |
| Get the list of tickets categories. | |
| getTicketsSeverities ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $lang='', $sqlfilters='') | |
| Get the list of tickets severity. | |
| getTicketsTypes ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $lang='', $sqlfilters='') | |
| Get the list of tickets types. | |
| getListOfIncoterms ($sortfield="code", $sortorder='ASC', $limit=100, $page=0, $active=1, $lang='', $sqlfilters='') | |
| Get the list of incoterms. | |
| getCompany () | |
| Get properties of company. | |
| getEstablishments () | |
| Get the list of establishments. | |
| getEtablishmentByID ($id) | |
| Get establishment by ID. | |
| getConf ($constantname) | |
| Get value of a setup variables. | |
| getCheckIntegrity ($target) | |
| Do a test of integrity for files and setup. | |
| getModules () | |
| Get list of enabled modules. | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir='', $refreshCache=false) | |
| Constructor. | |
Protected Member Functions | |
| _cleanObjectDatas ($object) | |
| Clean sensible object datas. | |
Protected Member Functions inherited from DolibarrApi | |
| _checkValForAPI ($field, $value, $object) | |
| Check and convert a string depending on its type/name. | |
| _filterObjectProperties ($object, $properties) | |
| Filter properties that will be returned on object. | |
| _checkFilters ($sqlfilters, &$error='') | |
| Return if a $sqlfilters parameter is valid Function no more used. | |
Private Member Functions | |
| _fetchCregion ($id, $code='') | |
| Get region. | |
| _fetchCstate ($id, $code='') | |
| Get state. | |
| _fetchCcountry ($id, $code='', $iso='', $lang='') | |
| Get country. | |
| translateLabel ($object, $lang, $prefix='Country', $dict=array('dict')) | |
| Translate the name of the object to the given language. | |
Additional Inherited Members | |
Static Protected Member Functions inherited from DolibarrApi | |
| static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') |
| Check access by user to a given resource. | |
| static | _forge_criteria_callback ($matches) |
| Function to forge a SQL criteria from a Generic filter string. | |
Definition at line 40 of file api_setup.class.php.
|
protected |
Clean sensible object datas.
| Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 732 of file api_setup.class.php.
References $object.
Referenced by _fetchCcountry(), _fetchCregion(), _fetchCstate(), getCompany(), getEtablishmentByID(), getListOfCountries(), getListOfRegions(), getListOfStates(), and getModules().
|
private |
Get country.
| int | $id | ID of country |
| string | $code | Code of country (2 characters) |
| string | $iso | ISO of country (3 characters) |
| string | $lang | Code of the language the name of the country must be translated to |
| RestException |
Definition at line 643 of file api_setup.class.php.
References _cleanObjectDatas(), and translateLabel().
Referenced by getCountryByCode(), getCountryByID(), and getCountryByISO().
|
private |
Get region.
| int | $id | ID of region |
| string | $code | Code of region |
| RestException |
Definition at line 595 of file api_setup.class.php.
References _cleanObjectDatas().
Referenced by getRegionByCode(), and getRegionByID().
|
private |
Get state.
| int | $id | ID of state |
| string | $code | Code of state |
| RestException |
Definition at line 618 of file api_setup.class.php.
References _cleanObjectDatas().
Referenced by getStateByCode(), and getStateByID().
| Setup::deleteExtrafieldsFromNames | ( | $attrname, | |
| $elementtype ) |
Delete extrafield.
| string | $attrname | extrafield attrname |
| string | $elementtype | extrafield elementtype |
@url DELETE extrafields/{elementtype}/{attrname}
Definition at line 1211 of file api_setup.class.php.
| Setup::getAvailability | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of delivery times.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Delivery times is active or not {@min 0} {@max 1} |
| string | $sqlfilters | SQL criteria to filter with. |
@url GET dictionary/availability
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list of availabilities |
Definition at line 678 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getCheckIntegrity | ( | $target | ) |
Do a test of integrity for files and setup.
| string | $target | Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr. |
@url GET checkintegrity
| RestException | 403 Forbidden |
| RestException | 404 Signature file not found |
| RestException | 500 Technical error |
Definition at line 2342 of file api_setup.class.php.
References dol_dir_list(), dol_filemtime(), dol_filesize(), dol_is_file(), dol_sanitizeFileName(), dol_sort_array(), getDolGlobalString(), getFilesUpdated(), getURLContent(), and load_fiche_titre().
| Setup::getCompany | ( | ) |
Get properties of company.
@url GET /company
| RestException | 403 Forbidden |
Definition at line 2190 of file api_setup.class.php.
References _cleanObjectDatas(), and getDolGlobalString().
| Setup::getConf | ( | $constantname | ) |
Get value of a setup variables.
Note that conf variables that stores security key or password hashes can't be loaded with API.
| string | $constantname | Name of conf variable to get |
@url GET conf/{constantname}
| RestException | 400 Error Bad or unknown value for constantname |
| RestException | 403 Forbidden |
Definition at line 2311 of file api_setup.class.php.
References getDolGlobalString(), and isASecretKey().
| Setup::getCountryByCode | ( | $code, | |
| $lang = '' ) |
Get country by Code.
| string | $code | Code of country (2 characters) |
| string | $lang | Code of the language the name of the country must be translated to |
@url GET dictionary/countries/byCode/{code}
| RestException | 404 Country not found |
| RestException | 503 Error retrieving country |
Definition at line 564 of file api_setup.class.php.
References _fetchCcountry().
| Setup::getCountryByID | ( | $id, | |
| $lang = '' ) |
Get country by ID.
| int | $id | ID of country |
| string | $lang | Code of the language the name of the country must be translated to |
@url GET dictionary/countries/{id}
| RestException | 404 Country not found |
| RestException | 503 Error retrieving country |
Definition at line 547 of file api_setup.class.php.
References _fetchCcountry().
| Setup::getCountryByISO | ( | $iso, | |
| $lang = '' ) |
Get country by Iso.
| string | $iso | ISO of country (3 characters) |
| string | $lang | Code of the language the name of the country must be translated to |
@url GET dictionary/countries/byISO/{iso}
| RestException | 404 Country not found |
| RestException | 503 Error retrieving country |
Definition at line 581 of file api_setup.class.php.
References _fetchCcountry().
| Setup::getEstablishments | ( | ) |
Get the list of establishments.
@url GET /establishments
| RestException | 503 Error when retrieving list of establishments |
Definition at line 2245 of file api_setup.class.php.
| Setup::getEtablishmentByID | ( | $id | ) |
Get establishment by ID.
| int | $id | ID of establishment |
@url GET establishments/{id}
| RestException | 404 Establishment not found |
| RestException | 503 Error when retrieving establishment |
Definition at line 2284 of file api_setup.class.php.
References _cleanObjectDatas().
| Setup::getExtrafields | ( | $attrname, | |
| $elementtype ) |
get Extrafield object
| string | $attrname | extrafield attrname |
| string | $elementtype | extrafield elementtype |
@url GET extrafields/{elementtype}/{attrname}
@suppress PhanPluginUnknownArrayMethodParamType Luracast limitation
Definition at line 1249 of file api_setup.class.php.
References jsonOrUnserialize().
| Setup::getListOfCivilities | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $module = '', | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of civilities.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $module | To filter on module events |
| int | $active | Civility is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the civility must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/civilities
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of civilities |
Definition at line 993 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getListOfContactTypes | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $type = '', | |||
| $module = '', | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of contacts types.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $type | To filter on type of contact |
| string | $module | To filter on module contacts |
| int | $active | Contact's type is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the civility must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/contact_types
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of contacts types |
Definition at line 924 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getListOfCountries | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $filter = '', | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of countries.
The names of the countries will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by country ID.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $filter | To filter the countries by name |
| string | $lang | Code of the language the label of the countries must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/countries
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error retrieving list of countries |
Definition at line 482 of file api_setup.class.php.
References _cleanObjectDatas(), forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getListOfCurrencies | ( | $multicurrency = 0, | |
| $sortfield = "code_iso", | |||
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of currencies.
| int | $multicurrency | Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} |
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/currencies
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of currencies |
Definition at line 1058 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfEventTypes | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $type = '', | |||
| $module = '', | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of events types.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $type | To filter on type of event |
| string | $module | To filter on module events |
| int | $active | Event's type is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/event_types
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of events types |
Definition at line 791 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfExpenseReportsTypes | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $module = '', | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of Expense Report types.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $module | To filter on module |
| int | $active | Event's type is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/expensereport_types
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of expense report types |
Definition at line 858 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfExtrafields | ( | $sortfield = "t.pos", | |
| $sortorder = 'ASC', | |||
| $elementtype = '', | |||
| $sqlfilters = '' ) |
Get the list of extra fields.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| string | $elementtype | Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...) |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')" |
@url GET extrafields
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of extra fields |
Definition at line 1128 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and jsonOrUnserialize().
| Setup::getListOfIncoterms | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of incoterms.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the type must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/incoterms
| RestException | 503 Error when retrieving list of incoterms types |
Definition at line 2135 of file api_setup.class.php.
References DolibarrApi\_checkFilters().
| Setup::getListOfLegalForm | ( | $sortfield = "rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $country = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of legal form of business.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $country | To filter on country |
| int | $active | Lega form is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/legal_form
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of legal form |
Definition at line 1758 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfMeasuringUnits | ( | $sortfield = "rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of measuring units.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Measuring unit is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/units
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of measuring units |
Definition at line 1698 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfRegions | ( | $sortfield = "code_region", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $country = 0, | |||
| $filter = '', | |||
| $sqlfilters = '' ) |
Get the list of regions.
The returned list is sorted by region ID.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $country | To filter on country |
| string | $filter | To filter the regions by name |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/regions
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error retrieving list of regions |
Definition at line 266 of file api_setup.class.php.
References DolibarrApi\_checkFilters(), and _cleanObjectDatas().
| Setup::getListOfsocialNetworks | ( | $sortfield = "rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of social networks.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Social network is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/socialnetworks
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of social networks |
Definition at line 1879 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfStaff | ( | $sortfield = "id", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of staff.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Staff is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/staff
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of staff |
Definition at line 1820 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfStates | ( | $sortfield = "code_departement", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $country = 0, | |||
| $filter = '', | |||
| $sqlfilters = '' ) |
Get the list of states/provinces.
The names of the states will be translated to the given language if the $lang parameter is provided. The value of $lang must be a language code supported by Dolibarr, for example 'en_US' or 'fr_FR'. The returned list is sorted by state ID.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $country | To filter on country |
| string | $filter | To filter the states by name |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/states
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error retrieving list of states |
Definition at line 373 of file api_setup.class.php.
References _cleanObjectDatas(), and forgeSQLFromUniversalSearchCriteria().
| Setup::getListOfTowns | ( | $sortfield = "zip,town", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $zipcode = '', | |||
| $town = '', | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of towns.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| string | $zipcode | To filter on zipcode |
| string | $town | To filter on city name |
| int | $active | Town is active or not {@min 0} {@max 1} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/towns
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of towns |
Definition at line 1505 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getModules | ( | ) |
Get list of enabled modules.
@url GET /modules
| RestException | 403 Forbidden |
Definition at line 2660 of file api_setup.class.php.
References _cleanObjectDatas(), and getDolGlobalString().
| Setup::getOrderingMethods | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of ordering methods.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Payment type is active or not {@min 0} {@max 1} |
| string | $sqlfilters | SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')" |
@url GET dictionary/ordering_methods
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error retrieving list of ordering methods |
Definition at line 71 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getOrderingOrigins | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of ordering origins.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Payment type is active or not {@min 0} {@max 1} |
| string | $sqlfilters | SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')" |
@url GET dictionary/ordering_origins
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error retrieving list of ordering origins |
Definition at line 135 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getPaymentTerms | ( | $sortfield = "sortorder", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of payments terms.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $sqlfilters | SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" |
@url GET dictionary/payment_terms
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error when retrieving list of payments terms |
Definition at line 1572 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getPaymentTypes | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $sqlfilters = '' ) |
Get the list of payments types.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Payment type is active or not {@min 0} {@max 1} |
| string | $sqlfilters | SQL criteria to filter with. Syntax example "(t.code:=:'CHQ')" |
@url GET dictionary/payment_types
| RestException | 400 Bad value for sqlfilters |
| RestException | 403 Access denied |
| RestException | 503 Error retrieving list of payment types |
Definition at line 200 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria().
| Setup::getRegionByCode | ( | $code | ) |
Get region by Code.
| string | $code | Code of region |
@url GET dictionary/regions/byCode/{code}
| RestException | 404 Region not found |
| RestException | 503 Error when retrieving region |
Definition at line 346 of file api_setup.class.php.
References _fetchCregion().
| Setup::getRegionByID | ( | $id | ) |
Get region by ID.
| int | $id | ID of region |
@url GET dictionary/regions/{id}
| RestException | 404 Region not found |
| RestException | 503 Error retrieving region |
Definition at line 330 of file api_setup.class.php.
References _fetchCregion().
| Setup::getShippingModes | ( | $limit = 100, | |
| $page = 0, | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of shipping methods.
| int | $limit | Number of items per page |
| int | $page | Page number {@min 0} |
| int | $active | Shipping methodsm is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the method must be translated to |
| string | $sqlfilters | SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" |
@url GET dictionary/shipping_methods
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of shipping modes |
Definition at line 1636 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getStateByCode | ( | $code | ) |
Get state by Code.
| string | $code | Code of state |
@url GET dictionary/states/byCode/{code}
| RestException | 404 State not found |
| RestException | 503 Error retrieving state |
Definition at line 455 of file api_setup.class.php.
References _fetchCstate().
| Setup::getStateByID | ( | $id | ) |
Get state by ID.
| int | $id | ID of state |
@url GET dictionary/states/{id}
| RestException | 404 State not found |
| RestException | 503 Error retrieving state |
Definition at line 439 of file api_setup.class.php.
References _fetchCstate().
| Setup::getTicketsCategories | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of tickets categories.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the category must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/ticket_categories
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of tickets categories |
Definition at line 1946 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getTicketsSeverities | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of tickets severity.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the severity must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/ticket_severities
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of tickets severities |
Definition at line 2009 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::getTicketsTypes | ( | $sortfield = "code", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $active = 1, | |||
| $lang = '', | |||
| $sqlfilters = '' ) |
Get the list of tickets types.
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | Number of items per page |
| int | $page | Page number (starting from zero) |
| int | $active | Payment term is active or not {@min 0} {@max 1} |
| string | $lang | Code of the language the label of the type must be translated to |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" |
@url GET dictionary/ticket_types
| RestException | 400 Bad value for sqlfilters |
| RestException | 503 Error when retrieving list of tickets types |
Definition at line 2072 of file api_setup.class.php.
References forgeSQLFromUniversalSearchCriteria(), and translateLabel().
| Setup::postExtrafields | ( | $attrname, | |
| $elementtype, | |||
| $request_data = null ) |
Create Extrafield object.
| string | $attrname | extrafield attrname |
| string | $elementtype | extrafield elementtype |
| array | $request_data | Request datas |
@url POST extrafields/{elementtype}/{attrname}
@suppress PhanPluginUnknownArrayMethodParamType Luracast limitation
Definition at line 1326 of file api_setup.class.php.
References DolibarrApi\_checkValForAPI().
|
private |
Translate the name of the object to the given language.
| object | $object | Object with label to translate |
| string | $lang | Code of the language the name of the object must be translated to |
| string | $prefix | Prefix for translation key |
| array | $dict | Array of dictionary for translation |
Definition at line 752 of file api_setup.class.php.
References $object.
Referenced by _fetchCcountry(), getListOfCivilities(), getListOfContactTypes(), getListOfCountries(), getShippingModes(), getTicketsCategories(), getTicketsSeverities(), and getTicketsTypes().
| Setup::updateExtrafields | ( | $attrname, | |
| $elementtype, | |||
| $request_data = null ) |
Update Extrafield object.
| string | $attrname | extrafield attrname |
| string | $elementtype | extrafield elementtype |
| array | $request_data | Request datas |
@url PUT extrafields/{elementtype}/{attrname}
@suppress PhanPluginUnknownArrayMethodParamType Luracast limitation
Definition at line 1415 of file api_setup.class.php.
References DolibarrApi\_checkValForAPI(), and dol_syslog().