{
  "info": {
    "name": "Clickwise Publisher API",
    "version": "1.1",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://partners.clickwise.net/api/v1/publisher"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "secret"
    }
  ],
  "item": [
    {
      "name": "Account",
      "item": [
        {
          "name": "Who am I: account, access and limits",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/me/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "me",
                ""
              ],
              "query": []
            },
            "description": "Who am I: account, access and limits"
          }
        }
      ]
    },
    {
      "name": "Products",
      "item": [
        {
          "name": "Search GTIN products with your tracked links",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                ""
              ],
              "query": [
                {
                  "key": "q",
                  "value": "",
                  "disabled": false,
                  "description": "Phrase in the title."
                },
                {
                  "key": "country",
                  "value": "",
                  "disabled": true,
                  "description": "ISO alpha-2 market (UK = GB)."
                },
                {
                  "key": "merchant",
                  "value": "",
                  "disabled": true,
                  "description": "Merchant id from merchant.id."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "Page size."
                },
                {
                  "key": "offset",
                  "value": "",
                  "disabled": true,
                  "description": "Follow next_offset."
                }
              ]
            },
            "description": "Search GTIN products with your tracked links"
          }
        },
        {
          "name": "Refresh price and stock by id and/or GTIN (1-100)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/products/lookup/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                "lookup",
                ""
              ],
              "query": [
                {
                  "key": "ids",
                  "value": "",
                  "disabled": true,
                  "description": "Comma-separated product ids."
                },
                {
                  "key": "gtins",
                  "value": "",
                  "disabled": true,
                  "description": "Comma-separated GTINs (checksums validated)."
                },
                {
                  "key": "country",
                  "value": "",
                  "disabled": true,
                  "description": "ISO alpha-2 market."
                },
                {
                  "key": "merchant",
                  "value": "",
                  "disabled": true,
                  "description": "Merchant id."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "Page size."
                },
                {
                  "key": "offset",
                  "value": "",
                  "disabled": true,
                  "description": "Follow next_offset."
                }
              ]
            },
            "description": "Refresh price and stock by id and/or GTIN (1-100)"
          }
        }
      ]
    },
    {
      "name": "Programs",
      "item": [
        {
          "name": "Programs you may promote (and, optionally, can apply to)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/programs/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "programs",
                ""
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true,
                  "description": "Name filter."
                },
                {
                  "key": "include_available",
                  "value": "",
                  "disabled": true,
                  "description": "Also list programs open for application."
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true,
                  "description": "Page number."
                },
                {
                  "key": "page_size",
                  "value": "",
                  "disabled": true,
                  "description": "Rows per page."
                }
              ]
            },
            "description": "Programs you may promote (and, optionally, can apply to)"
          }
        },
        {
          "name": "Programs open for application",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/programs/joinable/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "programs",
                "joinable",
                ""
              ],
              "query": [
                {
                  "key": "search",
                  "value": "",
                  "disabled": true,
                  "description": "Name filter."
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true,
                  "description": "Page number."
                },
                {
                  "key": "page_size",
                  "value": "",
                  "disabled": true,
                  "description": "Rows per page."
                }
              ]
            },
            "description": "Programs open for application"
          }
        },
        {
          "name": "Apply to a program (approved or pending review)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/programs/apply/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "programs",
                "apply",
                ""
              ],
              "query": []
            },
            "description": "Apply to a program (approved or pending review)",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"program_id\": 123\n}"
            }
          }
        }
      ]
    },
    {
      "name": "Links",
      "item": [
        {
          "name": "Your tracking links",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/links/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "links",
                ""
              ],
              "query": [
                {
                  "key": "subid",
                  "value": "",
                  "disabled": true,
                  "description": "Exact sub-ID."
                },
                {
                  "key": "campaign_id",
                  "value": "",
                  "disabled": true,
                  "description": "Campaign id."
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true,
                  "description": "Page number."
                },
                {
                  "key": "page_size",
                  "value": "",
                  "disabled": true,
                  "description": "Rows per page."
                }
              ]
            },
            "description": "Your tracking links"
          }
        },
        {
          "name": "Create or return one tracking link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/links/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "links",
                ""
              ],
              "query": []
            },
            "description": "Create or return one tracking link",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"campaign_id\": 123,\n  \"subid\": \"homepage_banner\",\n  \"landing_url\": \"https://merchant.example/p/1\"\n}"
            }
          }
        },
        {
          "name": "Create up to 50 links; each item reports its own status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/links/batch/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "links",
                "batch",
                ""
              ],
              "query": []
            },
            "description": "Create up to 50 links; each item reports its own status",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"links\": [\n    {\n      \"campaign_id\": 123,\n      \"subid\": \"post_1\"\n    },\n    {\n      \"program_id\": 456,\n      \"subid\": \"post_2\"\n    }\n  ]\n}"
            }
          }
        }
      ]
    },
    {
      "name": "Reporting",
      "item": [
        {
          "name": "Your conversions with a sub-ID rollup",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/conversions/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "conversions",
                ""
              ],
              "query": [
                {
                  "key": "date_from",
                  "value": "",
                  "disabled": true,
                  "description": "Inclusive start (YYYY-MM-DD)."
                },
                {
                  "key": "date_to",
                  "value": "",
                  "disabled": true,
                  "description": "Inclusive end (YYYY-MM-DD)."
                },
                {
                  "key": "subid",
                  "value": "",
                  "disabled": true,
                  "description": "Exact sub-ID."
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Status."
                },
                {
                  "key": "source",
                  "value": "",
                  "disabled": true,
                  "description": "Data plane."
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true,
                  "description": "Page number."
                },
                {
                  "key": "page_size",
                  "value": "",
                  "disabled": true,
                  "description": "Rows per page."
                }
              ]
            },
            "description": "Your conversions with a sub-ID rollup"
          }
        },
        {
          "name": "Conversions and commission grouped (time series or dimension)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/reports/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "reports",
                ""
              ],
              "query": [
                {
                  "key": "group_by",
                  "value": "",
                  "disabled": true,
                  "description": "Grouping; time groups are dense."
                },
                {
                  "key": "date_from",
                  "value": "",
                  "disabled": true,
                  "description": "Inclusive start (YYYY-MM-DD)."
                },
                {
                  "key": "date_to",
                  "value": "",
                  "disabled": true,
                  "description": "Inclusive end (YYYY-MM-DD)."
                },
                {
                  "key": "subid",
                  "value": "",
                  "disabled": true,
                  "description": "Exact sub-ID."
                },
                {
                  "key": "status",
                  "value": "",
                  "disabled": true,
                  "description": "Status."
                }
              ]
            },
            "description": "Conversions and commission grouped (time series or dimension)"
          }
        },
        {
          "name": "Your clicks on Clickwise redirects",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/clicks/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "clicks",
                ""
              ],
              "query": [
                {
                  "key": "sub_id",
                  "value": "",
                  "disabled": true,
                  "description": "Exact sub-ID."
                },
                {
                  "key": "campaign_id",
                  "value": "",
                  "disabled": true,
                  "description": "Campaign."
                },
                {
                  "key": "deeplink_id",
                  "value": "",
                  "disabled": true,
                  "description": "Link id."
                },
                {
                  "key": "include_bots",
                  "value": "",
                  "disabled": true,
                  "description": "Include filtered bot clicks."
                },
                {
                  "key": "page",
                  "value": "",
                  "disabled": true,
                  "description": "Page number."
                },
                {
                  "key": "page_size",
                  "value": "",
                  "disabled": true,
                  "description": "Rows per page."
                }
              ]
            },
            "description": "Your clicks on Clickwise redirects"
          }
        }
      ]
    },
    {
      "name": "Postbacks",
      "item": [
        {
          "name": "Conversion postback (webhook) configuration",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/postback/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "postback",
                ""
              ],
              "query": []
            },
            "description": "Conversion postback (webhook) configuration"
          }
        },
        {
          "name": "Not available with an API key: set the postback URL in the portal",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/postback/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "postback",
                ""
              ],
              "query": []
            },
            "description": "Not available with an API key: set the postback URL in the portal",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://tracker.example/pb?sub={subid}&amount={commission}&status={status}\",\n  \"http_method\": \"GET\"\n}"
            }
          }
        },
        {
          "name": "Not available with an API key: rotate the secret in the portal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/postback/secret/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "postback",
                "secret",
                ""
              ],
              "query": []
            },
            "description": "Not available with an API key: rotate the secret in the portal"
          }
        },
        {
          "name": "Send a signed test event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/postback/test/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "postback",
                "test",
                ""
              ],
              "query": []
            },
            "description": "Send a signed test event"
          }
        },
        {
          "name": "Recent postback delivery attempts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-API-Key",
                "value": "{{apiKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/postback/deliveries/",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "postback",
                "deliveries",
                ""
              ],
              "query": []
            },
            "description": "Recent postback delivery attempts"
          }
        }
      ]
    }
  ]
}