{
  "info": {
    "name": "data-api",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "auth",
      "request": {
        "method": "POST",
        "header": [],
        "auth": {
          "type": "noauth"
        },
        "description": "",
        "url": {
          "raw": "https://www.pharmanuage.fr/data-api/v2/auth",
          "protocol": "https",
          "host": [
            "www",
            "pharmanuage",
            "fr"
          ],
          "path": [
            "data-api",
            "v2",
            "auth"
          ],
          "query": [],
          "variable": []
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"password\": \"{{password}}\",\n  \"username\": \"{{username}}\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      },
      "event": [
        {
          "listen": "test",
          "script": {
            "type": "text/javascript",
            "packages": {},
            "requests": {},
            "exec": [
              "bru.setVar(\"authorizer\", `Bearer ${res.body.token}`);"
            ]
          }
        }
      ]
    },
    {
      "name": "PRODUCT",
      "item": [
        {
          "name": "Get information for a given product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/products?cip=3282779355773",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "products"
              ],
              "query": [
                {
                  "key": "cip",
                  "value": "3282779355773"
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Get all product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/products",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "products"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Get all active product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/products?active=true",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "products"
              ],
              "query": [
                {
                  "key": "active",
                  "value": "true"
                }
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "PROMOTIONS",
      "item": [
        {
          "name": "Get all active promotions",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/promotions?active=true",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "promotions"
              ],
              "query": [
                {
                  "key": "active",
                  "value": "true"
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Get promotion on a given product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/promotions?cip=3282779355773",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "promotions"
              ],
              "query": [
                {
                  "key": "cip",
                  "value": "3282779355773"
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Get the products of a promotion",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/promotions?promotionId=315",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "promotions"
              ],
              "query": [
                {
                  "key": "promotionId",
                  "value": "315"
                }
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "SALES",
      "item": [
        {
          "name": "Get all sales",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/sales",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "sales"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Get all sales of a given product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/sales?officialProductCode=3400936158832",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "sales"
              ],
              "query": [
                {
                  "key": "officialProductCode",
                  "value": "3400936158832"
                }
              ],
              "variable": []
            }
          }
        }
      ]
    },
    {
      "name": "ORDERS",
      "item": [
        {
          "name": "Get all orders",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/orders",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "orders"
              ],
              "query": [],
              "variable": []
            }
          }
        },
        {
          "name": "Get updated information for a given order",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/orders?orderNumber=2022022100001",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "orders"
              ],
              "query": [
                {
                  "key": "orderNumber",
                  "value": "2022022100001"
                }
              ],
              "variable": []
            }
          }
        },
        {
          "name": "Get orders of a given product",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "{{authorizer}}",
                "disabled": false,
                "type": "default"
              }
            ],
            "auth": {
              "type": "noauth"
            },
            "description": "",
            "url": {
              "raw": "https://www.pharmanuage.fr/data-api/v2/{{finess}}/orders?productCode=3264680002618",
              "protocol": "https",
              "host": [
                "www",
                "pharmanuage",
                "fr"
              ],
              "path": [
                "data-api",
                "v2",
                "{{finess}}",
                "orders"
              ],
              "query": [
                {
                  "key": "productCode",
                  "value": "3264680002618"
                }
              ],
              "variable": []
            }
          }
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "password",
      "value": "",
      "type": "default"
    },
    {
      "key": "username",
      "value": "",
      "type": "default"
    },
    {
      "key": "finess",
      "value": "",
      "type": "default"
    },
    {
      "key": "authorizer",
      "value": "",
      "type": "default"
    }
  ]
}