Making Requests
All API requests must be made over HTTPS and must include a valid Content-Type and Accept headers. Currently the only supported Content-Type and Accept headers are application/json
and application/xml
.
While your access token is valid, the token can be used to make authorized API requests by including it in the Authorization
header as a Bearer
token. See Authentication & Authorization for more details on how to obtain a bearer token.
POST /newrx HTTP/1.1
Authorization: Bearer wa-S061u5MPicct0wIASHYJzTHhRG922RYEt9MXoimk
Host: nectar.honeybeehealth.com
Content-Type: application/xml
Accept: application/xml
Receiving Responses
Response Formats
Nectar API responds to your requests according to the Accept
header passed.
HTTP/1.1 201 Created
Content-Type: application/xml;
Date: Fri, 05 Apr 2024 21:39:17 GMT
Content-Length: 735
<Message DatatypesVersion="20170715" TransportVersion="20170715" TransactionDomain="SCRIPT" TransactionVersion="20170715" StructuresVersion="20170715" ECLVersion="20170715">
...
</Message>
Request IDs
Each request received by our system will have an associated Request ID. This ID will be present in the X-Request-Id header returned in the response. We will use this Request ID to help troubleshoot support requests.
Status Codes
Status Code | Meaning | Description |
---|---|---|
200 | OK | The request was successful and the response body contains the representation requested. |
201 | Created | The request was successful, we created a new resource and the response body contains the representation. This should only appear for POST requests. |
204 | Updated | The request was successful, we updated the resource and the response body is empty. |
304 | Not Modified | The request was successful, we checked the provided If-None-Match header and there was no change from the last response. |
400 | Bad Request | The request was unacceptable, often due to syntax errors in request. |
401 | Unauthorized | The supplied credentials, if any, are not sufficient to access the resource. |
404 | Not Found | The request resource wasn't found. |
406 | Not Acceptable | The request resource is not capable of generating content requested in format of Accept header. |
415 | Unsupported Media Type | The request entity has a media type which the server or resource does not support. |
422 | Unprocessable Entity | The request was received but cannot be processed, often due to missing a required parameter. |
429 | Too Many Requests | Your application is sending too many requests too quickly, and you are reaching the rate limit of the Partner API. |
500 | Server Error | We couldn't return the representation due to an internal server error - this one is Honeybee Health's fault! |
503 | Service Unavailable | We are temporarily unable to return the representation. Please wait for a bit and try again. |