$kind: http-request
url: "{{csmisUrl}}/marketing/special-collected-weight"
method: POST
headers:
  cooperativeApiToken: sfordCOnDVDJXToZSQeJaYso5pPZhIXGHm8j/iORBiw=
body:
  type: json
  content: "{\r

    \  \"farmerUid\": \"ec265111-b667-43bc-a931-7590dcab8f86\",\r

    \  \"memberType\": \"MEMBER\",\r

    \  \"productUid\": \"0ed29404-5db9-4e58-b413-4676321f2467\",\r

    \  \"batchRef\": \"102030\",\r

    \  \"bags\": 1,\r

    \  \"buyerUid\": \"5df97e24-0894-474b-941f-660a981a9dbf\",\r

    \  \"moistureInPercent\": 12,\r

    \  \"grossWeight\": 200,\r

    \  \"packageWeight\": 10,\r

    \  \"netWeight\": 190,\r

    \  \"receiptNo\": \"1599902376_7272544\",\r

    \  \"receiptDate\": \"2023-06-07T10:14:00\",\r

    \  \"clerkName\": \"tangacooperative@admin\",\r

    \  \"warehouseUid\": \"172d48c3-2157-4174-8092-df4d1f400bfa\",\r

    \  \"gradeUid\": \"62603573-3dfd-47d0-8c28-4c3c8f2a723a\",\r

    \  \"isFinalCollection\": false,\r

    \  \"gradePriceUid\": \"d250c1d0-935e-4df3-8af3-6df2a28772e9\",\r

    \  \"collectionPhaseType\": \"FINAL\",\r

    \  \"referenceNumber\": \"108\"\r

    }"
scripts:
  - type: afterResponse
    code: >-
      pm.test("Response status code is 401", function () {
        pm.expect(pm.response.code).to.equal(401);
      });



      pm.test("Content-Type is application/json", function () {
          pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
      });



      pm.test("Verify that statusCode field is present in the response",
      function () {
          const responseData = pm.response.json();
          pm.expect(responseData).to.have.property('statusCode');
      });



      pm.test("Data field should be null", function () {
        const responseData = pm.response.json();
        pm.expect(responseData.data).to.be.null;
      });



      pm.test("Message field is an empty string", function () {
        const responseData = pm.response.json();
        pm.expect(responseData.message).to.be.an('string').and.to.be.empty;
      });
    language: text/javascript
order: 5000
