POST api/Medications

Request Information

URI Parameters

None.

Body Parameters

Medication
NameDescriptionTypeAdditional information
MED_ID

integer

None.

GENERIC_NAME

string

None.

DIV_ID

integer

None.

OLD

integer

None.

brands

Collection of MedicationBrand

None.

Request Formats

application/json, text/json

Sample:
{
  "MED_ID": 1,
  "GENERIC_NAME": "sample string 2",
  "DIV_ID": 3,
  "OLD": 1,
  "brands": [
    {
      "ID": 1,
      "BRAND_NAME": "sample string 2",
      "MED_ID": 3,
      "SIZE": "sample string 4",
      "UNIT": "sample string 5",
      "FORM": "sample string 6",
      "ROUTE": "sample string 7",
      "OLD": 1
    },
    {
      "ID": 1,
      "BRAND_NAME": "sample string 2",
      "MED_ID": 3,
      "SIZE": "sample string 4",
      "UNIT": "sample string 5",
      "FORM": "sample string 6",
      "ROUTE": "sample string 7",
      "OLD": 1
    }
  ]
}

application/octet-stream

Sample:
{"MED_ID":1,"GENERIC_NAME":"sample string 2","DIV_ID":3,"OLD":1,"brands":[{"ID":1,"BRAND_NAME":"sample string 2","MED_ID":3,"SIZE":"sample string 4","UNIT":"sample string 5","FORM":"sample string 6","ROUTE":"sample string 7","OLD":1},{"ID":1,"BRAND_NAME":"sample string 2","MED_ID":3,"SIZE":"sample string 4","UNIT":"sample string 5","FORM":"sample string 6","ROUTE":"sample string 7","OLD":1}]}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'Medication'.

Response Information

Resource Description

Medication
NameDescriptionTypeAdditional information
MED_ID

integer

None.

GENERIC_NAME

string

None.

DIV_ID

integer

None.

OLD

integer

None.

brands

Collection of MedicationBrand

None.

Response Formats

application/json, text/json

Sample:
{
  "MED_ID": 1,
  "GENERIC_NAME": "sample string 2",
  "DIV_ID": 3,
  "OLD": 1,
  "brands": [
    {
      "ID": 1,
      "BRAND_NAME": "sample string 2",
      "MED_ID": 3,
      "SIZE": "sample string 4",
      "UNIT": "sample string 5",
      "FORM": "sample string 6",
      "ROUTE": "sample string 7",
      "OLD": 1
    },
    {
      "ID": 1,
      "BRAND_NAME": "sample string 2",
      "MED_ID": 3,
      "SIZE": "sample string 4",
      "UNIT": "sample string 5",
      "FORM": "sample string 6",
      "ROUTE": "sample string 7",
      "OLD": 1
    }
  ]
}

application/octet-stream

Sample:
{"MED_ID":1,"GENERIC_NAME":"sample string 2","DIV_ID":3,"OLD":1,"brands":[{"ID":1,"BRAND_NAME":"sample string 2","MED_ID":3,"SIZE":"sample string 4","UNIT":"sample string 5","FORM":"sample string 6","ROUTE":"sample string 7","OLD":1},{"ID":1,"BRAND_NAME":"sample string 2","MED_ID":3,"SIZE":"sample string 4","UNIT":"sample string 5","FORM":"sample string 6","ROUTE":"sample string 7","OLD":1}]}