Chilkat Online Tools

SQL Server / Salesforce Platform APIs / Query

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    DECLARE @queryParams int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @queryParams OUT

    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'q', 'SELECT FIELDS(All) FROM ACCOUNT ORDER BY Name LIMIT 5'

    -- Adds the "Authorization: Bearer <access_token>" header.
    EXEC sp_OASetProperty @http, 'AuthToken', '<access_token>'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://domain.com/services/data/v{{version}}/query/', @queryParams
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        RETURN
      END

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @queryParams
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "totalSize": 5,
    --   "done": true,
    --   "records": [
    --     {
    --       "attributes": {
    --         "type": "Account",
    --         "url": "/services/data/v58.0/sobjects/Account/001B000000UnQ2wIAF"
    --       },
    --       "Id": "001B000000UnQ2wIAF",
    --       "IsDeleted": false,
    --       "MasterRecordId": null,
    --       "Name": "Burlington Textiles Corp of America",
    --       "Type": "Customer - Direct",
    --       "ParentId": null,
    --       "BillingStreet": "525 S. Lexington Ave",
    --       "BillingCity": "Burlington",
    --       "BillingState": "NC",
    --       "BillingPostalCode": "27215",
    --       "BillingCountry": "USA",
    --       "BillingLatitude": null,
    --       "BillingLongitude": null,
    --       "BillingGeocodeAccuracy": null,
    --       "BillingAddress": {
    --         "city": "Burlington",
    --         "country": "USA",
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": "27215",
    --         "state": "NC",
    --         "street": "525 S. Lexington Ave"
    --       },
    --       "ShippingStreet": null,
    --       "ShippingCity": null,
    --       "ShippingState": null,
    --       "ShippingPostalCode": null,
    --       "ShippingCountry": null,
    --       "ShippingLatitude": null,
    --       "ShippingLongitude": null,
    --       "ShippingGeocodeAccuracy": null,
    --       "ShippingAddress": null,
    --       "Phone": "(336) 222-7000",
    --       "Fax": "(336) 222-8000",
    --       "AccountNumber": "CD656092",
    --       "Website": "www.burlington.com",
    --       "PhotoUrl": "/services/images/photo/001B000000UnQ2wIAF",
    --       "Sic": "546732",
    --       "Industry": "Apparel",
    --       "AnnualRevenue": 350000000,
    --       "NumberOfEmployees": 9000,
    --       "Ownership": "Public",
    --       "TickerSymbol": "BTXT",
    --       "Description": null,
    --       "Rating": "Warm",
    --       "Site": null,
    --       "OwnerId": "005B0000003TOI6IAO",
    --       "CreatedDate": "2017-08-18T14:46:22.000+0000",
    --       "CreatedById": "005B0000003TOI6IAO",
    --       "LastModifiedDate": "2017-08-18T14:46:22.000+0000",
    --       "LastModifiedById": "005B0000003TOI6IAO",
    --       "SystemModstamp": "2017-08-18T14:46:22.000+0000",
    --       "LastActivityDate": null,
    --       "LastViewedDate": null,
    --       "LastReferencedDate": null,
    --       "IsPartner": false,
    --       "IsCustomerPortal": false,
    --       "ChannelProgramName": null,
    --       "ChannelProgramLevelName": null,
    --       "Jigsaw": null,
    --       "JigsawCompanyId": null,
    --       "CleanStatus": "Pending",
    --       "AccountSource": null,
    --       "DunsNumber": null,
    --       "Tradestyle": null,
    --       "NaicsCode": null,
    --       "NaicsDesc": null,
    --       "YearStarted": null,
    --       "SicDesc": null,
    --       "DandbCompanyId": null,
    --       "CustomerPriority__c": null,
    --       "SLA__c": "Silver",
    --       "Active__c": null,
    --       "NumberofLocations__c": 6,
    --       "UpsellOpportunity__c": "Maybe",
    --       "SLASerialNumber__c": "5367",
    --       "SLAExpirationDate__c": "2016-09-12"
    --     },
    --     {
    --       "attributes": {
    --         "type": "Account",
    --         "url": "/services/data/v58.0/sobjects/Account/001B000000UnQ2yIAF"
    --       },
    --       "Id": "001B000000UnQ2yIAF",
    --       "IsDeleted": false,
    --       "MasterRecordId": null,
    --       "Name": "Dickenson plc",
    --       "Type": "Customer - Channel",
    --       "ParentId": null,
    --       "BillingStreet": "1301 Hoch Drive",
    --       "BillingCity": "Lawrence",
    --       "BillingState": "KS",
    --       "BillingPostalCode": "66045",
    --       "BillingCountry": "USA",
    --       "BillingLatitude": null,
    --       "BillingLongitude": null,
    --       "BillingGeocodeAccuracy": null,
    --       "BillingAddress": {
    --         "city": "Lawrence",
    --         "country": "USA",
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": "66045",
    --         "state": "KS",
    --         "street": "1301 Hoch Drive"
    --       },
    --       "ShippingStreet": "1301 Hoch Drive",
    --       "ShippingCity": "Lawrence",
    --       "ShippingState": "KS",
    --       "ShippingPostalCode": "66045",
    --       "ShippingCountry": "USA",
    --       "ShippingLatitude": null,
    --       "ShippingLongitude": null,
    --       "ShippingGeocodeAccuracy": null,
    --       "ShippingAddress": {
    --         "city": "Lawrence",
    --         "country": "USA",
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": "66045",
    --         "state": "KS",
    --         "street": "1301 Hoch Drive"
    --       },
    --       "Phone": "(785) 241-6200",
    --       "Fax": "(785) 241-6201",
    --       "AccountNumber": "CC634267",
    --       "Website": "dickenson-consulting.com",
    --       "PhotoUrl": "/services/images/photo/001B000000UnQ2yIAF",
    --       "Sic": "6752",
    --       "Industry": "Consulting",
    --       "AnnualRevenue": 50000000,
    --       "NumberOfEmployees": 120,
    --       "Ownership": "Private",
    --       "TickerSymbol": null,
    --       "Description": null,
    --       "Rating": null,
    --       "Site": null,
    --       "OwnerId": "005B0000003TOI6IAO",
    --       "CreatedDate": "2017-08-18T14:46:22.000+0000",
    --       "CreatedById": "005B0000003TOI6IAO",
    --       "LastModifiedDate": "2017-08-18T14:46:22.000+0000",
    --       "LastModifiedById": "005B0000003TOI6IAO",
    --       "SystemModstamp": "2017-08-18T14:46:22.000+0000",
    --       "LastActivityDate": null,
    --       "LastViewedDate": null,
    --       "LastReferencedDate": null,
    --       "IsPartner": false,
    --       "IsCustomerPortal": false,
    --       "ChannelProgramName": null,
    --       "ChannelProgramLevelName": null,
    --       "Jigsaw": null,
    --       "JigsawCompanyId": null,
    --       "CleanStatus": "Pending",
    --       "AccountSource": null,
    --       "DunsNumber": null,
    --       "Tradestyle": null,
    --       "NaicsCode": null,
    --       "NaicsDesc": null,
    --       "YearStarted": null,
    --       "SicDesc": null,
    --       "DandbCompanyId": null,
    --       "CustomerPriority__c": "Low",
    --       "SLA__c": "Bronze",
    --       "Active__c": "Yes",
    --       "NumberofLocations__c": 2,
    --       "UpsellOpportunity__c": "No",
    --       "SLASerialNumber__c": "7425",
    --       "SLAExpirationDate__c": "2017-03-15"
    --     },
    --     {
    --       "attributes": {
    --         "type": "Account",
    --         "url": "/services/data/v58.0/sobjects/Account/001B000000UnQ2vIAF"
    --       },
    --       "Id": "001B000000UnQ2vIAF",
    --       "IsDeleted": false,
    --       "MasterRecordId": null,
    --       "Name": "Edge Communications",
    --       "Type": "Customer - Direct",
    --       "ParentId": null,
    --       "BillingStreet": "312 Constitution Place\nAustin, TX 78767\nUSA",
    --       "BillingCity": "Austin",
    --       "BillingState": "TX",
    --       "BillingPostalCode": null,
    --       "BillingCountry": null,
    --       "BillingLatitude": null,
    --       "BillingLongitude": null,
    --       "BillingGeocodeAccuracy": null,
    --       "BillingAddress": {
    --         "city": "Austin",
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": "TX",
    --         "street": "312 Constitution Place\nAustin, TX 78767\nUSA"
    --       },
    --       "ShippingStreet": "312 Constitution Place\nAustin, TX 78767\nUSA",
    --       "ShippingCity": null,
    --       "ShippingState": null,
    --       "ShippingPostalCode": null,
    --       "ShippingCountry": null,
    --       "ShippingLatitude": null,
    --       "ShippingLongitude": null,
    --       "ShippingGeocodeAccuracy": null,
    --       "ShippingAddress": {
    --         "city": null,
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": null,
    --         "street": "312 Constitution Place\nAustin, TX 78767\nUSA"
    --       },
    --       "Phone": "(512) 757-6000",
    --       "Fax": "(512) 757-9000",
    --       "AccountNumber": "CD451796",
    --       "Website": "http://edgecomm.com",
    --       "PhotoUrl": "/services/images/photo/001B000000UnQ2vIAF",
    --       "Sic": "6576",
    --       "Industry": "Electronics",
    --       "AnnualRevenue": 139000000,
    --       "NumberOfEmployees": 1000,
    --       "Ownership": "Public",
    --       "TickerSymbol": "EDGE",
    --       "Description": "Edge, founded in 1998, is a start-up based in Austin, TX. The company designs and manufactures a device to convert music from one digital format to another. Edge sells its product through retailers and its own website.",
    --       "Rating": "Hot",
    --       "Site": null,
    --       "OwnerId": "005B0000003TOI6IAO",
    --       "CreatedDate": "2017-08-18T14:46:22.000+0000",
    --       "CreatedById": "005B0000003TOI6IAO",
    --       "LastModifiedDate": "2017-08-18T14:46:22.000+0000",
    --       "LastModifiedById": "005B0000003TOI6IAO",
    --       "SystemModstamp": "2017-08-18T14:46:22.000+0000",
    --       "LastActivityDate": null,
    --       "LastViewedDate": null,
    --       "LastReferencedDate": null,
    --       "IsPartner": false,
    --       "IsCustomerPortal": false,
    --       "ChannelProgramName": null,
    --       "ChannelProgramLevelName": null,
    --       "Jigsaw": null,
    --       "JigsawCompanyId": null,
    --       "CleanStatus": "Pending",
    --       "AccountSource": null,
    --       "DunsNumber": null,
    --       "Tradestyle": null,
    --       "NaicsCode": null,
    --       "NaicsDesc": null,
    --       "YearStarted": null,
    --       "SicDesc": null,
    --       "DandbCompanyId": null,
    --       "CustomerPriority__c": "Medium",
    --       "SLA__c": "Silver",
    --       "Active__c": "Yes",
    --       "NumberofLocations__c": 2,
    --       "UpsellOpportunity__c": "Maybe",
    --       "SLASerialNumber__c": "2657",
    --       "SLAExpirationDate__c": "2016-09-12"
    --     },
    --     {
    --       "attributes": {
    --         "type": "Account",
    --         "url": "/services/data/v58.0/sobjects/Account/001B000000UnQ31IAF"
    --       },
    --       "Id": "001B000000UnQ31IAF",
    --       "IsDeleted": false,
    --       "MasterRecordId": null,
    --       "Name": "Express Logistics and Transport",
    --       "Type": "Customer - Channel",
    --       "ParentId": null,
    --       "BillingStreet": "620 SW 5th Avenue Suite 400\nPortland, Oregon 97204\nUnited States",
    --       "BillingCity": "Portland",
    --       "BillingState": "OR",
    --       "BillingPostalCode": null,
    --       "BillingCountry": null,
    --       "BillingLatitude": null,
    --       "BillingLongitude": null,
    --       "BillingGeocodeAccuracy": null,
    --       "BillingAddress": {
    --         "city": "Portland",
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": "OR",
    --         "street": "620 SW 5th Avenue Suite 400\nPortland, Oregon 97204\nUnited States"
    --       },
    --       "ShippingStreet": "620 SW 5th Avenue Suite 400\nPortland, Oregon 97204\nUnited States",
    --       "ShippingCity": null,
    --       "ShippingState": null,
    --       "ShippingPostalCode": null,
    --       "ShippingCountry": null,
    --       "ShippingLatitude": null,
    --       "ShippingLongitude": null,
    --       "ShippingGeocodeAccuracy": null,
    --       "ShippingAddress": {
    --         "city": null,
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": null,
    --         "street": "620 SW 5th Avenue Suite 400\nPortland, Oregon 97204\nUnited States"
    --       },
    --       "Phone": "(503) 421-7800",
    --       "Fax": "(503) 421-7801",
    --       "AccountNumber": "CC947211",
    --       "Website": "www.expressl&t.net",
    --       "PhotoUrl": "/services/images/photo/001B000000UnQ31IAF",
    --       "Sic": "8742",
    --       "Industry": "Transportation",
    --       "AnnualRevenue": 950000000,
    --       "NumberOfEmployees": 12300,
    --       "Ownership": "Public",
    --       "TickerSymbol": "EXLT",
    --       "Description": "Commerical logistics and transportation company.",
    --       "Rating": "Cold",
    --       "Site": null,
    --       "OwnerId": "005B0000003TOI6IAO",
    --       "CreatedDate": "2017-08-18T14:46:22.000+0000",
    --       "CreatedById": "005B0000003TOI6IAO",
    --       "LastModifiedDate": "2017-08-18T14:46:22.000+0000",
    --       "LastModifiedById": "005B0000003TOI6IAO",
    --       "SystemModstamp": "2017-08-18T14:46:22.000+0000",
    --       "LastActivityDate": null,
    --       "LastViewedDate": null,
    --       "LastReferencedDate": null,
    --       "IsPartner": false,
    --       "IsCustomerPortal": false,
    --       "ChannelProgramName": null,
    --       "ChannelProgramLevelName": null,
    --       "Jigsaw": null,
    --       "JigsawCompanyId": null,
    --       "CleanStatus": "Pending",
    --       "AccountSource": null,
    --       "DunsNumber": null,
    --       "Tradestyle": null,
    --       "NaicsCode": null,
    --       "NaicsDesc": null,
    --       "YearStarted": null,
    --       "SicDesc": null,
    --       "DandbCompanyId": null,
    --       "CustomerPriority__c": "Medium",
    --       "SLA__c": "Platinum",
    --       "Active__c": "Yes",
    --       "NumberofLocations__c": 150,
    --       "UpsellOpportunity__c": "Maybe",
    --       "SLASerialNumber__c": "4724",
    --       "SLAExpirationDate__c": "2017-03-15"
    --     },
    --     {
    --       "attributes": {
    --         "type": "Account",
    --         "url": "/services/data/v58.0/sobjects/Account/001B000000UnQ35IAF"
    --       },
    --       "Id": "001B000000UnQ35IAF",
    --       "IsDeleted": false,
    --       "MasterRecordId": null,
    --       "Name": "GenePoint",
    --       "Type": "Customer - Channel",
    --       "ParentId": null,
    --       "BillingStreet": "345 Shoreline Park\nMountain View, CA 94043\nUSA",
    --       "BillingCity": "Mountain View",
    --       "BillingState": "CA",
    --       "BillingPostalCode": null,
    --       "BillingCountry": null,
    --       "BillingLatitude": null,
    --       "BillingLongitude": null,
    --       "BillingGeocodeAccuracy": null,
    --       "BillingAddress": {
    --         "city": "Mountain View",
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": "CA",
    --         "street": "345 Shoreline Park\nMountain View, CA 94043\nUSA"
    --       },
    --       "ShippingStreet": "345 Shoreline Park\nMountain View, CA 94043\nUSA",
    --       "ShippingCity": null,
    --       "ShippingState": null,
    --       "ShippingPostalCode": null,
    --       "ShippingCountry": null,
    --       "ShippingLatitude": null,
    --       "ShippingLongitude": null,
    --       "ShippingGeocodeAccuracy": null,
    --       "ShippingAddress": {
    --         "city": null,
    --         "country": null,
    --         "geocodeAccuracy": null,
    --         "latitude": null,
    --         "longitude": null,
    --         "postalCode": null,
    --         "state": null,
    --         "street": "345 Shoreline Park\nMountain View, CA 94043\nUSA"
    --       },
    --       "Phone": "(650) 867-3450",
    --       "Fax": "(650) 867-9895",
    --       "AccountNumber": "CC978213",
    --       "Website": "www.genepoint.com",
    --       "PhotoUrl": "/services/images/photo/001B000000UnQ35IAF",
    --       "Sic": "3712",
    --       "Industry": "Biotechnology",
    --       "AnnualRevenue": 30000000,
    --       "NumberOfEmployees": 265,
    --       "Ownership": "Private",
    --       "TickerSymbol": null,
    --       "Description": "Genomics company engaged in mapping and sequencing of the human genome and developing gene-based drugs",
    --       "Rating": "Cold",
    --       "Site": null,
    --       "OwnerId": "005B0000003TOI6IAO",
    --       "CreatedDate": "2017-08-18T14:46:22.000+0000",
    --       "CreatedById": "005B0000003TOI6IAO",
    --       "LastModifiedDate": "2017-08-18T14:46:22.000+0000",
    --       "LastModifiedById": "005B0000003TOI6IAO",
    --       "SystemModstamp": "2017-08-18T14:46:22.000+0000",
    --       "LastActivityDate": null,
    --       "LastViewedDate": null,
    --       "LastReferencedDate": null,
    --       "IsPartner": false,
    --       "IsCustomerPortal": false,
    --       "ChannelProgramName": null,
    --       "ChannelProgramLevelName": null,
    --       "Jigsaw": null,
    --       "JigsawCompanyId": null,
    --       "CleanStatus": "Pending",
    --       "AccountSource": null,
    --       "DunsNumber": null,
    --       "Tradestyle": null,
    --       "NaicsCode": null,
    --       "NaicsDesc": null,
    --       "YearStarted": null,
    --       "SicDesc": null,
    --       "DandbCompanyId": null,
    --       "CustomerPriority__c": "Low",
    --       "SLA__c": "Bronze",
    --       "Active__c": "Yes",
    --       "NumberofLocations__c": 1,
    --       "UpsellOpportunity__c": "Yes",
    --       "SLASerialNumber__c": "7324",
    --       "SLAExpirationDate__c": "2017-03-15"
    --     }
    --   ]
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @v_Type nvarchar(4000)

    DECLARE @v_Url nvarchar(4000)

    DECLARE @Id nvarchar(4000)

    DECLARE @IsDeleted int

    DECLARE @MasterRecordId nvarchar(4000)

    DECLARE @Name nvarchar(4000)

    DECLARE @ParentId nvarchar(4000)

    DECLARE @BillingStreet nvarchar(4000)

    DECLARE @BillingCity nvarchar(4000)

    DECLARE @BillingState nvarchar(4000)

    DECLARE @BillingPostalCode nvarchar(4000)

    DECLARE @BillingCountry nvarchar(4000)

    DECLARE @BillingLatitude nvarchar(4000)

    DECLARE @BillingLongitude nvarchar(4000)

    DECLARE @BillingGeocodeAccuracy nvarchar(4000)

    DECLARE @City nvarchar(4000)

    DECLARE @Country nvarchar(4000)

    DECLARE @GeocodeAccuracy nvarchar(4000)

    DECLARE @Latitude nvarchar(4000)

    DECLARE @Longitude nvarchar(4000)

    DECLARE @PostalCode nvarchar(4000)

    DECLARE @State nvarchar(4000)

    DECLARE @Street nvarchar(4000)

    DECLARE @ShippingStreet nvarchar(4000)

    DECLARE @ShippingCity nvarchar(4000)

    DECLARE @ShippingState nvarchar(4000)

    DECLARE @ShippingPostalCode nvarchar(4000)

    DECLARE @ShippingCountry nvarchar(4000)

    DECLARE @ShippingLatitude nvarchar(4000)

    DECLARE @ShippingLongitude nvarchar(4000)

    DECLARE @ShippingGeocodeAccuracy nvarchar(4000)

    DECLARE @ShippingAddress nvarchar(4000)

    DECLARE @Phone nvarchar(4000)

    DECLARE @Fax nvarchar(4000)

    DECLARE @AccountNumber nvarchar(4000)

    DECLARE @Website nvarchar(4000)

    DECLARE @PhotoUrl nvarchar(4000)

    DECLARE @Sic nvarchar(4000)

    DECLARE @Industry nvarchar(4000)

    DECLARE @AnnualRevenue int

    DECLARE @NumberOfEmployees int

    DECLARE @Ownership nvarchar(4000)

    DECLARE @TickerSymbol nvarchar(4000)

    DECLARE @Description nvarchar(4000)

    DECLARE @Rating nvarchar(4000)

    DECLARE @Site nvarchar(4000)

    DECLARE @OwnerId nvarchar(4000)

    DECLARE @CreatedDate nvarchar(4000)

    DECLARE @CreatedById nvarchar(4000)

    DECLARE @LastModifiedDate nvarchar(4000)

    DECLARE @LastModifiedById nvarchar(4000)

    DECLARE @SystemModstamp nvarchar(4000)

    DECLARE @LastActivityDate nvarchar(4000)

    DECLARE @LastViewedDate nvarchar(4000)

    DECLARE @LastReferencedDate nvarchar(4000)

    DECLARE @IsPartner int

    DECLARE @IsCustomerPortal int

    DECLARE @ChannelProgramName nvarchar(4000)

    DECLARE @ChannelProgramLevelName nvarchar(4000)

    DECLARE @Jigsaw nvarchar(4000)

    DECLARE @JigsawCompanyId nvarchar(4000)

    DECLARE @CleanStatus nvarchar(4000)

    DECLARE @AccountSource nvarchar(4000)

    DECLARE @DunsNumber nvarchar(4000)

    DECLARE @Tradestyle nvarchar(4000)

    DECLARE @NaicsCode nvarchar(4000)

    DECLARE @NaicsDesc nvarchar(4000)

    DECLARE @YearStarted nvarchar(4000)

    DECLARE @SicDesc nvarchar(4000)

    DECLARE @DandbCompanyId nvarchar(4000)

    DECLARE @CustomerPriority__c nvarchar(4000)

    DECLARE @SLA__c nvarchar(4000)

    DECLARE @Active__c nvarchar(4000)

    DECLARE @NumberofLocations__c int

    DECLARE @UpsellOpportunity__c nvarchar(4000)

    DECLARE @SLASerialNumber__c nvarchar(4000)

    DECLARE @SLAExpirationDate__c nvarchar(4000)

    DECLARE @ShippingAddressCity nvarchar(4000)

    DECLARE @ShippingAddressCountry nvarchar(4000)

    DECLARE @ShippingAddressGeocodeAccuracy nvarchar(4000)

    DECLARE @ShippingAddressLatitude nvarchar(4000)

    DECLARE @ShippingAddressLongitude nvarchar(4000)

    DECLARE @ShippingAddressPostalCode nvarchar(4000)

    DECLARE @ShippingAddressState nvarchar(4000)

    DECLARE @ShippingAddressStreet nvarchar(4000)

    DECLARE @totalSize int
    EXEC sp_OAMethod @jResp, 'IntOf', @totalSize OUT, 'totalSize'
    DECLARE @done int
    EXEC sp_OAMethod @jResp, 'BoolOf', @done OUT, 'done'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'records'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'records[i].attributes.type'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Url OUT, 'records[i].attributes.url'
        EXEC sp_OAMethod @jResp, 'StringOf', @Id OUT, 'records[i].Id'
        EXEC sp_OAMethod @jResp, 'BoolOf', @IsDeleted OUT, 'records[i].IsDeleted'
        EXEC sp_OAMethod @jResp, 'StringOf', @MasterRecordId OUT, 'records[i].MasterRecordId'
        EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'records[i].Name'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'records[i].Type'
        EXEC sp_OAMethod @jResp, 'StringOf', @ParentId OUT, 'records[i].ParentId'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingStreet OUT, 'records[i].BillingStreet'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingCity OUT, 'records[i].BillingCity'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingState OUT, 'records[i].BillingState'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingPostalCode OUT, 'records[i].BillingPostalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingCountry OUT, 'records[i].BillingCountry'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingLatitude OUT, 'records[i].BillingLatitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingLongitude OUT, 'records[i].BillingLongitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @BillingGeocodeAccuracy OUT, 'records[i].BillingGeocodeAccuracy'
        EXEC sp_OAMethod @jResp, 'StringOf', @City OUT, 'records[i].BillingAddress.city'
        EXEC sp_OAMethod @jResp, 'StringOf', @Country OUT, 'records[i].BillingAddress.country'
        EXEC sp_OAMethod @jResp, 'StringOf', @GeocodeAccuracy OUT, 'records[i].BillingAddress.geocodeAccuracy'
        EXEC sp_OAMethod @jResp, 'StringOf', @Latitude OUT, 'records[i].BillingAddress.latitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @Longitude OUT, 'records[i].BillingAddress.longitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @PostalCode OUT, 'records[i].BillingAddress.postalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @State OUT, 'records[i].BillingAddress.state'
        EXEC sp_OAMethod @jResp, 'StringOf', @Street OUT, 'records[i].BillingAddress.street'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingStreet OUT, 'records[i].ShippingStreet'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingCity OUT, 'records[i].ShippingCity'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingState OUT, 'records[i].ShippingState'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingPostalCode OUT, 'records[i].ShippingPostalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingCountry OUT, 'records[i].ShippingCountry'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingLatitude OUT, 'records[i].ShippingLatitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingLongitude OUT, 'records[i].ShippingLongitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingGeocodeAccuracy OUT, 'records[i].ShippingGeocodeAccuracy'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddress OUT, 'records[i].ShippingAddress'
        EXEC sp_OAMethod @jResp, 'StringOf', @Phone OUT, 'records[i].Phone'
        EXEC sp_OAMethod @jResp, 'StringOf', @Fax OUT, 'records[i].Fax'
        EXEC sp_OAMethod @jResp, 'StringOf', @AccountNumber OUT, 'records[i].AccountNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @Website OUT, 'records[i].Website'
        EXEC sp_OAMethod @jResp, 'StringOf', @PhotoUrl OUT, 'records[i].PhotoUrl'
        EXEC sp_OAMethod @jResp, 'StringOf', @Sic OUT, 'records[i].Sic'
        EXEC sp_OAMethod @jResp, 'StringOf', @Industry OUT, 'records[i].Industry'
        EXEC sp_OAMethod @jResp, 'IntOf', @AnnualRevenue OUT, 'records[i].AnnualRevenue'
        EXEC sp_OAMethod @jResp, 'IntOf', @NumberOfEmployees OUT, 'records[i].NumberOfEmployees'
        EXEC sp_OAMethod @jResp, 'StringOf', @Ownership OUT, 'records[i].Ownership'
        EXEC sp_OAMethod @jResp, 'StringOf', @TickerSymbol OUT, 'records[i].TickerSymbol'
        EXEC sp_OAMethod @jResp, 'StringOf', @Description OUT, 'records[i].Description'
        EXEC sp_OAMethod @jResp, 'StringOf', @Rating OUT, 'records[i].Rating'
        EXEC sp_OAMethod @jResp, 'StringOf', @Site OUT, 'records[i].Site'
        EXEC sp_OAMethod @jResp, 'StringOf', @OwnerId OUT, 'records[i].OwnerId'
        EXEC sp_OAMethod @jResp, 'StringOf', @CreatedDate OUT, 'records[i].CreatedDate'
        EXEC sp_OAMethod @jResp, 'StringOf', @CreatedById OUT, 'records[i].CreatedById'
        EXEC sp_OAMethod @jResp, 'StringOf', @LastModifiedDate OUT, 'records[i].LastModifiedDate'
        EXEC sp_OAMethod @jResp, 'StringOf', @LastModifiedById OUT, 'records[i].LastModifiedById'
        EXEC sp_OAMethod @jResp, 'StringOf', @SystemModstamp OUT, 'records[i].SystemModstamp'
        EXEC sp_OAMethod @jResp, 'StringOf', @LastActivityDate OUT, 'records[i].LastActivityDate'
        EXEC sp_OAMethod @jResp, 'StringOf', @LastViewedDate OUT, 'records[i].LastViewedDate'
        EXEC sp_OAMethod @jResp, 'StringOf', @LastReferencedDate OUT, 'records[i].LastReferencedDate'
        EXEC sp_OAMethod @jResp, 'BoolOf', @IsPartner OUT, 'records[i].IsPartner'
        EXEC sp_OAMethod @jResp, 'BoolOf', @IsCustomerPortal OUT, 'records[i].IsCustomerPortal'
        EXEC sp_OAMethod @jResp, 'StringOf', @ChannelProgramName OUT, 'records[i].ChannelProgramName'
        EXEC sp_OAMethod @jResp, 'StringOf', @ChannelProgramLevelName OUT, 'records[i].ChannelProgramLevelName'
        EXEC sp_OAMethod @jResp, 'StringOf', @Jigsaw OUT, 'records[i].Jigsaw'
        EXEC sp_OAMethod @jResp, 'StringOf', @JigsawCompanyId OUT, 'records[i].JigsawCompanyId'
        EXEC sp_OAMethod @jResp, 'StringOf', @CleanStatus OUT, 'records[i].CleanStatus'
        EXEC sp_OAMethod @jResp, 'StringOf', @AccountSource OUT, 'records[i].AccountSource'
        EXEC sp_OAMethod @jResp, 'StringOf', @DunsNumber OUT, 'records[i].DunsNumber'
        EXEC sp_OAMethod @jResp, 'StringOf', @Tradestyle OUT, 'records[i].Tradestyle'
        EXEC sp_OAMethod @jResp, 'StringOf', @NaicsCode OUT, 'records[i].NaicsCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @NaicsDesc OUT, 'records[i].NaicsDesc'
        EXEC sp_OAMethod @jResp, 'StringOf', @YearStarted OUT, 'records[i].YearStarted'
        EXEC sp_OAMethod @jResp, 'StringOf', @SicDesc OUT, 'records[i].SicDesc'
        EXEC sp_OAMethod @jResp, 'StringOf', @DandbCompanyId OUT, 'records[i].DandbCompanyId'
        EXEC sp_OAMethod @jResp, 'StringOf', @CustomerPriority__c OUT, 'records[i].CustomerPriority__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @SLA__c OUT, 'records[i].SLA__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @Active__c OUT, 'records[i].Active__c'
        EXEC sp_OAMethod @jResp, 'IntOf', @NumberofLocations__c OUT, 'records[i].NumberofLocations__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @UpsellOpportunity__c OUT, 'records[i].UpsellOpportunity__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @SLASerialNumber__c OUT, 'records[i].SLASerialNumber__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @SLAExpirationDate__c OUT, 'records[i].SLAExpirationDate__c'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressCity OUT, 'records[i].ShippingAddress.city'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressCountry OUT, 'records[i].ShippingAddress.country'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressGeocodeAccuracy OUT, 'records[i].ShippingAddress.geocodeAccuracy'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressLatitude OUT, 'records[i].ShippingAddress.latitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressLongitude OUT, 'records[i].ShippingAddress.longitude'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressPostalCode OUT, 'records[i].ShippingAddress.postalCode'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressState OUT, 'records[i].ShippingAddress.state'
        EXEC sp_OAMethod @jResp, 'StringOf', @ShippingAddressStreet OUT, 'records[i].ShippingAddress.street'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @queryParams
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -G -d "q=SELECT%20FIELDS%28All%29%20FROM%20ACCOUNT%20ORDER%20BY%20Name%20LIMIT%205"
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
https://domain.com/services/data/v{{version}}/query/

Postman Collection Item JSON

{
  "name": "Query",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/query/?q=SELECT FIELDS(All) FROM ACCOUNT ORDER BY Name LIMIT 5",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "query",
        ""
      ],
      "query": [
        {
          "key": "q",
          "value": "SELECT FIELDS(All) FROM ACCOUNT ORDER BY Name LIMIT 5",
          "description": "A SOQL query. Note that you will need to replace spaces with “+” characters in your query string to create a valid URI. An example query parameter string might look like: “SELECT+Name+FROM+MyObject”. If the SOQL query string is invalid, a MALFORMED_QUERY response is returned."
        }
      ]
    },
    "description": "Executes the specified SOQL query.\n\nIf the query results are too large, the response contains the first batch of results and a query identifier in the nextRecordsUrl field of the response. The identifier can be used in an additional request to retrieve the next batch.\nhttps://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_query.htm"
  },
  "response": [
    {
      "name": "Query",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/query/?q=SELECT FIELDS(All) FROM ACCOUNT ORDER BY Name LIMIT 5",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "query",
            ""
          ],
          "query": [
            {
              "key": "q",
              "value": "SELECT FIELDS(All) FROM ACCOUNT ORDER BY Name LIMIT 5",
              "description": "A SOQL query. Note that you will need to replace spaces with “+” characters in your query string to create a valid URI. An example query parameter string might look like: “SELECT+Name+FROM+MyObject”. If the SOQL query string is invalid, a MALFORMED_QUERY response is returned."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 27 Sep 2023 15:27:00 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "Sforce-Limit-Info",
          "value": "api-usage=1/15000"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"totalSize\": 5,\n    \"done\": true,\n    \"records\": [\n        {\n            \"attributes\": {\n                \"type\": \"Account\",\n                \"url\": \"/services/data/v58.0/sobjects/Account/001B000000UnQ2wIAF\"\n            },\n            \"Id\": \"001B000000UnQ2wIAF\",\n            \"IsDeleted\": false,\n            \"MasterRecordId\": null,\n            \"Name\": \"Burlington Textiles Corp of America\",\n            \"Type\": \"Customer - Direct\",\n            \"ParentId\": null,\n            \"BillingStreet\": \"525 S. Lexington Ave\",\n            \"BillingCity\": \"Burlington\",\n            \"BillingState\": \"NC\",\n            \"BillingPostalCode\": \"27215\",\n            \"BillingCountry\": \"USA\",\n            \"BillingLatitude\": null,\n            \"BillingLongitude\": null,\n            \"BillingGeocodeAccuracy\": null,\n            \"BillingAddress\": {\n                \"city\": \"Burlington\",\n                \"country\": \"USA\",\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": \"27215\",\n                \"state\": \"NC\",\n                \"street\": \"525 S. Lexington Ave\"\n            },\n            \"ShippingStreet\": null,\n            \"ShippingCity\": null,\n            \"ShippingState\": null,\n            \"ShippingPostalCode\": null,\n            \"ShippingCountry\": null,\n            \"ShippingLatitude\": null,\n            \"ShippingLongitude\": null,\n            \"ShippingGeocodeAccuracy\": null,\n            \"ShippingAddress\": null,\n            \"Phone\": \"(336) 222-7000\",\n            \"Fax\": \"(336) 222-8000\",\n            \"AccountNumber\": \"CD656092\",\n            \"Website\": \"www.burlington.com\",\n            \"PhotoUrl\": \"/services/images/photo/001B000000UnQ2wIAF\",\n            \"Sic\": \"546732\",\n            \"Industry\": \"Apparel\",\n            \"AnnualRevenue\": 350000000,\n            \"NumberOfEmployees\": 9000,\n            \"Ownership\": \"Public\",\n            \"TickerSymbol\": \"BTXT\",\n            \"Description\": null,\n            \"Rating\": \"Warm\",\n            \"Site\": null,\n            \"OwnerId\": \"005B0000003TOI6IAO\",\n            \"CreatedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"CreatedById\": \"005B0000003TOI6IAO\",\n            \"LastModifiedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastModifiedById\": \"005B0000003TOI6IAO\",\n            \"SystemModstamp\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastActivityDate\": null,\n            \"LastViewedDate\": null,\n            \"LastReferencedDate\": null,\n            \"IsPartner\": false,\n            \"IsCustomerPortal\": false,\n            \"ChannelProgramName\": null,\n            \"ChannelProgramLevelName\": null,\n            \"Jigsaw\": null,\n            \"JigsawCompanyId\": null,\n            \"CleanStatus\": \"Pending\",\n            \"AccountSource\": null,\n            \"DunsNumber\": null,\n            \"Tradestyle\": null,\n            \"NaicsCode\": null,\n            \"NaicsDesc\": null,\n            \"YearStarted\": null,\n            \"SicDesc\": null,\n            \"DandbCompanyId\": null,\n            \"CustomerPriority__c\": null,\n            \"SLA__c\": \"Silver\",\n            \"Active__c\": null,\n            \"NumberofLocations__c\": 6,\n            \"UpsellOpportunity__c\": \"Maybe\",\n            \"SLASerialNumber__c\": \"5367\",\n            \"SLAExpirationDate__c\": \"2016-09-12\"\n        },\n        {\n            \"attributes\": {\n                \"type\": \"Account\",\n                \"url\": \"/services/data/v58.0/sobjects/Account/001B000000UnQ2yIAF\"\n            },\n            \"Id\": \"001B000000UnQ2yIAF\",\n            \"IsDeleted\": false,\n            \"MasterRecordId\": null,\n            \"Name\": \"Dickenson plc\",\n            \"Type\": \"Customer - Channel\",\n            \"ParentId\": null,\n            \"BillingStreet\": \"1301 Hoch Drive\",\n            \"BillingCity\": \"Lawrence\",\n            \"BillingState\": \"KS\",\n            \"BillingPostalCode\": \"66045\",\n            \"BillingCountry\": \"USA\",\n            \"BillingLatitude\": null,\n            \"BillingLongitude\": null,\n            \"BillingGeocodeAccuracy\": null,\n            \"BillingAddress\": {\n                \"city\": \"Lawrence\",\n                \"country\": \"USA\",\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": \"66045\",\n                \"state\": \"KS\",\n                \"street\": \"1301 Hoch Drive\"\n            },\n            \"ShippingStreet\": \"1301 Hoch Drive\",\n            \"ShippingCity\": \"Lawrence\",\n            \"ShippingState\": \"KS\",\n            \"ShippingPostalCode\": \"66045\",\n            \"ShippingCountry\": \"USA\",\n            \"ShippingLatitude\": null,\n            \"ShippingLongitude\": null,\n            \"ShippingGeocodeAccuracy\": null,\n            \"ShippingAddress\": {\n                \"city\": \"Lawrence\",\n                \"country\": \"USA\",\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": \"66045\",\n                \"state\": \"KS\",\n                \"street\": \"1301 Hoch Drive\"\n            },\n            \"Phone\": \"(785) 241-6200\",\n            \"Fax\": \"(785) 241-6201\",\n            \"AccountNumber\": \"CC634267\",\n            \"Website\": \"dickenson-consulting.com\",\n            \"PhotoUrl\": \"/services/images/photo/001B000000UnQ2yIAF\",\n            \"Sic\": \"6752\",\n            \"Industry\": \"Consulting\",\n            \"AnnualRevenue\": 50000000,\n            \"NumberOfEmployees\": 120,\n            \"Ownership\": \"Private\",\n            \"TickerSymbol\": null,\n            \"Description\": null,\n            \"Rating\": null,\n            \"Site\": null,\n            \"OwnerId\": \"005B0000003TOI6IAO\",\n            \"CreatedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"CreatedById\": \"005B0000003TOI6IAO\",\n            \"LastModifiedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastModifiedById\": \"005B0000003TOI6IAO\",\n            \"SystemModstamp\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastActivityDate\": null,\n            \"LastViewedDate\": null,\n            \"LastReferencedDate\": null,\n            \"IsPartner\": false,\n            \"IsCustomerPortal\": false,\n            \"ChannelProgramName\": null,\n            \"ChannelProgramLevelName\": null,\n            \"Jigsaw\": null,\n            \"JigsawCompanyId\": null,\n            \"CleanStatus\": \"Pending\",\n            \"AccountSource\": null,\n            \"DunsNumber\": null,\n            \"Tradestyle\": null,\n            \"NaicsCode\": null,\n            \"NaicsDesc\": null,\n            \"YearStarted\": null,\n            \"SicDesc\": null,\n            \"DandbCompanyId\": null,\n            \"CustomerPriority__c\": \"Low\",\n            \"SLA__c\": \"Bronze\",\n            \"Active__c\": \"Yes\",\n            \"NumberofLocations__c\": 2,\n            \"UpsellOpportunity__c\": \"No\",\n            \"SLASerialNumber__c\": \"7425\",\n            \"SLAExpirationDate__c\": \"2017-03-15\"\n        },\n        {\n            \"attributes\": {\n                \"type\": \"Account\",\n                \"url\": \"/services/data/v58.0/sobjects/Account/001B000000UnQ2vIAF\"\n            },\n            \"Id\": \"001B000000UnQ2vIAF\",\n            \"IsDeleted\": false,\n            \"MasterRecordId\": null,\n            \"Name\": \"Edge Communications\",\n            \"Type\": \"Customer - Direct\",\n            \"ParentId\": null,\n            \"BillingStreet\": \"312 Constitution Place\\nAustin, TX 78767\\nUSA\",\n            \"BillingCity\": \"Austin\",\n            \"BillingState\": \"TX\",\n            \"BillingPostalCode\": null,\n            \"BillingCountry\": null,\n            \"BillingLatitude\": null,\n            \"BillingLongitude\": null,\n            \"BillingGeocodeAccuracy\": null,\n            \"BillingAddress\": {\n                \"city\": \"Austin\",\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": \"TX\",\n                \"street\": \"312 Constitution Place\\nAustin, TX 78767\\nUSA\"\n            },\n            \"ShippingStreet\": \"312 Constitution Place\\nAustin, TX 78767\\nUSA\",\n            \"ShippingCity\": null,\n            \"ShippingState\": null,\n            \"ShippingPostalCode\": null,\n            \"ShippingCountry\": null,\n            \"ShippingLatitude\": null,\n            \"ShippingLongitude\": null,\n            \"ShippingGeocodeAccuracy\": null,\n            \"ShippingAddress\": {\n                \"city\": null,\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": null,\n                \"street\": \"312 Constitution Place\\nAustin, TX 78767\\nUSA\"\n            },\n            \"Phone\": \"(512) 757-6000\",\n            \"Fax\": \"(512) 757-9000\",\n            \"AccountNumber\": \"CD451796\",\n            \"Website\": \"http://edgecomm.com\",\n            \"PhotoUrl\": \"/services/images/photo/001B000000UnQ2vIAF\",\n            \"Sic\": \"6576\",\n            \"Industry\": \"Electronics\",\n            \"AnnualRevenue\": 139000000,\n            \"NumberOfEmployees\": 1000,\n            \"Ownership\": \"Public\",\n            \"TickerSymbol\": \"EDGE\",\n            \"Description\": \"Edge, founded in 1998, is a start-up based in Austin, TX. The company designs and manufactures a device to convert music from one digital format to another. Edge sells its product through retailers and its own website.\",\n            \"Rating\": \"Hot\",\n            \"Site\": null,\n            \"OwnerId\": \"005B0000003TOI6IAO\",\n            \"CreatedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"CreatedById\": \"005B0000003TOI6IAO\",\n            \"LastModifiedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastModifiedById\": \"005B0000003TOI6IAO\",\n            \"SystemModstamp\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastActivityDate\": null,\n            \"LastViewedDate\": null,\n            \"LastReferencedDate\": null,\n            \"IsPartner\": false,\n            \"IsCustomerPortal\": false,\n            \"ChannelProgramName\": null,\n            \"ChannelProgramLevelName\": null,\n            \"Jigsaw\": null,\n            \"JigsawCompanyId\": null,\n            \"CleanStatus\": \"Pending\",\n            \"AccountSource\": null,\n            \"DunsNumber\": null,\n            \"Tradestyle\": null,\n            \"NaicsCode\": null,\n            \"NaicsDesc\": null,\n            \"YearStarted\": null,\n            \"SicDesc\": null,\n            \"DandbCompanyId\": null,\n            \"CustomerPriority__c\": \"Medium\",\n            \"SLA__c\": \"Silver\",\n            \"Active__c\": \"Yes\",\n            \"NumberofLocations__c\": 2,\n            \"UpsellOpportunity__c\": \"Maybe\",\n            \"SLASerialNumber__c\": \"2657\",\n            \"SLAExpirationDate__c\": \"2016-09-12\"\n        },\n        {\n            \"attributes\": {\n                \"type\": \"Account\",\n                \"url\": \"/services/data/v58.0/sobjects/Account/001B000000UnQ31IAF\"\n            },\n            \"Id\": \"001B000000UnQ31IAF\",\n            \"IsDeleted\": false,\n            \"MasterRecordId\": null,\n            \"Name\": \"Express Logistics and Transport\",\n            \"Type\": \"Customer - Channel\",\n            \"ParentId\": null,\n            \"BillingStreet\": \"620 SW 5th Avenue Suite 400\\nPortland, Oregon 97204\\nUnited States\",\n            \"BillingCity\": \"Portland\",\n            \"BillingState\": \"OR\",\n            \"BillingPostalCode\": null,\n            \"BillingCountry\": null,\n            \"BillingLatitude\": null,\n            \"BillingLongitude\": null,\n            \"BillingGeocodeAccuracy\": null,\n            \"BillingAddress\": {\n                \"city\": \"Portland\",\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": \"OR\",\n                \"street\": \"620 SW 5th Avenue Suite 400\\nPortland, Oregon 97204\\nUnited States\"\n            },\n            \"ShippingStreet\": \"620 SW 5th Avenue Suite 400\\nPortland, Oregon 97204\\nUnited States\",\n            \"ShippingCity\": null,\n            \"ShippingState\": null,\n            \"ShippingPostalCode\": null,\n            \"ShippingCountry\": null,\n            \"ShippingLatitude\": null,\n            \"ShippingLongitude\": null,\n            \"ShippingGeocodeAccuracy\": null,\n            \"ShippingAddress\": {\n                \"city\": null,\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": null,\n                \"street\": \"620 SW 5th Avenue Suite 400\\nPortland, Oregon 97204\\nUnited States\"\n            },\n            \"Phone\": \"(503) 421-7800\",\n            \"Fax\": \"(503) 421-7801\",\n            \"AccountNumber\": \"CC947211\",\n            \"Website\": \"www.expressl&t.net\",\n            \"PhotoUrl\": \"/services/images/photo/001B000000UnQ31IAF\",\n            \"Sic\": \"8742\",\n            \"Industry\": \"Transportation\",\n            \"AnnualRevenue\": 950000000,\n            \"NumberOfEmployees\": 12300,\n            \"Ownership\": \"Public\",\n            \"TickerSymbol\": \"EXLT\",\n            \"Description\": \"Commerical logistics and transportation company.\",\n            \"Rating\": \"Cold\",\n            \"Site\": null,\n            \"OwnerId\": \"005B0000003TOI6IAO\",\n            \"CreatedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"CreatedById\": \"005B0000003TOI6IAO\",\n            \"LastModifiedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastModifiedById\": \"005B0000003TOI6IAO\",\n            \"SystemModstamp\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastActivityDate\": null,\n            \"LastViewedDate\": null,\n            \"LastReferencedDate\": null,\n            \"IsPartner\": false,\n            \"IsCustomerPortal\": false,\n            \"ChannelProgramName\": null,\n            \"ChannelProgramLevelName\": null,\n            \"Jigsaw\": null,\n            \"JigsawCompanyId\": null,\n            \"CleanStatus\": \"Pending\",\n            \"AccountSource\": null,\n            \"DunsNumber\": null,\n            \"Tradestyle\": null,\n            \"NaicsCode\": null,\n            \"NaicsDesc\": null,\n            \"YearStarted\": null,\n            \"SicDesc\": null,\n            \"DandbCompanyId\": null,\n            \"CustomerPriority__c\": \"Medium\",\n            \"SLA__c\": \"Platinum\",\n            \"Active__c\": \"Yes\",\n            \"NumberofLocations__c\": 150,\n            \"UpsellOpportunity__c\": \"Maybe\",\n            \"SLASerialNumber__c\": \"4724\",\n            \"SLAExpirationDate__c\": \"2017-03-15\"\n        },\n        {\n            \"attributes\": {\n                \"type\": \"Account\",\n                \"url\": \"/services/data/v58.0/sobjects/Account/001B000000UnQ35IAF\"\n            },\n            \"Id\": \"001B000000UnQ35IAF\",\n            \"IsDeleted\": false,\n            \"MasterRecordId\": null,\n            \"Name\": \"GenePoint\",\n            \"Type\": \"Customer - Channel\",\n            \"ParentId\": null,\n            \"BillingStreet\": \"345 Shoreline Park\\nMountain View, CA 94043\\nUSA\",\n            \"BillingCity\": \"Mountain View\",\n            \"BillingState\": \"CA\",\n            \"BillingPostalCode\": null,\n            \"BillingCountry\": null,\n            \"BillingLatitude\": null,\n            \"BillingLongitude\": null,\n            \"BillingGeocodeAccuracy\": null,\n            \"BillingAddress\": {\n                \"city\": \"Mountain View\",\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": \"CA\",\n                \"street\": \"345 Shoreline Park\\nMountain View, CA 94043\\nUSA\"\n            },\n            \"ShippingStreet\": \"345 Shoreline Park\\nMountain View, CA 94043\\nUSA\",\n            \"ShippingCity\": null,\n            \"ShippingState\": null,\n            \"ShippingPostalCode\": null,\n            \"ShippingCountry\": null,\n            \"ShippingLatitude\": null,\n            \"ShippingLongitude\": null,\n            \"ShippingGeocodeAccuracy\": null,\n            \"ShippingAddress\": {\n                \"city\": null,\n                \"country\": null,\n                \"geocodeAccuracy\": null,\n                \"latitude\": null,\n                \"longitude\": null,\n                \"postalCode\": null,\n                \"state\": null,\n                \"street\": \"345 Shoreline Park\\nMountain View, CA 94043\\nUSA\"\n            },\n            \"Phone\": \"(650) 867-3450\",\n            \"Fax\": \"(650) 867-9895\",\n            \"AccountNumber\": \"CC978213\",\n            \"Website\": \"www.genepoint.com\",\n            \"PhotoUrl\": \"/services/images/photo/001B000000UnQ35IAF\",\n            \"Sic\": \"3712\",\n            \"Industry\": \"Biotechnology\",\n            \"AnnualRevenue\": 30000000,\n            \"NumberOfEmployees\": 265,\n            \"Ownership\": \"Private\",\n            \"TickerSymbol\": null,\n            \"Description\": \"Genomics company engaged in mapping and sequencing of the human genome and developing gene-based drugs\",\n            \"Rating\": \"Cold\",\n            \"Site\": null,\n            \"OwnerId\": \"005B0000003TOI6IAO\",\n            \"CreatedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"CreatedById\": \"005B0000003TOI6IAO\",\n            \"LastModifiedDate\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastModifiedById\": \"005B0000003TOI6IAO\",\n            \"SystemModstamp\": \"2017-08-18T14:46:22.000+0000\",\n            \"LastActivityDate\": null,\n            \"LastViewedDate\": null,\n            \"LastReferencedDate\": null,\n            \"IsPartner\": false,\n            \"IsCustomerPortal\": false,\n            \"ChannelProgramName\": null,\n            \"ChannelProgramLevelName\": null,\n            \"Jigsaw\": null,\n            \"JigsawCompanyId\": null,\n            \"CleanStatus\": \"Pending\",\n            \"AccountSource\": null,\n            \"DunsNumber\": null,\n            \"Tradestyle\": null,\n            \"NaicsCode\": null,\n            \"NaicsDesc\": null,\n            \"YearStarted\": null,\n            \"SicDesc\": null,\n            \"DandbCompanyId\": null,\n            \"CustomerPriority__c\": \"Low\",\n            \"SLA__c\": \"Bronze\",\n            \"Active__c\": \"Yes\",\n            \"NumberofLocations__c\": 1,\n            \"UpsellOpportunity__c\": \"Yes\",\n            \"SLASerialNumber__c\": \"7324\",\n            \"SLAExpirationDate__c\": \"2017-03-15\"\n        }\n    ]\n}"
    }
  ]
}