Create a marketplace listing
Marketplace Listings
Create a marketplace listing
Provides an endpoint for creating a new marketplace listing on InStockRx. Validates the pharmacy based on the provided NPI and token claims, then creates the listing if authorized.
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 | Yes | string | Must be a valid future date in ISO 8601 format (e.g. “2025-12-31T00:00:00Z”) |
| LotNumber | Yes | string | Non-empty string |
| Gtin | Yes | string | Non-empty string |
| SerialNumber | Yes | string | Non-empty string |
| Price | Yes | decimal | Must be a positive number |
| FullPackage | Yes | bool | Affects Quantity validation |
| Quantity | Yes | decimal | Must be positive. If FullPackage=true: must be a whole number equal to 1. If FullPackage=false: between 0.01 and the drug’s package size |
| SealedPackage | Yes | bool | - |
| DscsaCertified | Yes | bool | Must be true. Attests that the seller is authorized to sell under the DSCSA |
| OriginalPackage | Yes | bool | - |
| TornPackageLabel | Yes | bool | - |
| 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
Create a marketplace listing
Authorizations
Custom API Key authentication. Default header: X-INVIEW-AUTH.
Body
The request model containing details of the listing to create.
Response
Created
Available options:
1, 2, 3, 4, 5 Available options:
0, 1, 2, 5, 6, 7, 10 Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9