Last active
July 17, 2024 13:09
-
-
Save sts-developer/bb3c122b94ee2866d9298f533cc6d167 to your computer and use it in GitHub Desktop.
Business Create C# Logics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var client = new HttpClient(); | |
| var request = new HttpRequestMessage(HttpMethod.Post, "https://testapi.taxbandits.com/v1.7.3/Business/Create"); | |
| request.Headers.Add("Authorization", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3Rlc3RvYXV0aC5leHByZXNzYXV0aC5uZXQvdjIvIiwic3ViIjoiYTQyMWE2MWUzOWUyY2U3ZSIsImF1ZCI6ImVjMTQ1MjFiMzE0ZjQ3ZGE5Nzk4MzNiNWVmOTE0NTllIiwiaWF0IjoxNzIwMDA4NDc5LCJleHAiOjE3MjAwMTIwNzl9.NgZH5WfzyF4U8ytF_hLMmLmDOAi1xuWdXG2L7x2Rqw4"); | |
| var content = new StringContent("{\r\n \"BusinessNm\": \"Snowdaze LLC\",\r\n \"FirstNm\": null,\r\n \"MiddleNm\": null,\r\n \"LastNm\": null,\r\n \"Suffix\": null,\r\n \"PayerRef\": \"Pe1261456\",\r\n \"TradeNm\": \"Kodak\",\r\n \"IsEIN\": true,\r\n \"EINorSSN\": \"003313335\",\r\n \"Email\": \"john@sample.com\",\r\n \"ContactNm\": \"John\",\r\n \"Phone\": \"9876543980\",\r\n \"PhoneExtn\": \"1234\",\r\n \"Fax\": \"1234567890\",\r\n \"BusinessType\": \"ESTE\",\r\n \"SigningAuthority\": {\r\n \"Name\": \"John\",\r\n \"Phone\": \"1234567890\",\r\n \"BusinessMemberType\": \"ADMINISTRATOR\"\r\n },\r\n \"KindOfEmployer\": \"FEDERALGOVT\",\r\n \"KindOfPayer\": \"REGULAR941\",\r\n \"IsBusinessTerminated\": false,\r\n \"IsForeign\": true,\r\n \"USAddress\": {\r\n \"Address1\": null,\r\n \"Address2\": null,\r\n \"City\": null,\r\n \"State\": null,\r\n \"ZipCd\": null\r\n },\r\n \"ForeignAddress\": {\r\n \"Address1\": \"22 St\",\r\n \"Address2\": \"Clair Ave E\",\r\n \"City\": \"Toronto\",\r\n \"ProvinceOrStateNm\": \"Ontario\",\r\n \"Country\": \"CA\",\r\n \"PostalCd\": \"M1R 0E9\"\r\n }\r\n}", null, "application/json"); | |
| request.Content = content; | |
| var response = await client.SendAsync(request); | |
| Console.WriteLine(await response.Content.ReadAsStringAsync()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment