Creates a new draft marketplace listing.
Draft Listings
Creates a new draft marketplace listing.
Accepts details for a third-party draft listing and creates a new draft record. Validates the selling pharmacy and ensures the user has permission to create the draft.
Validation Rules
| Field | Required | Type | Rules |
|---|---|---|---|
| NationalDrugCode | Yes | string | Must correspond to a real drug identifier |
| SellingPharmacyNpi | Yes | long | Must be a valid NPI |
| ExpirationDate | No | string | If provided, must be a valid future date in ISO 8601 format (e.g. “2025-12-31T00:00:00Z”) |
| LotNumber | No | string | If provided, must be a non-empty, non-whitespace string |
| Price | No | decimal | If provided, must be a positive number |
| FullPackage | No | bool | Affects Quantity validation when Quantity is provided |
| Quantity | No | decimal | If provided, must be positive. If FullPackage=true: must equal 1. If FullPackage=false: between 0.01 and the drug’s package size |
| SealedPackage | No | bool | - |
| OriginalPackage | Yes | bool | - |
| TornPackageLabel | No | bool | - |
| Gtin | No | string | If provided, must be a non-empty, non-whitespace string |
| SerialNumber | No | string | If provided, must be a non-empty, non-whitespace string |
| AdditionalPackageNotes | No | string | If provided, must be a non-empty, non-whitespace string |
| ShowOnlyInState | No | bool | Not returned in the response. Instead, stateGroupId is returned: if showOnlyInState = true, stateGroupId will have a GUID value; if false, stateGroupId will be null |
POST
Creates a new draft marketplace listing.
Authorizations
Custom API Key authentication. Default header: X-INVIEW-AUTH.
Body
The model containing details of the draft listing to create.
Response
Created