Page History
...
GET | PUT/POST/PATCH | GET | GET | GET | GET | GET | |
U | U or U/{id} | U/{id} | U/count | U/access | U/new | U/describe | |
sessionId | ● | ● | ● | ● | ● | ● | ● |
limit | ● | ||||||
offset | ● | ||||||
sort | ● | ||||||
expandLevel | ● | ● | ● | ● | ● | ● | |
fields | ● | ● | ● | ● | ● | ||
withCount | ● | ● | |||||
q | ● | ● | ● | ||||
filters | ● | ||||||
date | ● | ||||||
Notes | U = http://restpath/api/v1.0/<className> ● = Optional parameter ● = Required parameter ● = Optional parameter, valid for returned Json body |
...
sessionId | Required for all methods. It is a Guid value returned by the /login. After a successful login operation, an internal session is created in the web service, with its own securedObjectSpace and SQL transaction pool. Example: http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513 |
limit | Sets the number of records returned by GET operations. Can be used to support pagination. The maximum number can be 100, default number is 25 if this parameter is omitted. Example: http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&limit=50 |
offset | Sets the starting point of the records that will be returned by GET operations. Can be used to support pagination. The default number is 0. Example: http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&limit=50 |
sort | Sets the order of the records that will be returned by GET operations. Multiple fields can be used to set the sort order.This parameter must be used with consideration on large databases since setting the sort order will not examine if the field(s) specified are indexed or not, on SQL level. Default sort order is Ascending. When DESC is used with the field name, sort order will be descending. Example: http://yourserver/api/v1.0/products?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&sort=FirmTitle+DESC, SalesRep.SalesRepPersonInfo.LastName |
expandLevel | Sets the hierarchy to full or none level, for the returned Json body. This option is used for nested business objects. Only full and none values are supported by this parameter. Suppose that the business object being queried or returned as a result is like: { FirmCode : string, FirmTitle: string, SalesRep: CT_SalesRep } Example: http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&expandLevel=none Returns: { FirmCode : "000000", FirmTitle: "XYZ Company", } http://yourserver/api/v1.0/products?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&expandLevel=full Returns: { FirmCode : "000000", FirmTitle: "XYZ Company", SalesRep: { FirstName: "John", LastName: "Adams" } } |
fields | Sets the field(s)/properties of the business object that will be returned in the Json body. This parameter can be used for returning a partial Json body from the GET methods. Recommended when a certain number of records needed, in order to construct a grid or report in the UI. Also, you can include the properties/names of the nested business objects in the list. For example, if we have two classes like this: Firm: { FirmCode : string, FirmTitle: string, SalesRep: CT_SalesRep, TaxOffice: string, TaxNo: string } CT_SalesRep: { FirstName: string, LastName:string } Usage: Returns: { FirmCode : "000000", FirmTitle: "XYZ Company" } Returns: { FirmCode : "000000", FirmTitle: "XYZ Company", SalesRep : { FirstName: "John" } } |
withCount | Sets if the total number of records will be returned by GET operations, depending on other parameters. Value of this parameter can be true or false. Please note that the result count value will not be affected by limit parameter, but it will be affected by q parameter. If set to true, a sample returned Json will look like: { "Result": 1, "Message": "", "Count": 28, "Items": [ { "Oid": "b293a022-3a92-47c1-bb57-76dc57b42369", "FirmCode": "0000000000000000", . . . } ] } If not set, "Count" pair will not be in the Json body. Example: |
q | Sets the query parameters for GET operations, in order to filter the result set. Since LogoCRM is based on the XAF (eXpressApp Framework) by Developer Express, q parameter will expect a valid Criteria, based on the special Criteria Language Syntax. For details please visit: https://documentation.devexpress.com/#CoreLibraries/CustomDocument4928 Example: http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513 &withCount=true&offset=0&limit=25&q=FirmTitle+Like+'A%'&expandLevel=full&sort=FirmCode http://yourserver/api/v1.0/products?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513& q=FirmTitle+Like+'A%'+AND+SalesRep.SalesRepPersonInfo.FirstName='John' |
filters | You can filter your list to contain only items which match a simple logical expression using the &filters parameter. Syntax: for this is &filters=(Column Internal Name operator value). |
Data Updating Methods
PUT | Used to update data. If the object constructed from the input body of the request (Json body) can not be located in the database, an error will be returned.All validation rules will be applied. Example: { "Result": 0, "Message": "(-306) Operation failed. Object can not be located: 2f950d99-0e14-4ed0-a21c-099d51e28b6f" } |
POST | Used to insert data. A successful POST method will return a Json body of the specified business object. Also, expandLevel and fields parameter can be used to decorate the result Json as needed. |
PATCH | Used to update partial data. A successful PATCH method will return a Json body of the specified business object. Also, expandLevel and fields parameter can be used to decorate the result Json as needed. Please note that PATCH method will not set any fields to NULL. Only values will be updated. If you need to set a field/property to NULL, please use PUT method. |
(Notes) | * Oid property exists in all business objects of LogoCRM. It is short for ObjectIdentifier and is uniqueidentifer, auto-generated in SQL databssases. Supplying an existing Oid in the request body of a POST operation will result in error: { "Result": 0, "Message": "(-304) Object with the following unique identifier already exists: 2f950d99-0e14-4ed0-a21c-079d51e28b6f" } |
...
Image | Verb | ClassName (DB TableName) | Notes | Collection | Collection Verb |
exchangeRates | ST_Exchange_Rates | Döviz kurları | ● | ● | |
reports | ST_Reports | Dizayn edilmiş raporlar | ● | ● | |
users | ST_User | Kullanıcılar | Departments Roles Sales reps Integration sets | DepartmentOid RoleOid SalesRepOid IntegrationSetOid | |
userAccessRights | ST_User_Access_Rights | Rollerde olmayan ek erişim hakları | ● | ● |
Query Formats
Remember that all values must be properly URL encoded: &filters=url encoded
Number operators are used on the values of the following form items:
Operator | Description |
equals | The value of the element is tested for equality against the specified value. |
notequals | The value of the element is tested for non-equality against the specified value. |
gt | Checks to see whether the value of the element is greater than the specified value. |
lt | Checks to see whether the value of the element is less than the specified value. |
gte | Checks to see whether the value of the element is greater than or equal to the specified value. |
lte | Checks to see whether the value of the element is less than or equal to the specific |
String Range
&filters=ColumnName[LT]=value |
&filters=ColumnName[LTE]=value |
&filters=ColumnName[GT]=value |
&filters=ColumnName[GTE]=value |
&filters=ColumnName[EQ]=value |
&filters=ColumnName[NE]=value |
Example:
- http://yourserver/LogoCRMRest/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&filters=FirmCode[LT]=B001, FirmCode[GE]=A001
Numeric Range
&filters=ColumnName[LT]=value |
&filters=ColumnName[LTE]=value |
&filters=ColumnName[GT]=value |
&filters=ColumnName[GTE]=value |
&filters=ColumnName[EQ]=value |
&filters=ColumnName[NE]=value |
Example:
- http://yourserver/LogoCRMRest/api/v1.0/activities?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&filters=Id[LT]=000047, Id[EQ]=000049
Date Range
Time, date, and time stamp values must be provided in ISO 8601 extended format. For example, a time stamp for 21 Dec 2015 10:00 AM Pacific Standard Time must be given as: 2015-12-21T10:00:00-08:00 or 2015-12-21T18:00:00Z.
&filters=ColumnName[LT]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
&filters=ColumnName[LTE]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
&filters=ColumnName[GT]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
&filters=ColumnName[GTE]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
&filters=ColumnName[EQ]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
&filters=ColumnName[NE]=(YYYY-MM-DDTHH:MM:SS.SSSZ) |
Example:
- http://yourserver/LogoCRMRest/api/v1.0/activities?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&filters=ActivityRepeatDate[LT]=( 2018-09- 14T15:44:00.0000), ActivityRepeatDate[GT]=( 2018-09- 10T19:42:00.0000)
List Selection
You must be familiar with the table's column names and values to create a query.
&filters=ColumnName=value |
Example:
Group Selection
You can filter multiple values that are in the same table.
&filters= ColumnName=value1|value2 |
Example:
Like
&filters=ColumnName[LIKE]=value,ColumnName[LIKE]=%value% |
Example:
Date Filter
When querying the records on Rest, the Getobjects () method should be read by adding "Date> _CreatedDateTime" or "Date> _LastModifiedDateTime" criteria when reading the relevant module from the database when "Date" information is received through QueryString. If "Date" information is not given in QueryString, it will be read as it is currently.
Example:
filters | ● |