Chilkat Online Tools

DataFlex / Zoho CRM REST APIs / Pipeline

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sDisplay_value
    Boolean iDefault
    String sActual_value
    String sId
    Integer j
    Integer iCount_j
    Integer iSequence_number
    String sName
    String sId
    String sForecast_type
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "layout_id" "{{layout_id}}" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://domain.com/crm/v2.1/settings/pipeline" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

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

    // {
    //   "pipeline": [
    //     {
    //       "display_value": "Standard (Standard)",
    //       "default": false,
    //       "maps": [
    //         {
    //           "display_value": "Qualification",
    //           "sequence_number": 1,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Qualification",
    //           "id": "738964000000007104",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Needs Analysis",
    //           "sequence_number": 2,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Needs Analysis",
    //           "id": "738964000000007106",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Value Proposition",
    //           "sequence_number": 3,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Value Proposition",
    //           "id": "738964000000007108",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Identify Decision Makers",
    //           "sequence_number": 4,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Id. Decision Makers",
    //           "id": "738964000000007110",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Proposal/Price Quote",
    //           "sequence_number": 5,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Proposal/Price Quote",
    //           "id": "738964000000007112",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Negotiation/Review",
    //           "sequence_number": 6,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Negotiation/Review",
    //           "id": "738964000000007114",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Closed Won",
    //           "sequence_number": 7,
    //           "forecast_category": {
    //             "name": "Closed",
    //             "id": "738964000000007094"
    //           },
    //           "actual_value": "Closed Won",
    //           "id": "738964000000007116",
    //           "forecast_type": "Closed Won"
    //         },
    //         {
    //           "display_value": "Closed Lost",
    //           "sequence_number": 8,
    //           "forecast_category": {
    //             "name": "Omitted",
    //             "id": "738964000000007096"
    //           },
    //           "actual_value": "Closed Lost",
    //           "id": "738964000000007118",
    //           "forecast_type": "Closed Lost"
    //         },
    //         {
    //           "display_value": "Closed-Lost to Competition",
    //           "sequence_number": 9,
    //           "forecast_category": {
    //             "name": "Omitted",
    //             "id": "738964000000007096"
    //           },
    //           "actual_value": "Closed Lost to Competition",
    //           "id": "738964000000007120",
    //           "forecast_type": "Closed Lost"
    //         },
    //         {
    //           "display_value": "Start",
    //           "sequence_number": 10,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Start",
    //           "id": "738964000002131043",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Discount Approved",
    //           "sequence_number": 11,
    //           "forecast_category": {
    //             "name": "Closed",
    //             "id": "738964000000007094"
    //           },
    //           "actual_value": "Discount Approved",
    //           "id": "738964000002131049",
    //           "forecast_type": "Closed Won"
    //         },
    //         {
    //           "display_value": "Discount Rejected",
    //           "sequence_number": 12,
    //           "forecast_category": {
    //             "name": "Omitted",
    //             "id": "738964000000007096"
    //           },
    //           "actual_value": "Discount Rejected",
    //           "id": "738964000002131055",
    //           "forecast_type": "Closed Lost"
    //         },
    //         {
    //           "display_value": "Contract Sent",
    //           "sequence_number": 13,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Contract Sent",
    //           "id": "738964000002131061",
    //           "forecast_type": "Open"
    //         }
    //       ],
    //       "actual_value": "Standard (Standard)",
    //       "id": "738964000001920858"
    //     },
    //     {
    //       "display_value": "sample",
    //       "default": true,
    //       "maps": [
    //         {
    //           "display_value": "Qualification",
    //           "sequence_number": 1,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Qualification",
    //           "id": "738964000000007104",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Needs Analysis",
    //           "sequence_number": 2,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Needs Analysis",
    //           "id": "738964000000007106",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Value Proposition",
    //           "sequence_number": 3,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Value Proposition",
    //           "id": "738964000000007108",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Identify Decision Makers",
    //           "sequence_number": 4,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Id. Decision Makers",
    //           "id": "738964000000007110",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Proposal/Price Quote",
    //           "sequence_number": 5,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Proposal/Price Quote",
    //           "id": "738964000000007112",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Negotiation/Review",
    //           "sequence_number": 6,
    //           "forecast_category": {
    //             "name": "Pipeline",
    //             "id": "738964000000007092"
    //           },
    //           "actual_value": "Negotiation/Review",
    //           "id": "738964000000007114",
    //           "forecast_type": "Open"
    //         },
    //         {
    //           "display_value": "Closed Won",
    //           "sequence_number": 7,
    //           "forecast_category": {
    //             "name": "Closed",
    //             "id": "738964000000007094"
    //           },
    //           "actual_value": "Closed Won",
    //           "id": "738964000000007116",
    //           "forecast_type": "Closed Won"
    //         },
    //         {
    //           "display_value": "Closed Lost",
    //           "sequence_number": 8,
    //           "forecast_category": {
    //             "name": "Omitted",
    //             "id": "738964000000007096"
    //           },
    //           "actual_value": "Closed Lost",
    //           "id": "738964000000007118",
    //           "forecast_type": "Closed Lost"
    //         },
    //         {
    //           "display_value": "Closed-Lost to Competition",
    //           "sequence_number": 9,
    //           "forecast_category": {
    //             "name": "Omitted",
    //             "id": "738964000000007096"
    //           },
    //           "actual_value": "Closed Lost to Competition",
    //           "id": "738964000000007120",
    //           "forecast_type": "Closed Lost"
    //         }
    //       ],
    //       "actual_value": "sample",
    //       "id": "738964000001920866"
    //     }
    //   ]
    // }

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

    Move 0 To i
    Get ComSizeOfArray Of hoJResp "pipeline" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "pipeline[i].display_value" To sDisplay_value
        Get ComBoolOf Of hoJResp "pipeline[i].default" To iDefault
        Get ComStringOf Of hoJResp "pipeline[i].actual_value" To sActual_value
        Get ComStringOf Of hoJResp "pipeline[i].id" To sId
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "pipeline[i].maps" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].display_value" To sDisplay_value
            Get ComIntOf Of hoJResp "pipeline[i].maps[j].sequence_number" To iSequence_number
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].forecast_category.name" To sName
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].forecast_category.id" To sId
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].actual_value" To sActual_value
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].id" To sId
            Get ComStringOf Of hoJResp "pipeline[i].maps[j].forecast_type" To sForecast_type
            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop



End_Procedure

Curl Command

curl -G -d "layout_id=%7B%7Blayout_id%7D%7D"
	-H "Authorization: Bearer <access_token>"
https://domain.com/crm/v2.1/settings/pipeline

Postman Collection Item JSON

{
  "name": "Pipeline",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
        {
          "key": "token",
          "value": "{{access-token}}",
          "type": "string"
        }
      ]
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{api-domain}}/crm/v2.1/settings/pipeline?layout_id={{layout_id}}",
      "host": [
        "{{api-domain}}"
      ],
      "path": [
        "crm",
        "v2.1",
        "settings",
        "pipeline"
      ],
      "query": [
        {
          "key": "layout_id",
          "value": "{{layout_id}}"
        }
      ]
    }
  },
  "response": [
    {
      "name": "P1: id",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/pipeline?layout_id=738964000000095023",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "pipeline"
          ],
          "query": [
            {
              "key": "layout_id",
              "value": "738964000000095023"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Thu, 13 May 2021 09:48:38 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-store, no-cache, must-revalidate, private"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-13T09:52:40+00:00"
        },
        {
          "key": "clientVersion",
          "value": "4031107"
        },
        {
          "key": "clientsubVersion",
          "value": "113b962796fc62946d9303284a64efab"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=15768000"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"pipeline\": [\n        {\n            \"display_value\": \"Standard (Standard)\",\n            \"default\": false,\n            \"maps\": [\n                {\n                    \"display_value\": \"Qualification\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Qualification\",\n                    \"id\": \"738964000000007104\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Needs Analysis\",\n                    \"sequence_number\": 2,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Needs Analysis\",\n                    \"id\": \"738964000000007106\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Value Proposition\",\n                    \"sequence_number\": 3,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Value Proposition\",\n                    \"id\": \"738964000000007108\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Identify Decision Makers\",\n                    \"sequence_number\": 4,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Id. Decision Makers\",\n                    \"id\": \"738964000000007110\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Proposal/Price Quote\",\n                    \"sequence_number\": 5,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Proposal/Price Quote\",\n                    \"id\": \"738964000000007112\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Negotiation/Review\",\n                    \"sequence_number\": 6,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Negotiation/Review\",\n                    \"id\": \"738964000000007114\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Closed Won\",\n                    \"sequence_number\": 7,\n                    \"forecast_category\": {\n                        \"name\": \"Closed\",\n                        \"id\": \"738964000000007094\"\n                    },\n                    \"actual_value\": \"Closed Won\",\n                    \"id\": \"738964000000007116\",\n                    \"forecast_type\": \"Closed Won\"\n                },\n                {\n                    \"display_value\": \"Closed Lost\",\n                    \"sequence_number\": 8,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"738964000000007096\"\n                    },\n                    \"actual_value\": \"Closed Lost\",\n                    \"id\": \"738964000000007118\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Closed-Lost to Competition\",\n                    \"sequence_number\": 9,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"738964000000007096\"\n                    },\n                    \"actual_value\": \"Closed Lost to Competition\",\n                    \"id\": \"738964000000007120\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Start\",\n                    \"sequence_number\": 10,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Start\",\n                    \"id\": \"738964000002131043\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Discount Approved\",\n                    \"sequence_number\": 11,\n                    \"forecast_category\": {\n                        \"name\": \"Closed\",\n                        \"id\": \"738964000000007094\"\n                    },\n                    \"actual_value\": \"Discount Approved\",\n                    \"id\": \"738964000002131049\",\n                    \"forecast_type\": \"Closed Won\"\n                },\n                {\n                    \"display_value\": \"Discount Rejected\",\n                    \"sequence_number\": 12,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"738964000000007096\"\n                    },\n                    \"actual_value\": \"Discount Rejected\",\n                    \"id\": \"738964000002131055\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Contract Sent\",\n                    \"sequence_number\": 13,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Contract Sent\",\n                    \"id\": \"738964000002131061\",\n                    \"forecast_type\": \"Open\"\n                }\n            ],\n            \"actual_value\": \"Standard (Standard)\",\n            \"id\": \"738964000001920858\"\n        },\n        {\n            \"display_value\": \"sample\",\n            \"default\": true,\n            \"maps\": [\n                {\n                    \"display_value\": \"Qualification\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Qualification\",\n                    \"id\": \"738964000000007104\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Needs Analysis\",\n                    \"sequence_number\": 2,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Needs Analysis\",\n                    \"id\": \"738964000000007106\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Value Proposition\",\n                    \"sequence_number\": 3,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Value Proposition\",\n                    \"id\": \"738964000000007108\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Identify Decision Makers\",\n                    \"sequence_number\": 4,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Id. Decision Makers\",\n                    \"id\": \"738964000000007110\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Proposal/Price Quote\",\n                    \"sequence_number\": 5,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Proposal/Price Quote\",\n                    \"id\": \"738964000000007112\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Negotiation/Review\",\n                    \"sequence_number\": 6,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"738964000000007092\"\n                    },\n                    \"actual_value\": \"Negotiation/Review\",\n                    \"id\": \"738964000000007114\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Closed Won\",\n                    \"sequence_number\": 7,\n                    \"forecast_category\": {\n                        \"name\": \"Closed\",\n                        \"id\": \"738964000000007094\"\n                    },\n                    \"actual_value\": \"Closed Won\",\n                    \"id\": \"738964000000007116\",\n                    \"forecast_type\": \"Closed Won\"\n                },\n                {\n                    \"display_value\": \"Closed Lost\",\n                    \"sequence_number\": 8,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"738964000000007096\"\n                    },\n                    \"actual_value\": \"Closed Lost\",\n                    \"id\": \"738964000000007118\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Closed-Lost to Competition\",\n                    \"sequence_number\": 9,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"738964000000007096\"\n                    },\n                    \"actual_value\": \"Closed Lost to Competition\",\n                    \"id\": \"738964000000007120\",\n                    \"forecast_type\": \"Closed Lost\"\n                }\n            ],\n            \"actual_value\": \"sample\",\n            \"id\": \"738964000001920866\"\n        }\n    ]\n}"
    },
    {
      "name": "SUCCESS RESPONSE",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/pipeline?layout_id=4150868000000091023",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "pipeline"
          ],
          "query": [
            {
              "key": "layout_id",
              "value": "4150868000000091023"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 10 May 2021 10:56:06 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-10T17:05:19+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4016246"
        },
        {
          "key": "clientsubVersion",
          "value": "59f8474ad0046d6a2f6204e0448818d0"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "vary",
          "value": "accept-encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"pipeline\": [\n        {\n            \"display_value\": \"Standard (Standard)\",\n            \"default\": true,\n            \"maps\": [\n                {\n                    \"display_value\": \"Qualification\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Qualification\",\n                    \"id\": \"4150868000000006801\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Needs Analysis\",\n                    \"sequence_number\": 2,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Needs Analysis\",\n                    \"id\": \"4150868000000006803\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Value Proposition\",\n                    \"sequence_number\": 3,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Value Proposition\",\n                    \"id\": \"4150868000000006805\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Identify Decision Makers\",\n                    \"sequence_number\": 4,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Id. Decision Makers\",\n                    \"id\": \"4150868000000006807\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Proposal/Price Quote\",\n                    \"sequence_number\": 5,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Proposal/Price Quote\",\n                    \"id\": \"4150868000000006811\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Negotiation/Review\",\n                    \"sequence_number\": 6,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Negotiation/Review\",\n                    \"id\": \"4150868000000006813\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Closed Won\",\n                    \"sequence_number\": 7,\n                    \"forecast_category\": {\n                        \"name\": \"Closed\",\n                        \"id\": \"4150868000000006789\"\n                    },\n                    \"actual_value\": \"Closed Won\",\n                    \"id\": \"4150868000000006815\",\n                    \"forecast_type\": \"Closed Won\"\n                },\n                {\n                    \"display_value\": \"Closed Lost\",\n                    \"sequence_number\": 8,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"4150868000000006791\"\n                    },\n                    \"actual_value\": \"Closed Lost\",\n                    \"id\": \"4150868000000006817\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Closed-Lost to Competition\",\n                    \"sequence_number\": 9,\n                    \"forecast_category\": {\n                        \"name\": \"Omitted\",\n                        \"id\": \"4150868000000006791\"\n                    },\n                    \"actual_value\": \"Closed Lost to Competition\",\n                    \"id\": \"4150868000000006819\",\n                    \"forecast_type\": \"Closed Lost\"\n                },\n                {\n                    \"display_value\": \"Discount Approved\",\n                    \"sequence_number\": 10,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Discount Approved\",\n                    \"id\": \"4150868000000732001\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Discount Rejected\",\n                    \"sequence_number\": 11,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Discount Rejected\",\n                    \"id\": \"4150868000000732004\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Contract sent\",\n                    \"sequence_number\": 12,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Contract sent\",\n                    \"id\": \"4150868000000732007\",\n                    \"forecast_type\": \"Closed Won\"\n                },\n                {\n                    \"display_value\": \"Start\",\n                    \"sequence_number\": 13,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Start\",\n                    \"id\": \"4150868000000732010\",\n                    \"forecast_type\": \"Closed Won\"\n                }\n            ],\n            \"actual_value\": \"Standard (Standard)\",\n            \"id\": \"4150868000001874009\"\n        },\n        {\n            \"display_value\": \"Option 1\",\n            \"default\": false,\n            \"maps\": [\n                {\n                    \"display_value\": \"Qualification\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Qualification\",\n                    \"id\": \"4150868000000006801\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Proposal/Price Quote\",\n                    \"sequence_number\": 2,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Proposal/Price Quote\",\n                    \"id\": \"4150868000000006811\",\n                    \"forecast_type\": \"Open\"\n                }\n            ],\n            \"actual_value\": \"Option 1\",\n            \"id\": \"4150868000001874016\"\n        },\n        {\n            \"display_value\": \"Option 2\",\n            \"default\": false,\n            \"maps\": [\n                {\n                    \"display_value\": \"Negotiation/Review\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Negotiation/Review\",\n                    \"id\": \"4150868000000006813\",\n                    \"forecast_type\": \"Open\"\n                }\n            ],\n            \"actual_value\": \"Option 2\",\n            \"id\": \"4150868000001874021\"\n        },\n        {\n            \"display_value\": \"436\",\n            \"default\": false,\n            \"maps\": [\n                {\n                    \"display_value\": \"Qualification\",\n                    \"sequence_number\": 1,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Qualification\",\n                    \"id\": \"4150868000000006801\",\n                    \"forecast_type\": \"Open\"\n                },\n                {\n                    \"display_value\": \"Needs Analysis\",\n                    \"sequence_number\": 2,\n                    \"forecast_category\": {\n                        \"name\": \"Pipeline\",\n                        \"id\": \"4150868000000006787\"\n                    },\n                    \"actual_value\": \"Needs Analysis\",\n                    \"id\": \"4150868000000006803\",\n                    \"forecast_type\": \"Open\"\n                }\n            ],\n            \"actual_value\": \"436\",\n            \"id\": \"4150868000004595013\"\n        }\n    ]\n}"
    },
    {
      "name": "REQUIRED_PARAM_MISSING",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/pipeline",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "pipeline"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 10 May 2021 10:56:46 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "141"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-10T17:05:19+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4016246"
        },
        {
          "key": "clientsubVersion",
          "value": "59f8474ad0046d6a2f6204e0448818d0"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"REQUIRED_PARAM_MISSING\",\n    \"details\": {\n        \"param_name\": \"layout_id\"\n    },\n    \"message\": \"One of the expected parameter is missing\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "INVALID_DATA",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/pipeline?layout_id=415086800000009102",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "pipeline"
          ],
          "query": [
            {
              "key": "layout_id",
              "value": "415086800000009102"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Mon, 10 May 2021 10:57:20 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "107"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-ACCESSTOKEN-RESET",
          "value": "2021-05-10T17:05:19+05:30"
        },
        {
          "key": "clientVersion",
          "value": "4016246"
        },
        {
          "key": "clientsubVersion",
          "value": "59f8474ad0046d6a2f6204e0448818d0"
        },
        {
          "key": "Content-Disposition",
          "value": "attachment; filename=response.json"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        },
        {
          "key": "Content-Language",
          "value": "en-US"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"INVALID_DATA\",\n    \"details\": {\n        \"param_name\": \"layout_id\"\n    },\n    \"message\": \"Invalid layoutid\",\n    \"status\": \"error\"\n}"
    },
    {
      "name": "OAUTH_SCOPE_MISMATCH",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{api-domain}}/crm/v2.1/settings/pipeline?layout_id=4150868000000091023",
          "host": [
            "{{api-domain}}"
          ],
          "path": [
            "crm",
            "v2.1",
            "settings",
            "pipeline"
          ],
          "query": [
            {
              "key": "layout_id",
              "value": "4150868000000091023"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Server",
          "value": "ZGS"
        },
        {
          "key": "Date",
          "value": "Thu, 13 May 2021 08:41:46 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=utf-8"
        },
        {
          "key": "Content-Length",
          "value": "113"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Referrer-Policy",
          "value": "strict-origin"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "Pragma",
          "value": "no-cache"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache"
        },
        {
          "key": "Expires",
          "value": "Thu, 01 Jan 1970 00:00:00 GMT"
        },
        {
          "key": "X-Frame-Options",
          "value": "SAMEORIGIN"
        },
        {
          "key": "X-Download-Options",
          "value": "noopen"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"code\": \"OAUTH_SCOPE_MISMATCH\",\n    \"details\": {},\n    \"message\": \"invalid oauth scope to access this URL\",\n    \"status\": \"error\"\n}"
    }
  ]
}