Skip to main content
POST
/
v1
/
orders
/
send
JavaScript
import BlueHive from '@bluehive/sdk';

const client = new BlueHive({
  apiKey: 'My API Key',
});

const response = await client.orders.sendForEmployee({
  employeeId: 'employeeId',
  employerId: 'employerId',
  providersIds: [{ providerId: 'providerId' }],
  servicesIds: ['string'],
  'login-token': 'login-token',
  'user-id': 'user-id',
});

console.log(response);
{
  "success": true,
  "orderId": "<string>",
  "orderNumber": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key for accessing BlueHive API endpoints. Format: "ApiKey <your-api-key>" or "Bearer <your-api-key>"

Headers

authorization
string
required

Bearer <API_KEY>

login-token
string
required

User login token

user-id
string
required

User ID

Body

application/json
employeeId
string
required

Employee ID to send order to

employerId
string
required

Employer ID sending the order

servicesIds
string[]
required

Array of service IDs to include in the order

providersIds
object[]
required

Array mapping each service (by index) to a provider; serviceId optional

quantities
object

Service ID to quantity mapping

providerId
string

Single provider ID (shortcut when all services map to one provider)

brandId
string

Brand ID for branded orders

dueDate
string

Due date for the order (date or date-time ISO string)

dueDates
string[]

Array of due dates per service

providerCreated
boolean

Whether this order is being created by a provider (affects permission checking)

metadata
object

Optional arbitrary metadata to store on the order (non-indexed passthrough, <=10KB when JSON stringified)

Response

  • Option 1
  • Option 2

Order sent successfully (single or split)

success
boolean
required
orderId
string
required
orderNumber
string
required
message
string
I