Please refer below guide for your .net application to call Salesforce using standard out of the box API: https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/SF_Rest_API_cheatsheet_web.pdf
If you need to implement custom REST API, you can follow the below logic: https://yoursalesforceguide.blogspot.com/2016/12/exposing-apex-functionality-through.html https://yoursalesforceguide.blogspot.com/2016/12/calling-external-rest-service-from.html
https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/SF_Rest_API_cheatsheet_web.pdf
If you need to implement custom REST API, you can follow the below logic:
https://yoursalesforceguide.blogspot.com/2016/12/exposing-apex-functionality-through.html
https://yoursalesforceguide.blogspot.com/2016/12/calling-external-rest-service-from.html
1) https://instance.com/services/data/v40.0/sobjects/order/listviews - Get the listviews and I will get below response
{
"done": true,
"listviews": [
{
"describeUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXrMUAU/describe",
"developerName": "AllOrders",
"id": "00B7F000003hXrMUAU",
"label": "All Orders",
"resultsUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXrMUAU/results",
"soqlCompatible": true,
"url": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXrMUAU"
},
{
"describeUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs8UAE/describe",
"developerName": "AllDraftOrders",
"id": "00B7F000003hXs8UAE",
"label": "All Draft Orders",
"resultsUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs8UAE/results",
"soqlCompatible": true,
"url": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs8UAE"
},
{
"describeUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs9UAE/describe",
"developerName": "AllActivatedOrders",
"id": "00B7F000003hXs9UAE",
"label": "All Activated Orders",
"resultsUrl": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs9UAE/results",
"soqlCompatible": true,
"url": "/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs9UAE"
}
],
"nextRecordsUrl": null,
"size": 3,
"sobjectType": "Order"
}
2) Then based on developerName say "AllActivatedOrders" I have to get the listview id say "00B7F000003hXs9UAE" as shown above and use
/services/data/v40.0/sobjects/Order/listviews/00B7F000003hXs9UAE/results url. After executing this url, I will get below response (its not full but meaningful to understand)
"developerName": "AllActivatedOrders",
"done": true,
"id": "00B7F000003hXs9",
"label": "All Activated Orders",
"records": [
{
"columns": [
{
"fieldNameOrPath": "OrderNumber",
"value": "00000100"
},
{
"fieldNameOrPath": "Account.Name",
"value": "Account1"
},
{
"fieldNameOrPath": "TotalAmount",
"value": "200000.0"
},
{
"fieldNameOrPath": "EffectiveDate",
"value": "Mon Jul 24 00:00:00 GMT 2017"
},
{
"fieldNameOrPath": "Status",
"value": "Activated"
},
{
"fieldNameOrPath": "Contract.ContractNumber",
"value": null
},
{
"fieldNameOrPath": "Id",
"value": "8017F000000L41TQAS"
},
{
"fieldNameOrPath": "CreatedDate",
"value": "Mon Jul 24 14:25:54 GMT 2017"
},
{
"fieldNameOrPath": "LastModifiedDate",
"value": "Mon Jul 24 15:08:30 GMT 2017"
},
{
"fieldNameOrPath": "SystemModstamp",
"value": "Mon Jul 24 15:08:30 GMT 2017"
},
{
"fieldNameOrPath": "Account.Id",
"value": "0017F000007gi1BQAQ"
},
{
"fieldNameOrPath": "AccountId",
"value": "0017F000007gi1BQAQ"
},
{
"fieldNameOrPath": "Contract.Id",
"value": null
},
{
"fieldNameOrPath": "ContractId",
"value": null
}
]
},
{
"columns": [
{
"fieldNameOrPath": "OrderNumber",
"value": "00000101"
},
{
"fieldNameOrPath": "Account.Name",
"value": "Account1"
},
{
"fieldNameOrPath": "TotalAmount",
"value": "200000.0"
},
{
"fieldNameOrPath": "EffectiveDate",
"value": "Tue Jul 25 00:00:00 GMT 2017"
},
{
"fieldNameOrPath": "Status",
"value": "Activated"
},
{
"fieldNameOrPath": "Contract.ContractNumber",
"value": null
},
{
"fieldNameOrPath": "Id",
"value": "8017F000000L41YQAS"
},
{
"fieldNameOrPath": "CreatedDate",
"value": "Mon Jul 24 14:29:58 GMT 2017"
},
{
"fieldNameOrPath": "LastModifiedDate",
"value": "Mon Jul 24 14:30:21 GMT 2017"
},
{
"fieldNameOrPath": "SystemModstamp",
"value": "Mon Jul 24 14:30:21 GMT 2017"
},
{
"fieldNameOrPath": "Account.Id",
"value": "0017F000007gi1BQAQ"
},
{
"fieldNameOrPath": "AccountId",
"value": "0017F000007gi1BQAQ"
},
{
"fieldNameOrPath": "Contract.Id",
"value": null
},
{
"fieldNameOrPath": "ContractId",
"value": null
}
]
}
],
"size": 2
So from this response I will have to identify all the orders.
Correct me if am wrong.
Or is there any other url to get all the orders directly using REST API. Please let me know.