{"id":20904704,"url":"https://github.com/sage/sage_crm_rest_api_client","last_synced_at":"2025-05-13T05:30:47.235Z","repository":{"id":137384077,"uuid":"280208955","full_name":"Sage/sage_crm_rest_api_client","owner":"Sage","description":null,"archived":true,"fork":false,"pushed_at":"2020-07-27T10:05:59.000Z","size":44,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-12T21:28:10.619Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-16T16:54:24.000Z","updated_at":"2024-05-29T16:23:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"a32bb07b-d9d4-4304-924e-16f4da375e6b","html_url":"https://github.com/Sage/sage_crm_rest_api_client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsage_crm_rest_api_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsage_crm_rest_api_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsage_crm_rest_api_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsage_crm_rest_api_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sage","download_url":"https://codeload.github.com/Sage/sage_crm_rest_api_client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253882708,"owners_count":21978540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T13:18:33.799Z","updated_at":"2025-05-13T05:30:47.226Z","avatar_url":"https://github.com/Sage.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sage CRM Rest Client Sample project\nThis project is to help with the Sage CRM REST API usage. This is just some examples and a client that uses the code in a console application that you can use to test\n\nFor references please see [REST API References](https://help.sagecrm.com/2020-r1/RestApiReference/).\n\n## Usage\n\nUsings that are required:\n- using Sage.CRM.Rest.Api.Interface;\n- using Sage.CRM.Rest.Api.Models;\n\nThe Models are only required if you are not going to use generics and use the Models from the project rather.\n\n## Creating the client usage\n```\nSageCRMRestClient client = new SageCRMBuilder()\n                               .SetBaseUrl(\"{http or https}://{server}/sdata/{crm}j/sagecrm2/-/\") //this is your base URL in string format\n                               .SetLoginCredentials(\"admin\", \"\") //login id and password in clear text\n                               .Build(); //returns an instance of the SageCRMImplementation class\n\n```\n## Special Methods\nList of the methods on the Interface that will be available.\n\n**GetAllEntities()**\nThis returns a list of all entities exposed to web services.\nIteration can be done on *EntityList* property.  This will return EntityName and EntityID with a Dictionary object containing \u003cstring,Field\u003e\n\n**GetEntityFields()**\nThis is similar to the GetAllEntities, but should only be used to get field names for an entity specified. \n\n- Get =\u003e Get\n- Add =\u003e Post\n- Edit =\u003e Put\n- Delete =\u003e Delete\n\n## Using Methods\n- var proto = await client.GetAllEntities();\n- var entities = await client.GetEntityFields(\"address\");\n- var resultPayload = await client.Get(\"company\");\n- var resultPayload2 = await client.Get(\"company\", 1222);\n- var result = await client.Add({company object}, \"company\");\n- await client.Edit(1231, put, \"company\");\n- await client.Delete\u003cCompany\u003e(1231);\n  \n## Important note\nWhen using custom classes (for generics) like in the example of local models, if the class does not have the correct $key field or other required fields, the return type cannot be matched correctly and will not return the key/entity id in the return payload. This can be avoided by setting up the POCO's correctly with the matching json tags. If no key/id is returned, then you will have a hard time getting the added entity record back\n\n## More to come\n- A blogpost on [Sage City](https://www.sagecity.com/) will be released shortly and a link will be added here to explain the usage in more detail\n- Link to a presentation video will be added when done\n- logging in or sending commands using the SID will be added\n- More fail-safes will be added for code errors/usage, like incorrect URL's\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsage_crm_rest_api_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsage%2Fsage_crm_rest_api_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsage_crm_rest_api_client/lists"}