Upload products to inventory v1 (DEPRECATED)
This endpoint is deprecated. We recommend using v2
As we said earlier, every product must be associated to an inventory.
In order to upload a list of products to a specific inventory we must do a POST request to the inventories
resource with the inventory id, the api key as query parameter and a list of products as body.
NOTE: this is an idempotent call. This will replace the entire inventory!
Request Payload
{
"name": "Atorvastatin",
"expirationDate": "2022-01-31T00:00:00-06:00",
"description": "90 TABLET, FILM COATED in 1 BOTTLE (0071-0157-23)",
"lotNumber": "lot-2",
"manufacturer": "Pharma Company 123",
"minimumQuantity": 10,
"ndc": "0071-0157-23",
"price": 90.0,
"units": 20,
"type": "drug",
"productId": "123"
}
Calling the Endpoint
curl -X POST -d '[{ "name": "Atorvastatin", "expirationDate": "2022-01-31T00:00:00-06:00", "description": "90 TABLET, FILM COATED in 1 BOTTLE (0071-0157-23)", "lotNumber": "lot2", "manufacturer": "Pharma Company 123", "minimumQuantity": 10, "ndc": "0071-0157-23", "price": "90.00", "units": 20, "type": "drug", "productId": "123" }]' https://services.rxrise.com/api/v1/inventories/1
If the request is successful the endpoint will return the exact same list of products and a 201 status code.
Error list
These are the errors returned by this endpoint:
Code | Message | Reason |
---|---|---|
403 | Forbidden | You Don't Have Permission |
404 | Not Found | Inventory Not Found |
500 | Internal Server Error | Service Not Available |