Brand
Medications
Upload Compounds

Upload Compounds

Upload a CSV of compounds for the specified product variant. CSV should contain columns like name, description, dosage, instructions.

Overview

  • Method: POST
  • Path: /brand/medications/upload-compounds/<productVariantId>
  • Tags: brand

Parameters

productVariantId (path)

  • Type: string
  • Required: Yes
  • Description: productVariantId parameter

Request Body

  • Content Type: application/json
  • Required: Yes

Fields

FieldTypeRequiredDetails
csvstringYes

Responses

200

Successful response

Content Type: application/json

{
  "message": "string",
  "inserted": 123,
  "updated": 123,
  "skipped": 123
}

400

Bad Request

Content Type: application/json

{
  "error": "string",
  "details": [
    {}
  ]
}

401

Unauthorized

404

Not Found

500

Internal Server Error

Example Usage

curl -X POST \
  https://api.pillexa.com/brand/medications/upload-compounds/<productVariantId> \
  -H "Content-Type: application/json" \
  -d '{"example": "data"}'