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

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

const order = await client.orders.create({
  paymentMethod: 'self-pay',
  person: {
    city: 'x',
    dob: '7321-69-10',
    email: 'email',
    firstName: 'x',
    lastName: 'x',
    phone: '+)() 92))()1)',
    state: 'xx',
    street: 'x',
    zipcode: '73216-0225',
  },
  providerId: 'providerId',
  services: [{ _id: 'x', quantity: 1 }],
});

console.log(order);
{
  "success": true,
  "orderId": "<string>",
  "orderNumber": "<string>",
  "selfPay": true,
  "hostedInvoiceUrl": "<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>"

Body

application/json
  • Option 1
  • Option 2
  • Option 3
  • Option 4
services
object[]
required
Required array length: 1 - 50 elements
providerId
string
required
Maximum length: 200
person
object
required
paymentMethod
enum<string>
required
Available options:
self-pay,
employer-sponsored
_id
string
Maximum length: 200
employeeId
string
Maximum length: 200
employerId
string
Maximum length: 200
tokenId
string
Maximum length: 200
reCaptchaToken
string
Maximum length: 2000
quantities
object
servicesIds
string[]
Maximum length: 50
providersIds
object[]
Maximum length: 50
dueDates
string<date-time>[]
Maximum length: 50
dueDate
string<date-time>
brandId
string
Maximum length: 200
providerCreated
boolean
employeeIds
string[]
Maximum length: 1000
metadata
object

Optional arbitrary metadata (<=10KB when JSON stringified)

Response

Default Response

  • Option 1
  • Option 2
success
boolean
required
orderId
string
required
orderNumber
string
required
selfPay
boolean
hostedInvoiceUrl
string<uri>
message
string
I