Method Parameter Matrix


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


Parameters

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

http://yourserver/api/v1.0/products?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&offset=0&limit=100


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

http://yourserver/api/v1.0/products?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&offset=0&limit=100


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/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&sort=FirmCode,FirmTitle

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:

http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&fields=FirmCode,FirmTitle

Returns:

{

    FirmCode : "000000",

    FirmTitle: "XYZ Company"

}

http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&fields=FirmCode,FirmTitle,FirstName

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:

http://yourserver/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&offset=0&limit=100&withCount=true


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"

}

Return Structures

LogonResult

http://yourserver/api/v1.0/login

Returned after a /login call.

Example:

{

  "Result": 1,

  "Message": "",

  "SessionId": "1c343a55-bdbc-4363-886c-4ec6952d5ade"

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

SessionId

Returns a Guid for using as a parameter in other methods



LogoutResult

http://yourserver/api/v1.0/logout

Returned after a /logout call

Example:

{

  "Result": 1,

  "Message": ""

}

Or

{

  "Result": 0,

  "Message": "(-221) SessionId not found: e61e4c99-e33c-4952-9e90-ec8d6fd69b6e"

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

 


AccessResult

http://yourserver/api/v1.0/businessobject/access

Returned after a /access call. Can be used to get the logged in user's role settings for a business object.

Example:

{

  "Result": 1,

  "Message": "",

  "CanRead": true,

  "CanWrite": true,

  "CanCreate": true,

  "CanDelete": true,

  "CanNavigate": true

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

CanRead

True or False. Returns true if the logged in user can read the business object.

CanWrite

True or False. Returns true if the logged in user can update the business object.

CanCreate

True or False. Returns true if the logged in user can insert a new business object.

CanDelete

True or False. Returns true if the logged in user can delete the business object.

CanNavigate

True or False. Returns true if the logged in user can list the business object. Please note that if this value is false, GET operation will always result in an empty set.

 

 

CountResult

http://yourserver/api/v1.0/businessobject/count

Returned after a /count call

Example:

{

  "Result": 1,

  "Message": "",

  "Count": 32

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

Count

Contains the number of records, depending on the parameters.

 


ObjectResult

http://yourserver/api/v1.0/businessobject

Returned after a /businessobject call by the GET method.

Example:

{

  "Result": 1,

  "Message": "",

  "Count": 32,

  "Items": [

    {

      "Oid": "2f950d99-0e14-4ed0-a21c-079d51e28b6f",

      "FirmCode": "00000000000021500",

      "FirmTitle": "Koç Yatirim-Updated",

      "_CreatedBy": {

        "Oid": "3d6b98e2-ebd2-4afb-8c04-d753c3993beb",

        "FirstName": "Berna"

      }

    }

  ]

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

Count

Contains the number of records, if withCount parameter is used.

Items

Contains the specified records of the business object. Structure depends on the class structure of the business object.

 


OperationResult

POST/PUT/PATCH/DELETE:

http://yourserver/api/v1.0/businessobject

http://yourserver/api/v1.0/businessobject/{Oid}

GET:

http://yourserver/api/v1.0/businessobject/new

Returned after a /businessobject or /businessobject/new call by the applied POST/PUT/PATCH/DELETE/GET methods.

Example:

{

  "Result": 1,

  "Message": "",

  "Item": {

    "Oid": "2f950d99-0e14-4ed0-a21c-079d51e28b6f",

    "FirmCode": "00000000000021500",

    "FirmTitle": "Koç Yatirim-Updated",

    "InUse": false,

    .

    .

    .

    .

  }

}

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

Item

Contains the specified business object. Structure depends on the class structure of the business object. Value is null after a DELETE operation.

 


DescribeResult

POST/PUT/PATCH/DELETE:

http://yourserver/api/v1.0/businessobject/describe

Returned after a /businessobject/describe by GET method.

Example:

{

  "Result": 1,

  "Caption": "Activity",

  "ClassName": "MT_Activity",

  "FullClassName": "logocrm.net.Module.BusinessObjects.MT_Activity",

  "ValidationsOnSave": "comparison_ActivityCanUseContact: ActivityContact.ContactRole.CanUseInActivities = True

comparison_ActivityDateMustBeLessThanRepeatDate: ActivityRepeatDate IS NULL OR ActivityDate <= ActivityRepeatDate

comparison_ActivityCanUseFirm: ActivityFirm.FirmRole.CanUseInActivities = True",

"ValidationsOnDelete": null,

  "Properties": [

    {

      "Property": "Id",

      "PropertyType": "String",

      "PropertyCaption": "Id",

      "Size": 42,

      "Required": true,

      "Notes": "Value is auto generated",

      "Validations": "Value is auto generated",

    },

    {

      "Property": "ActivitySubject",

      "PropertyType": "String",

      "PropertyCaption": "Subject",

      "Size": 120,

      "Required": false

    },

.

.

.

Result

0 - Error, 1 - Success.

Message

Empty if successful, otherwise contains the error message.

ClassName

Contains the ClassName and DB Table name of the business object.

FullClassName

Contains the class name of the business object, including the assembly name space.

ValidationsOnSave

Contains if there are validation rules defined for the business object, before a save operation.

ValidationsOnDelete

Contains if there are validation rules defined for the business object, before a delete operation.

Property

Name of the property of the business object.

PropertyType

Type of the property.

PropertyCaption

A short description of the property. This value is used in the UI at the same time.

Size

Size of the property, if the PropertyType = String. -1 means unlimited.

Required

True if this property can not be left empty. This is obtained from validation rules.

Notes

Contains additional notes about the property, if its value must be Unique, etc.

Validations

Contains the defined validation rules for the property, before a save or delete operation.


URIs

<base> = http://yourhost/api/v1.0

bo = businessobject (see list)

Verb

Method

Request

Description

<base>/bo

GET

none

Gets the list of business objects.

Example:

http://localhost:53417/api/v1.0/firms

<base>/bo/{id}

GET

none

Gets the specified business object. id is Oid.

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F

<base>/bo/calculate

POST

Json

Performs some necessary business-object-internal calculations. Not effective on every business object. Recommended for proposals. For proposal, gets the price of the product if not set, calculates totals. id is Oid.

Example:

http://localhost:53417/api/v1.0/proposals/calculate

<base>/bo/{id}/{collection}

GET

none

Gets the collection of the specified property of the business object.

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F/FirmContacts?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd&expandLevel=none&FirstName+Like+'A%'

<base>/bo/{id}/{collection}/id

GET

none

Gets the specified item in the collection property of the business object (id is the Oid of the collection item)

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F/FirmContacts/ F798B922-13A6-4B9C-A7FF-C9A4EF109490

<base>/bo/count

GET

none

Gets number of records of the business object

Example:

http://localhost:53417/api/v1.0/firms/count?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd&expandLevel=none&FirstName+Like+'A%'

<base>/bo/access

GET

none

Gets number role permissions of the logged in user based on the specified business object

Example:

http://localhost:53417/api/v1.0/firms/access?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

<base>/bo/new

GET

none

Returns a full json object with the default values assigned. Correct way to use before inserting a new record.

Example:

http://localhost:53417/api/v1.0/firms/new?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

<base>/bo/describe

GET

none

Returns a list of properties of the specified business object, with explanation, in a Json body.

Example:

http://localhost:53417/api/v1.0/firms/describe?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

http://localhost:53417/api/v1.0/firms/describe?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd?expandLevel=full

<base>/bo

POST

Json

Inserts a new record.

Example:

http://localhost:53417/api/v1.0/firms

<base>/bo

PUT

Json

Updates the specified business object. Json body should include Oid.

Example:

http://localhost:53417/api/v1.0/firms

<base>/bo/{id}

PUT

Json

Updates the specified business object. Id is Oid.

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F

<base>/bo

PATCH

Json

Updates the specified business object partially. Json body should include Oid.

Example:

http://localhost:53417/api/v1.0/firms

<base>/bo/{id}

PATCH

Json

Updates the specified business object partially. Id is Oid.

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F

<base>/bo/{id}

DELETE

none

Deletes the specified business object. Id is Oid.

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F

<base>/bo/{id}/{collection}/{cid}

POST

none

Adds the new Json object to the collection property of the business object. Collection item specified by id should exist (cid is Oid of the collection item).

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F/FirmContacts?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

<base>/bo/{id}/{collection}/{cid}

DELETE

none

Removes the specified item from the collection property of the business object. (cid is the Oid of the collection item)

Example:

http://localhost:53417/api/v1.0/firms/2F950D99-0E14-4ED0-A21C-079D51E28B6F/FirmContacts/ F798B922-13A6-4B9C-A7FF-C9A4EF109490


Specific Methods

Verb

Method

Request

Description

<base>/unitsForProduct/{productOid}

GET

none

Gets the units that are available for a product.

Example:

http://localhost:53417/api/v1.0/unitsForProduct/523183FB-AB35-4543-B82F-0046597D1381?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

<base>/search

GET

none

Searches all pre-designated business objects for a pattern or keyword. All Extra Search Settings are implemented.

Example:

http://localhost:53417/api/v1.0/search?searchKeyword=izmir?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns a json structure according to the following classes:

public class LogoCRM_SearchKeywordItem

    {

        public string BOClassName { get; set; }

        public string BOOid { get; set; }

        public string Description { get; set; }

        public string SubDescription { get; set; }

        public int ExtraIntegerField { get; set; }

        public string ExtraStringField { get; set; }

    }


    public class LogoCRM_SearchKeywordResult

    {

        public Meta Meta { get; set; }

        public Int16 Result { get; set; }

        public string Message { get; set; }

        public int? Count { get; set; }

        public List<LogoCRM_SearchKeywordItem> Items { get; set; }

    }

<base>/userSummary

GET

none

Returns user summary items for the logged in user, a summary of customized or default items, as seen on the start screen of LogoCRM. Unfinished tasks, today's events, etc.

Example:

http://localhost:53417/api/v1.0/userSummary?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns a json according to the following classes:

public class LogoCRM_UserSummaryItem

    {

        public string BOClassName { get; set; }

        public string ItemCaption { get; set; }

        public string ItemCriteria { get; set; }

        public int Count { get; set; }

    }


    public class LogoCRM_UserSummaryResult

    {

        public Meta Meta { get; set; }

        public Int16 Result { get; set; }

        public string Message { get; set; }

        public int? NewShares { get; set; }

        public string NewSharesFilter { get; set; }

        public int? Notifications { get; set; }

        public string NotificationsFilter { get; set; }

        public int? UnfinishedTasks { get; set; }

        public string UnfinishedTasksFilter { get; set; }

        public int? ProposalsWaitingForApproval { get; set; }

        public string ProposalsWaitingForApprovalFilter { get; set; }

        public int? ProposalsWaitingForAction { get; set; }       

        public string ProposalsWaitingForActionFilter { get; set; }

        public List<LogoCRM_UserSummaryItem> SummaryItems { get; set; }

    }

SummaryItems is a list of customized items for a specific customer/installation.

<base>/proposals/sendForApproval/{id}/{userOid}

GET

none

Sends a proposal to the selected user, for approval.

{id} is the Oid for the proposal (MT_Proposals).

{userOid} is the Oid for the user (ST_User).

Example:

http://localhost:53417/api/v1.0/proposals/sendForApproval/ 920EF823-50D5-4245-8879-243A824D8B68/ 2A826941-DFE9-4033-80F0-3516804E2960?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/approve/{id}/{userOid}

GET

none

Approves a proposal, which is sent to the user.

{id} is the Oid for the proposal (MT_Proposals).

{userOid} is the Oid for the user (ST_User).

Example:

http://localhost:53417/api/v1.0/proposals/approve/ 920EF823-50D5-4245-8879-243A824D8B68/ 2A826941-DFE9-4033-80F0-3516804E2960?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/deny/{id}/{userOid}

GET

none

Denies a proposal, which is sent to the user for approval.

{id} is the Oid for the proposal (MT_Proposals).

{userOid} is the Oid for the user (ST_User).

Example:

http://localhost:53417/api/v1.0/proposals/approve/ 920EF823-50D5-4245-8879-243A824D8B68/ 2A826941-DFE9-4033-80F0-3516804E2960?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/changeState/{id}/{userOid}/{newState}

GET

none

Changes the state of a proposal.

{id} is the Oid for the proposal (MT_Proposals).

{userOid} is the Oid for the user (ST_User).

{newState} can be one of the following:

public enum ENUM_ProposalStates

    {

        Ongoing = 0,

        Sale = 1,

        SaleCancelled = 2,

        CustomerCancelled = 3,

        Negative = 4

    }

Example:

http://localhost:53417/api/v1.0/proposals/changeState/ 920EF823-50D5-4245-8879-243A824D8B68/ 2A826941-DFE9-4033-80F0-3516804E2960/4?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/newRevisal/{id}

GET

none

Prepares a new revisal for the selected proposal.

{id} is the Oid of the proposal.

Example:

http://localhost:53417/api/v1.0/proposals/newRevisal/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/saveRevisal/{id}

PUT

Revisal JSON

Saves the prepared revisal for the selected proposal.

{id} is the Oid of the proposal.

Revisal JSON must be in the body of the request.

Example:

http://localhost:53417/api/v1.0/proposals/saveRevisal/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/addProduct/{id}/{productOid}

PUT

none

Adds the new product line to the proposal

{id} is the Oid of the proposal.

{productOid} is the Oid of the product (MT_Product).

Example:

http://localhost:53417/api/v1.0/proposals/addProduct/ 920EF823-50D5-4245-8879-243A824D8B68/ 45504F08-0EAB-4FFA-95B2-3D4EEBAFA64D?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.



<base>/proposals/updateProduct/{id}

PUT

Product JSON

Updates a product line in a proposal.

{id} is the Oid of the proposal.

MT_Proposals_Product JSON must be in the request body. Every product line in a proposal must have a unique Oid.

Example:

http://localhost:53417/api/v1.0/proposals/updateProduct/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/removeProduct/{id}/{Oid}

DELETE

none

Removes the product line from the proposal.

{id} is the Oid of the proposal.

{Oid} is the Oid of the product line (MT_Proposals_Product).

Example:

http://localhost:53417/api/v1.0/proposals/removeProduct/ 920EF823-50D5-4245-8879-243A824D8B68/ 45504F08-0EAB-4FFA-95B2-3D4EEBAFA64D?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/proposals/prepare/{id}/{reportOid}

GET

none

Prepares a PDF,RTF,HTML,MHT,XLS,XLSX for a specified proposal.

{id} is the Oid of the proposal.

{reportOid} is the Oid of the selected report (ST_Reports).

Example:

http://localhost:53417/api/v1.0/proposals/prepare/ 920EF823-50D5-4245-8879-243A824D8B68/7A83B117-BEFE-4AF8-8A82-CBA55C3BBF9B?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.

<base>/proposals/savePrepare/{id}

PUT

Report Json

Saves the prepared form for a proposal.

{id} is the Oid of the proposal.

Prepared form object must be in the request body according to the class:

public Guid Oid { get; set; }

public rMT_Proposals RelatedProposal { get; set; }

public string RevisalId { get; set; }

public ENUM_ProposalApprovalState ApprovalState { get; set; }

public string FormName { get; set; }

public string PrepareFormBase64 { get; set; }

public string Notes { get; set; }

public string DisplayName { get; set; }

public string FormFileName { get; set; }

public ENUM_PreparedFormTypes DocumentType { get; set; }

public Guid SelectedReport { get; set; }

public enum ENUM_ProposalApprovalState

    {

        NotInApprovalProcess = 0,

        WaitingForApproval = 1,

        PartiallyApproved = 2,

        Approved = 3,

        Denied = 4

    }

public enum ENUM_PreparedFormTypes

    {

        PDF = 0,

        HTML = 1,

        MHT = 2,

        XLS = 3,

        XLSX = 4,

        RTF = 5

    }

Example:

http://localhost:53417/api/v1.0/proposals/savePrepare/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.

<base>/tickets/addProduct/{id}/{productOid}

PUT

none

Adds the new product line to the support ticket

{id} is the Oid of the support ticket.

{productOid} is the Oid of the product (MT_Product).

Example:

http://localhost:53417/api/v1.0/tickets/addProduct/ 920EF823-50D5-4245-8879-243A824D8B68/ 45504F08-0EAB-4FFA-95B2-3D4EEBAFA64D?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.



<base>/tickets/updateProduct/{id}

PUT

Product JSON

Updates a product line in a support ticket.

{id} is the Oid of the support ticket.

RI_Ticket_Product JSON must be in the request body. Every product line in a proposal must have a unique Oid.

public class RI_Ticket_Product

    {

    public Guid Oid { get; set; }

    public MT_Product RelatedProduct { get; set; }

    public double Amount { get; set; }

    public string NotesAndDescription { get; set; }

    public MT_Ticket Ticket { get; set; }

    }

// RelatedProduct may only contain the Oid

// Ticket may only contain the Oid



Example:

http://localhost:53417/api/v1.0/tickets/updateProduct/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/tickets/removeProduct/{id}/{Oid}

DELETE

none

Removes the product line from the support ticket.

{id} is the Oid of the proposal.

{Oid} is the Oid of the product line (RI_Ticket_Product).

Example:

http://localhost:53417/api/v1.0/tickets/removeProduct/ 920EF823-50D5-4245-8879-243A824D8B68/ 45504F08-0EAB-4FFA-95B2-3D4EEBAFA64D?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.


<base>/tickets/prepare/{id}/{reportOid}

GET

none

Prepares a PDF,RTF,HTML,MHT,XLS,XLSX for a specified support ticket.

{id} is the Oid of the support ticket.

{reportOid} is the Oid of the selected report (ST_Reports).

Example:

http://localhost:53417/api/v1.0/tickets/prepare/ 920EF823-50D5-4245-8879-243A824D8B68/7A83B117-BEFE-4AF8-8A82-CBA55C3BBF9B?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.

<base>/tickets/savePrepare/{id}

PUT

Report Json

Saves the prepared form for a support ticket.

{id} is the Oid of the support ticket.

Prepared form object must be in the request body according to the class:

public class MT_Ticket_Prepared_Forms

    {

        public Guid Oid { get; set; }

        public MT_Ticket RelatedTicket { get; set; }

        public string FormName { get; set; }

        public string PrepareFormBase64 { get; set; }

        public string Notes { get; set; }

        public string DisplayName { get; set; }

        public string FormFileName { get; set; }

        public ENUM_PreparedFormTypes DocumentType { get; set; }

        public Guid SelectedReport { get;

    }

// RelatedTicket (MT_Ticket) may only contain the Oid

public enum ENUM_PreparedFormTypes

    {

        PDF = 0,

        HTML = 1,

        MHT = 2,

        XLS = 3,

        XLSX = 4,

        RTF = 5

    }

Example:

http://localhost:53417/api/v1.0/tickets/savePrepare/ 920EF823-50D5-4245-8879-243A824D8B68?SessionId=369a98e2-385f-4ee6-aadb-7fb828892abd

Returns an OperationResult.

Business Objects (Main classes, MT_ Prefix)

Image

Verb

ClassName (DB TableName)

Notes

Collection

Collection Verb

firms

MT_Firm

Firmalar

Contacts

Events

Activities

Documents

Notes

Opportunities

Proposals

Related products

Action lists

Tickets

Action list types

Sectors

Addresses

Phone numbers

FirmContacts

EventOid

FirmActivities

DocumentOid

NotesOid

FirmOpportunities

FirmProposals

RelatedProductsOid

FirmActionLists

TicketsOid

ListTypes

SectorOid

AddressOid

PhoneNumberOid

Products

(items)

MT_Product

Ürünler

Documents

Related firms

Activities

Opportunities

Tickets

Prices

Units sets

DocumentOid

RelatedFirmsOid

RelatedActivityOid

RelatedOpportunityOid

RelatedTicketOid

ProductPriceOid

UnitCollectionOid


events

MT_Event

Takvim

Activities

Firms

Contacts

Documents

Opportunities

Users

ActivityOid

FirmOid

ContactOid

DocumentOid

OpportunityOid

Resources


activities

MT_Activity

Aktiviteler

Documents

Sales representatives

Opportunities

Related products

Related proposals

Events

DocumentOid

SalesRepOid

OpportunityOid

RelatedProductsOid

RelatedProposalsOid

EventOid


actionLists

MT_Action_Lists

İşlem

listeleri

Firms

Contacts

FirmOid

ContactsOid


campaigns

MT_Campaign

Kampanyalar

Action list types

Events

ListTypes

CampaignEvents


campaignLists

MT_Campaign_Lists

Kampanya listeleri


contacts

MT_Contact

Kişiler

Events

Activities

Documents

Notes

Opportunities

Proposals

Action lists

Tickets

Action list types

Addresses

Phone numbers

EventOid

ContactActivities

DocumentOid

NotesOid

ContactOpportunities

ContactProposals

ContactActionLists

TicketsOid

ListTypes

AddressOid

PhoneOid


notes

MT_Notes

Notlar

Users

User departments

Firms

Contacts

UserOid

DepartmentOid

FirmOid

ContactOid


notifications

MT_Notifications

Bildirimler


opportunities

MT_Opportunity

Fırsatlar

Documents

Activities

Events

Tasks

Related products

Related proposals

DocumentOid

ActivityOid

EventOid

TaskOid

RelatedProductsOid

RelatedProposalsOid


productPrices

MT_Product_Prices

Ürün fiyatları


proposals

MT_Proposals

Teklifler

Revisals

History

Activities

Prepared forms

Approvals

Documents

ERP objects

Products

ProposalRevisals

ProposalHistory

RelatedActivityOid

PreparedFormsOid

ProposalApprovals

DocumentOid

ERPObjects

ProposalsProductsOid


proposalRevisals

MT_Proposals_Revisals

Teklif revizeleri

Products

RevisalProductsOid


proposalHistory

MT_Proposals_History

Teklif tarihçesi


proposalForms

MT_Proposals_

Prepared_Forms

Teklif hazırlanan formlar


proposalProducts

MT_Proposals_Products

Teklif içindeki ürünler


proposalApprovals

MT_Proposals_Approvals

Teklif onayları


shares

MT_Shares

Paylaşımlar


tickets

MT_Ticket

Destek kayıtları

Ticket states

Assignments

Prepared forms

Proposals

Products

Documents

TicketStates

TicketAssignments

PreparedFormsOid

RelatedProposalsOid

RelatedProductsOid

DocumentOid


ticketForms

MT_Ticket_Prepared_Forms

Destek kayıtları hazırlanan formlar


tasks

MT_Task

Görevler

Documents

Opportunities

Users

DocumentOid

OpportunityOid

UserOid


Business Objects (Code classes, CT_ Prefix)

Image

Verb

ClassName (DB TableName)

Notes

Collection

Collection Verb

activityCategories

CT_Activity_Category

Aktivite kategorileri

activityStates

CT_Activity_States

Aktivite durumları

activityTypes

CT_Activity_Types

Aktivite türleri

campaignCostTypes

CT_Campaign_Cost_Types

Kampanya masraf türleri


campaignTypes

CT_Campaign_Types

Kampanya türleri


contactRoles

CT_Contact_Roles

Kişi rolleri


contractStates

CT_Contract_States

Sözleşme durumları


contractTypes

CT_Contract_Types

Sözleşme türleri


currencyTypes

CT_Currency_Types

Döviz türleri


firmRoles

CT_Firm_Roles

Firma rolleri


incoterm

CT_Incoterm

Incoterm


jobTitles

CT_Job_Titles

İş pozisyon/görevleri


listTypes

CT_List_Types

İşlem listesi türleri


opportunitySources

CT_Opportunity_Sources

Fırsat kaynakları


opportunityStages

CT_Opportunity_Stages

Fırsat aşamaları


opportunityStagesCriteria

CT_Opportunity_Stages_Criteria

Fırsat aşama kriterleri

Criteria collection

CriterionOid


opportunityTypes

CT_Opportunity_Types

Fırsat türleri


priceTypes

CT_Price_Types

Ürün fiyat türleri


productGroups

CT_Product_Groups

Ürün grupları


proposalApprovalRules

CT_Proposal_Approval_Rules

Teklif onay tanımları


proposalStages

CT_Proposal_Stages

Teklif aşamaları

Criteria collection

CriterionOid


proposalStagesCriteria

CT_Proposal_Stages_Criteria

Teklif otomatik aşama kriterleri

Related stages

ProposalStageOid


referenceSources

CT_Reference_Sources

Referans kaynakları (fırsatlar)


roles

CT_Role

Roller

Users

UserOid


salesAreas

CT_Sales_Area

Satış bölgeleri


salesReps

(salesmen)

CT_Sales_Rep

Satış temsilcileri


sectors

CT_Sectors

Sektörler


subSectors

CT_Sub_Sectors

Alt sektörler


ticketMainCategories

CT_Ticket_Main_Category

Destek kaydı ana kategoriler


ticketStates

CT_Ticket_States

Destek kaydı durum tanımları


ticketSubCategories

CT_Ticket_Sub_Category

Destek kaydı alt kategoriler


ticketTypes

CT_Ticket_Types

Destek kaydı türleri


units

CT_Units

Birimler

Unit collection references

RIUnitsRef


unitCollections

(unitSets)

CT_Units_Collections

Birim setleri

Unit references

RIUnitsRef


userDepartments

CT_User_Departments

Kullanıcı departmanları

Notes

Users

NotesOid

UserOid

Business Objects (Generic classes, GK_ Prefix)

Image

Verb

ClassName (DB TableName)

Notes

Collection

Collection Verb

firmCategories01

GK_Firm_Category01

Generic firma kategori tanımları-1


firmCategories02

GK_Firm_Category02

Generic firma kategori tanımları-2


firmCategories03

GK_Firm_Category03

Generic firma kategori tanımları-3


firmCategories04

GK_Firm_Category04

Generic firma kategori tanımları-4


firmCategories05

GK_Firm_Category05

Generic firma kategori tanımları-5

productCategories01

GK_Product_Category01

Generic ürün kategori tanımları-1


productCategories02

GK_Product_Category02

Generic ürün kategori tanımları-2


productCategories03

GK_Product_Category03

Generic ürün kategori tanımları-3


productCategories04

GK_Product_Category04

Generic ürün kategori tanımları-4


productCategories05

GK_Product_Category05

Generic ürün kategori tanımları-5

Business Objects (Intermediate relations, RI_ Prefix)

Image

Verb

ClassName (DB TableName)

Notes

Collection

Collection Verb

relationProduct_UnitCollection

RI_Product_Units_Collections_Properties

Ürün-Birim setleri N-N bağlantı ilişki tablosu

relationUnit_UnitCollection

RI_Units_Collections_Properties

Birim-Birim setleri N-N bağlantı ilişki tablosu

Business Objects (Primitive objects, PO_ Prefix)

Image

Verb

ClassName (DB TableName)

Notes

Collection

Collection Verb

addresses

PO_Address

Adresler

ERP sevkiyat adresleri

ERPShipmentAddresses


shipmentLocations






addressTypes

PO_Address_Type

Adres türleri


cities

PO_Cİty

Şehirler


countries

PO_Country

Ülkeler


counties

PO_County

İlçeler


districts

PO_District

Semtler


parishes

PO_Parish

Mahalleler


persons

PO_Person

Kişi bilgileri


phoneNumbers

PO_Phone_Number

Telefon numaraları


preparedForms

PO_Prepared_Form

Hazrıalanan formlar (Teklif, destek kayıtları, vb)


socialMedia

PO_Social_Media

Sosyal medya linkleri (Firmalar, kişiler, vb)

Business Objects (Supporting tables, ST_ Prefix)

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:

 

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:

 

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:

 

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:

http://yourserver/LogoCRMRest/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&filters=InUse=1|0

 

Like

&filters=ColumnName[LIKE]=value,ColumnName[LIKE]=%value%

 

Example:

http://yourserver/LogoCRMRest/api/v1.0/firms?sessionId=02635e09-03c9-4fb0-af8f-e60cbd749513&filters=FirmCode[LIKE]=TURK

 

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