{
  "name": "API Vente",
  "version": "1",
  "items": [
    {
      "type": "http",
      "name": "Status",
      "filename": "Status.bru",
      "seq": 2,
      "settings": {
        "encodeUrl": true,
        "timeout": 0
      },
      "tags": [],
      "examples": [],
      "request": {
        "url": "{{host}}/pharmacies/{{finess}}/status",
        "method": "GET",
        "headers": [],
        "params": [],
        "body": {
          "mode": "none",
          "formUrlEncoded": [],
          "multipartForm": [],
          "file": []
        },
        "script": {},
        "vars": {},
        "assertions": [
          {
            "name": "res.status",
            "value": "eq 200",
            "enabled": true,
            "uid": "8vT9OVJ2lY8OnkyuwWrTH"
          }
        ],
        "tests": "",
        "docs": "",
        "auth": {
          "mode": "inherit"
        }
      }
    },
    {
      "type": "folder",
      "name": "standard Flow",
      "filename": "standard Flow",
      "seq": 1,
      "examples": [],
      "root": {
        "request": {
          "auth": {
            "mode": "inherit"
          }
        },
        "meta": {
          "name": "standard Flow",
          "seq": 1
        }
      },
      "items": [
        {
          "type": "http",
          "name": "Check",
          "filename": "Check.bru",
          "seq": 4,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}/patient/{{patientId}}/prescriber",
            "method": "POST",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "{\n  \"dateOrder\": \"2025-04-18\",\n  \"inseeCode\": \"\",\n  \"rpps\": \"99900023138\",\n  \"finessAdministratif\": \"991111022\",\n  \"finessGeographique\": \"\",\n  \"name\": \"ALAIN\",\n  \"address\": \"\",\n  \"address2\": \"\",\n  \"zipcode\": \"34000\",\n  \"city\": \"Montpellier\",\n  \"prescriberSante\": {\n    \"specialtyDescription\": \"Omnipraticien\",\n    \"specialtyCode\": \"1\"\n  }\n}",
              "formUrlEncoded": [],
              "multipartForm": [],
              "file": []
            },
            "script": {},
            "vars": {},
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        },
        {
          "type": "http",
          "name": "items",
          "filename": "items.bru",
          "seq": 5,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}/patient/{{patientId}}/items",
            "method": "POST",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "[\n   {\n    \"cip\": \"3400934507786\",\n    \"description\": \"DOLIPRANE 500MG GELULE 16\",\n    \"quantity\": 1,\n    \"unitDoseQuantity\": 1,\n    \"lineNumber\": 1,\n    \"salePriceIt\": 0.77,\n    \"salePriceEt\": 0.77,\n    \"lotNumber\": \"\",\n    \"serialNumber\": \"\",\n    \"expirationDate\": \"\",\n    \"comment\": \"\",\n    \"shape\": \"Gélule\",\n    \"compositionLabel\": \"Gélule\",\n    \"isNotPilbox\": false,\n    \"qtyPromised\": \"\",\n    \"productHeight\": \"\",\n    \"productLength\": \"Gélule\",\n    \"productWidth\": \"Gélule\",\n    \"isFrigo\": false\n  }\n]",
              "formUrlEncoded": [],
              "multipartForm": [],
              "file": []
            },
            "script": {},
            "vars": {},
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        },
        {
          "type": "http",
          "name": "Patient",
          "filename": "Patient.bru",
          "seq": 2,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}/patient/{{patientId}}",
            "method": "PUT",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "{\n  \"dateOfBirthYear\": \"1975\",\n  \"DateLastVisit\": \"2025-04-18\",\n  \"patientId\": {{patientId}},\n  \"isFirstSale\": true,\n  \"patientPDA\": true,\n  \"patientContact\": {\n    \"lastName\": \"DUPONT\",\n    \"firstNames\": \"JEAN\",\n    \"birthDate\": \"1975-01-01\",\n    \"gender\": \"MALE\",\n    \"address\": \"1, place Bellecour\",\n    \"address2\": \"\",\n    \"zipcode\": \"69002\",\n    \"city\": \"Lyon\",\n    \"birthLastName\": \"DUPONT\",\n    \"birthFirstNames\": \"JEAN PAUL JACQUES\",\n    \"birthPlace\": \"PARIS\",\n    \"phone\": \"0102030405\",\n    \"email\": \"jean.dupont@smart-rx.com\",\n    \"establishmentName\": \"\",\n    \"establishmentCode\": \"\",\n    \"patientRoom\": \"\"\n  },\n  \"patientSante\": {\n    \"ins\": \"175017500000000\",\n    \"oid\": \"\",\n    \"noSS\": \"175017500000000\"\n  }\n}",
              "formUrlEncoded": [],
              "multipartForm": [],
              "file": []
            },
            "script": {
              "req": "// Generate a random UUID\nconst patientId = bru.interpolate('{{$randomInt}}');\nbru.setVar(\"patientId\", patientId);\n"
            },
            "vars": {},
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        },
        {
          "type": "http",
          "name": "Prescription",
          "filename": "Prescription.bru",
          "seq": 3,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}/patient/{{patientId}}/prescription",
            "method": "POST",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "{\n  \"prescriptionId\": {{$randomInt}},\n  \"exchangeSante\": {\n    \"prescriptionBase64\": \"data:image/{{fileExtension}};base64,{{fileContent}}\",\n    \"prescriptionDate\": \"2025-04-18\"\n  }\n}",
              "formUrlEncoded": [],
              "multipartForm": [
                {
                  "type": "file",
                  "name": "",
                  "value": [
                    ""
                  ],
                  "enabled": true
                }
              ],
              "file": [
                {
                  "filePath": "",
                  "contentType": "",
                  "selected": false
                }
              ]
            },
            "script": {},
            "vars": {
              "req": [
                {
                  "name": "fileExtension",
                  "value": "png",
                  "enabled": true,
                  "local": false
                },
                {
                  "name": "fileContent",
                  "value": "XXX",
                  "enabled": true,
                  "local": false
                }
              ]
            },
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        },
        {
          "type": "http",
          "name": "Start",
          "filename": "Start.bru",
          "seq": 1,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}",
            "method": "PUT",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "{\n  \"pharmacyName\": \"Serveur LNE\",\n  \"operatorCode\": \"56\",\n  \"operatorContact\": {\n    \"lastName\": \"Snow\",\n    \"firstName\": \"Jon\"\n  }\n}",
              "formUrlEncoded": [],
              "multipartForm": [],
              "file": []
            },
            "script": {
              "req": "// Generate a random UUID\nconst saleUUID = bru.interpolate('{{$randomUUID}}');\nbru.setVar(\"saleUUID\", saleUUID);\n"
            },
            "vars": {},
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        },
        {
          "type": "http",
          "name": "Validation",
          "filename": "Validation.bru",
          "seq": 6,
          "settings": {
            "encodeUrl": true,
            "timeout": 0
          },
          "tags": [],
          "examples": [],
          "request": {
            "url": "{{host}}/pharmacies/{{finess}}/cart/{{saleUUID}}/validation",
            "method": "POST",
            "headers": [],
            "params": [],
            "body": {
              "mode": "json",
              "json": "{\n  \"saleNumber\": 2025041800339,\n  \"invoiceNumbe\": \"00000000000001\"\n}",
              "formUrlEncoded": [],
              "multipartForm": [],
              "file": []
            },
            "script": {},
            "vars": {},
            "assertions": [],
            "tests": "",
            "docs": "",
            "auth": {
              "mode": "inherit"
            }
          }
        }
      ]
    }
  ],
  "environments": [],
  "root": {
    "request": {
      "vars": {
        "req": [
          {
            "name": "finess",
            "value": "012345678",
            "enabled": true,
            "local": false,
            "uid": "K62y2SYjc1GVEZoZJJBiz"
          },
          {
            "name": "host",
            "value": "http://localhost:30401",
            "enabled": true,
            "local": false,
            "uid": "mkXOveOqM70sFklWQRTNz"
          }
        ]
      }
    }
  },
  "brunoConfig": {
    "version": "1",
    "name": "API Vente",
    "type": "collection",
    "ignore": [
      "node_modules",
      ".git"
    ],
    "size": 0.0039730072021484375,
    "filesCount": 9
  }
}