Assign Locations To User
Assign one or more pharmacy locations to an admin user, optionally setting a default location.
Overview
- Method: POST
- Path:
/pharmacy/location/assign-user-locations - Tags: pharmacy
Parameters
No parameters required.
Request Body
- Content Type:
application/json - Required: Yes
Fields
| Field | Type | Required | Details |
|---|---|---|---|
| userId | string | Yes | |
| locationIds | string | Yes | |
| defaultLocationId | string | No |
Responses
200
Successful response
Content Type: application/json
{
"userId": "string",
"assignedLocationIds": "string",
"defaultLocationId": "string",
"updated_at": "string"
}400
Bad Request
Content Type: application/json
{}401
Unauthorized
404
Not Found
500
Internal Server Error
Example Usage
curl -X POST \
https://api.pillexa.com/pharmacy/location/assign-user-locations \
-H "Content-Type: application/json" \
-d '{"example": "data"}'