openapi: 3.0.0
info:
  title: Honeybee Health Partners API
  version: v1
  contact: {}
  description: >
    Welcome to the Honeybee Health Partner API Documentation


    # Introduction

    Honeybee Health Partner API is a modern, RESTful API-driven Pharmacy as a

    Service. The Honeybee Health Partner API uses resource-oriented URLs,

    supports HTTPS transport and OAuth 2.0 authentication and leverages JSON in

    all responses.



    This documentation provides a reference on how to integrate with Honeybee

    Health's Partner API.  This API allows for partners to manage and get data

    on prescriptions and orders.


    ## Authentication

    Honeybee Health Partner API utilizes OAuth 2.0 for authenticating requests.

    OAuth2.0 is an open protocol to allow secure AuthN in a simple and standards

    based method.


    ```

    Security Scheme Type: OAuth2

    Flow type: clientCredentials

    Token URL: https://auth.honeybeehealth.com/oauth/token

    ```


    Requests made to the Partners API must be authenticated. This API

    supports OAuth 2.0 authentication using the client credentials grant flow to

    facilitate the intended use case of server to server communication.


    Honeybee Health will provide you with a client_id and client_secret. You
    will

    use these to authenticate and obtain an auth token which acts as an API key
    of sorts

    to make requests with.


    ### Obtaining an access token

    #### Authorization Request

    Make a POST request to the /oauth/token endpoint using HTTP Basic

    authentication to validate your credentials and obtain an auth token.


    You may also pass the credentials in the application/x-www-form-urlencoded

    encoded message body.


    ```

    POST /oauth/token HTTP/1.1

    Host: auth.honeybeehealth.com

    Content-Type: application/x-www-form-urlencoded;charset=utf-8


    grant_type=client_credentials&client_id=PAE_tecHj8ib_0F7cXuq55emEdasKPJcgV3PE3Gd56Y&client_secret=jXA3jNpRnGIfE7xXONDgH8chCJZgLi8bGOIJYuVvKe0

    ```


    #### Access Token Response

    ```

    HTTP/1.1 200 OK

    Content-Type: application/json;charset=utf-8

    Cache-Control: no-store

    Pragma: no-cache


    {
      "access_token": "xxxxxxxxxxxxxxx",
      "token_type": "Bearer",
      "expires_in": 43200,
      "created_at": 1592972935
    }

    ```


    ## Webhook Security


    Webhooks will include an X-Honeybee-Signature header that can be used to

    validate that the request was in fact made by Honeybee Health.


    The signature is constructed by concatenating the request method, i.e. POST,

    with the url of the webhook and the payload; url encoded. We will then sign

    this string with HMAC-SHA1 using your client_secret and finally base64

    encoding the result with a newline character.


    A pseudo-code representation of this looks like:

    ```

    base = escape(request.method + request.url + string(request.body))

    key = sha256_hex_digest(your_client_secret)

    X-Honeybee-Signature = base64_encode(hmac_sha1_digest(key, base) + "\n")

    ```


    Webhooks will also include an X-Honeybee-Secret header that can be used to

    validate that the request was made by Honeybee Health.


    The secret is constructed by signing a partner-supplied secret

    with HMAC-SHA1 using your client_secret and finally base64

    encoding the result with a newline character.


    A pseudo-code representation of this looks like:

    ```

    key = sha256_hex_digest(your_client_secret)

    X-Honeybee-Secret = base64_encode(hmac_sha1_digest(key, your_webhook_secret)
    + "\n")

    ```


    Examples for generating `sha256_hex_digest` in common

    languages:

    ##### Ruby

    ```ruby

    Digest::SHA256.hexdigest('your_client_secret')

    ```


    ##### Node

    ```node

    const crypto = require('crypto')

    crypto.createHash('sha256').update('your_client_secret').digest('hex')

    ```


    ##### Python

    ```python

    import hashlib

    hashlib.sha256('your_client_secret'.encode('utf-8')).hexdigest()

    ```


    ##### Go

    ```go

    package main


    import (
      "crypto/sha256"
      "encoding/hex"
      "fmt"
    )


    func main() {
      hash := sha256.New()
      hash.Write([]byte("your_client_secret"))
      sha256_hash := hex.EncodeToString(hash.Sum(nil))
    }

    ```


    The same steps can be performed on the receiving end to validate the
    signature.


    ## Making Requests

    All API requests must be made over HTTPS and must include a valid Accept

    header. Current the only supported Accept header is `application/json`.


    While your access token is valid, it can be used to authenticate requests

    by using it in the `Authorization Bearer` header.

    ```

    GET /v1/patients/:patient_id/rx HTTP/1.1

    Authorization: Bearer wa-S061u5MPicct0wIASHYJzTHhRG922RYEt9MXoimk

    Host: partner-server.domain.com

    Accept: application/json

    Cache-Control: no-cache

    ```


    ## Receiving Responses

    ### Response Formats

    Honeybee Health's Partner API responds to your requests using JSON.
    Currently,

    this is the only supported format.


    ```

    HTTP/1.1 200 OK

    Content-Type: application/json; charset=utf-8

    Cache-Control: max-age=0, private, must-revalidate

    X-Request-Id: 81350852-051d-4b90-8a21-a8b2636e8107

    X-Honeybee-Signature: Y0wIASHYJzTHhRG922RYEt9MX


    {
      "medication_request": {
        ...
      }
    }

    ```

    ### 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 any errors on our end.


    ## 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 not change from the last
    response. |

    | 400         | Bad Request         | The request was unacceptable, often
    due 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. |

    | 409         | Conflict            | The request conflicts with another
    recent request associated with the same resource. |

    | 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. |


    ## Caching

    In each response we include an `ETag` header which can be used to check if

    your cache is fresh. The `ETag` value we generate is weak, meaning only the

    response object is validated.


    You can cache the response object along with the `Etag` value. When checking

    for cache freshness you can provide the last `ETag` value in an
    `If-None-Match`

    header and we will return a `304 Not Modified` response if there's no change

    or return a `200 OK` along with the updated response object if there is a
    change.



    # Workflows


    Honeybee supports multiple workflows and will work with partners to help

    them select the best one for their needs. Honeybee’s goal is always to make

    sure patients are happy and well taken care of, while supporting an

    efficient and simple workflow for our partners.



    ## Automatic Processing


    This is the fastest way to get integrated.


    The Automatic Processing workflow is the fastest way to get integrated.


    When Honeybee receives an e-Prescription; patient, shipping, medication and

    prescriber data is extracted and an order is automatically created and the

    filling/verification process begins. Orders can be viewed on the Order
    Dashboard.


    With the Automatic Processing workflow, partners still have the option of
    adding

    a webhook URL where Honeybee Health can send updates for orders and
    shipments.

    Please see the Events documentation for more information.


    #### 1) Honeybee Health receives Partner prescription and creates order
    automatically

    ![Automatic Order Creation](auto-order-creation.jpeg)


    #### 2) Subsequent events throughout the lifecycle of an order will trigger
    additional webhooks.

    ![Order Lifecycle Webhooks](webhooks.jpeg)



    ## API Driven (Partner Requested Fills)


    To gain more control over when a prescription is filled, the Partner

    Requested Fills workflow can intake e-Prescriptions without creating an

    order automatically.



    A typical use case for this workflow is creating a fill

    request after payment processing is completed.



    An API call to POST /orders is used to create a fill request (order)

    against a prescription.


    #### 1) Honeybee Health receives Partner prescription

    ![Receive Prescription](receive-prescription.jpeg)


    #### 2) Partner uses the patient API endpoint to help match patient from
    `RX_RECEIVED` webhook.

    ![Get Patient](get-patient.jpeg)


    #### 3) Partner uses the create order API endpoint to create the order.

    ![Create Order](post-order.jpeg)


    #### 4) Subsequent events throughout the lifecycle of an order will trigger
    additional webhooks.

    ![Order Lifecycle Webhooks](webhooks.jpeg)


    # Order Exceptions


    When an order is "On Hold", there will always be an exception reason
    present, detailing the context behind why the order is currently on hold.

    For partners subscribed to webhook events, expect to receive an [Order
    Exception Raised](order-exception-raised) webhook detailing the exception

    and an array of `order_actions` available to resolve the exception. Please
    see list of possible order exception reasons below.


    ## Order Exception Reasons

    | Exception ID | Exception Name                                             
    | Description |

    | ------------ | -----------------------------------------------------------
    | ----------- |

    | 64           | Partner Hold                                               
    | Partner placed this order on hold |

    | 65           | Missing Email                                              
    | Email needs to be updated for the patient |

    | 66           | Missing Shipping Address                                   
    | Shipping address needs to be added to the order |

    | 67           | State Invalid (we don’t ship to this state for this drug)  
    | State needs to be updated on the order |

    | 68           | Duplicate Order                                            
    | Order is suspected of being duplicated |

    | 69           | Sig Requires Clarification                                 
    | Sig needs to be updated and a new script needs to be sent |

    | 70           | DAW Confirmation Required                                  
    | DAW confirmation is required |

    | 71           | DOB Verification Required                                  
    | DOB must be re-verified |

    | 72           | Qty Verification Required                                  
    | Quantity must be verified |

    | 73           | Missing Rx                                                 
    | The Rx is missing for some items in the order |

    | 74           | Allergy Detected                                           
    | Allergies to a drug in the order are detected |

    | 75           | Drug Interaction Found                                     
    | A drug interaction was found |

    | 76           | Inventory Delayed                                          
    | Some items in your order have delays with their inventory |

    | 77           | Address Invalid                                            
    | The address on the order is not valid |

    | 78           | Missing Address Unit Number                                
    | The address on the order requires an apartment number |

    | 79           | “Ship to” Name Truncated                                   
    | “Ship to” name exceeds max character limit |

    | 80           | Payment Declined                                           
    | Payment was declined (Only applies to orders paid by patient) |
  x-logo:
    url: 'https://cdn.honeybeehealth.com/partners/dark.svg'
servers:
  - url: 'https://partners.honeybeehealth.com/v1'
security:
  - OAuth2: []
tags:
  - name: Account
    description: >-
      Retrieve relevant account information pertaining to the account currently
      using the API
  - name: Patients
    description: >-
      Retrieve patient data points such as medication requests and medication
      dispenses
  - name: Orders
    description: Retrieve order data points such as order number and totals
  - name: Products
    description: Retrieve product and pricing related information
  - name: Shipping Methods
    description: Retrieve a list of available shipping methods to filter orders by
  - name: Events
    description: >
      Events trigger POST requests to send back to your registered webhooks. See
      the **[Workflows](honeybee-health-partners-api#automatic-processing)**
      section for which events are triggered for a particular workflow. Your
      application can verify that Honeybee Health sent the event using the
      **X-Honeybee-Signature** or **X-Honeybee-Secret** header. More information
      in: **[Webhook Security](honeybee-health-partners-api#webhook-security)**


      Supported events: ![Events](events.jpeg)
  - name: Sandbox
    description: >
      The sandbox environment allows you to perform API level testing of
      endpoints before going live


      Base URL: `https://partners.sandbox.honeybeehealth.com/v1`
paths:
  /account:
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
    get:
      summary: Get Account Information
      tags:
        - Account
      operationId: get-account-information
      description: Get account information for the current authenticated account
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: &ref_0
              description: Unique ID generated to track each HTTP request sent
              schema:
                type: string
                format: uuid
              example: f4c93531-bf4f-438e-b2ce-1dcff5e7ad97
            X-Honeybee-Signature: &ref_1
              description: 'Base64 encoded HMAC-SHA1 hash of method, url and body'
              schema:
                type: string
              example: Jzk2+9Pi6UIH/0PvGaq8CKZccwMK
            ETag: &ref_2
              description: Entity Tag used to verify cached response object
              schema:
                type: string
              example: W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
          content:
            application/json:
              schema: &ref_45
                title: Account
                type: object
                x-examples: {}
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Your Account ID
                  name:
                    type: string
                    description: Your Account Name
                  brands:
                    type: array
                    items: &ref_47
                      title: Brand
                      type: object
                      x-examples: &ref_15 {}
                      properties: &ref_16
                        id:
                          type: string
                          format: uuid
                          description: The Brand ID
                        name:
                          type: string
                          description: The Brand Name
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/account \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/account",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://partners.honeybeehealth.com/v1/account")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Accept"] = 'SOME_STRING_VALUE'
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")

            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v1/account", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/account")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/account\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}':
    parameters:
      - &ref_6
        name: Accept
        in: header
        description: What kind of response is expected from the server
        required: true
        schema:
          type: string
          enum:
            - application/json
      - &ref_7
        name: Authorization
        in: header
        description: Bearer Token
        required: true
        schema:
          type: string
      - name: patient_id
        in: path
        description: Partner Patient ID
        required: true
        schema:
          type: string
    get:
      summary: Get Patient Info
      tags:
        - Patients
      operationId: get-patient
      description: Retrieve patient info
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: &ref_3
                title: Patient
                x-examples: &ref_22 {}
                type: object
                example: &ref_23
                  first_name: Ryan
                  last_name: Reid
                  dob: '1980-03-11'
                  gender: Male
                  email: example@gmail.com
                  phone: '3478343341'
                  patient_id: abc123
                  patient_safety:
                    medications: []
                    health_conditions: []
                    allergies: []
                  addresses:
                    - id: 1
                      first_name: Ryan
                      last_name: Reid
                      phone: '3478343341'
                      street1: 1000 Broadway St
                      street2: Apt 809
                      city: Philadelphia
                      state: PA
                      zip: '19019'
                      default: true
                properties: &ref_24
                  first_name:
                    type: string
                    description: The first name of the patient
                  last_name:
                    type: string
                    description: The last name of the patient
                  dob:
                    type: string
                    format: date
                    description: The DoB of the patient
                  gender:
                    type: string
                    pattern: ^M|F|N$
                    description: The gender of the patient
                  email:
                    type: string
                    description: The email of the patient
                  phone:
                    type: string
                    pattern: '^\d{10}$'
                    description: The phone number of the patient
                  patient_id:
                    type: string
                    description: >-
                      Optional patient id (patient_reference_number). Required
                      for `partner_requested_fills` workflow.
                  patient_safety: &ref_12
                    title: Patient Safety
                    x-examples: {}
                    type: object
                    required:
                      - medications
                      - health_conditions
                      - allergies
                    properties:
                      medications:
                        type: array
                        example:
                          - Ibuprofen
                          - Advil
                        items:
                          type: string
                          description: An array of medications the patient is taking
                      health_conditions:
                        type: array
                        example:
                          - Dust
                          - Pollen
                        items:
                          type: string
                          description: An array of health conditions the patient has
                      allergies:
                        type: array
                        example:
                          - Penicillin
                        items:
                          type: string
                          description: An array of allergies the patient has
                  addresses:
                    type: array
                    items: &ref_8
                      title: Address
                      x-examples: &ref_25 {}
                      example: &ref_26
                        id: 123
                        first_name: Sotiria
                        last_name: Alla
                        phone: '7422937793'
                        street1: 1 W. Carriage Street
                        street2: '#25'
                        city: Minneapolis
                        state: MN
                        zip: '55406'
                        default: true
                      type: object
                      properties: &ref_27
                        id:
                          type: integer
                          description: The ID of the address
                        first_name:
                          type: string
                          description: The first name for the address
                        last_name:
                          type: string
                          description: The last name for the address
                        phone:
                          type: string
                          description: The phone for the address
                        street1:
                          type: string
                          description: The street address for the order's shipping address
                        street2:
                          type: string
                          description: >-
                            The apartment number for the order's shipping
                            address
                        city:
                          type: string
                          description: The city for the order's shipping address
                        state:
                          type: string
                          description: The state for the order's shipping address
                        zip:
                          type: string
                          description: The zip for the order's shipping address
                        default:
                          type: boolean
                          description: Make this the patient's default shipping address
        '404':
          description: Not Found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v1/patients/%7Bpatient_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    put:
      summary: Update Patient
      tags:
        - Patients
      operationId: update-patient
      description: Update patient
      requestBody:
        required: true
        content:
          application/json:
            schema: &ref_69
              title: Patient Update Body
              x-examples: {}
              type: object
              properties:
                email:
                  type: string
                  description: The patient's email
                  example: test@gmail.com
                phone:
                  type: integer
                  description: The patient's phone number
                  example: 5425678822
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_3
        '404':
          description: Not Found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: &ref_13
                title: ConflictingRequestError
                type: object
                x-examples: {}
                required:
                  - error
                properties:
                  error:
                    type: object
                    properties:
                      error_code:
                        type: integer
                        example: 409
                      message:
                        type: string
                        example: >-
                          Your request is conflicting with another recent
                          request. Please make sure this request is not a
                          duplicate and resend.
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"email":"test@gmail.com","phone":5425678822}'
        - lang: Node
          source: >-
            const http = require("https");


            const options = {
              "method": "PUT",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({email: 'test@gmail.com', phone:
            5425678822}));

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Put.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"email\":\"test@gmail.com\",\"phone\":5425678822}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload = "{\"email\":\"test@gmail.com\",\"phone\":5425678822}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT", "/v1/patients/%7Bpatient_id%7D", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.put("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"email\":\"test@gmail.com\",\"phone\":5425678822}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D\"\n\n\tpayload := strings.NewReader(\"{\\\"email\\\":\\\"test@gmail.com\\\",\\\"phone\\\":5425678822}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/identity_documents':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - schema:
          type: string
        name: patient_id
        in: path
        required: true
        description: Partner Patient ID
    get:
      summary: Get All Patient Identity Documents
      tags:
        - Patients
      operationId: get-patient-identity-documents
      description: Retrieve all identity documents for a patient
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  identity_documents:
                    type: array
                    items: &ref_4
                      title: IdentityDocument
                      type: object
                      required:
                        - id
                        - document_number
                        - document_type
                      properties:
                        id:
                          type: string
                          format: UUID
                          description: The identity document ID
                        document_number:
                          type: string
                          description: The plaintext value document number
                        document_type:
                          type: string
                          description: >-
                            The two letter code associated with the type of
                            document (DL - Driver's License, MI - Military ID,
                            OT - Other, PP - Passport, PR - Permanent Resident
                            Card, SI - State Issued ID, TI - Tribal ID)
                          enum:
                            - DL
                            - MI
                            - OT
                            - PP
                            - PR
                            - SI
                            - TI
                        issuing_state:
                          type: string
                          format: 'ISO 3166-2:US state code'
                          description: >-
                            The state code associated with the state that issued
                            the document
                        issuing_country:
                          type: string
                          format: ISO 3166 alpha-2 country code
                          description: >-
                            The country code associated with the country that
                            issued the document
                        expiration_date:
                          type: string
                          nullable: true
                          example: '2030-06-12'
                          description: >-
                            The expiration date of the document formatted as
                            YYYY-MM-DD - Optional
        '404':
          description: patient_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/identity_documents",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET",
            "/v1/patients/%7Bpatient_id%7D/identity_documents", headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    post:
      summary: Create a new Identity Document for a Patient
      tags:
        - Patients
      operationId: create-patient-identity-document
      description: Create identity document for a patient
      requestBody:
        content:
          application/json:
            schema: &ref_17
              title: CreateIdentityDocumentRequest
              type: object
              required:
                - document_number
                - document_type
                - issuing_country
              example:
                document_number: '1234567890'
                document_type: PP
                issuing_state: PA
                issuing_country: US
                expiration_date: '2030-06-12'
              properties:
                document_number:
                  type: string
                  description: The plaintext value document number
                document_type:
                  type: string
                  description: >-
                    The two letter code associated with the type of document (DL
                    - Driver's License, MI - Military ID, OT - Other, PP -
                    Passport, PR - Permanent Resident Card, SI - State Issued
                    ID, TI - Tribal ID)
                  enum:
                    - DL
                    - MI
                    - OT
                    - PP
                    - PR
                    - SI
                    - TI
                issuing_state:
                  type: string
                  format: 'ISO 3166-2:US state code'
                  description: >-
                    The state code associated with the state that issued the
                    document
                issuing_country:
                  type: string
                  format: ISO 3166 alpha-2 country code
                  description: >-
                    The country code associated with the country that issued the
                    document
                expiration_date:
                  type: string
                  format: date
                  description: >-
                    The expiration date of the document formatted as YYYY-MM-DD
                    - Optional
      responses:
        '201':
          description: Created
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_4
        '404':
          description: patient_id not found
        '422':
          description: >
            #Invalid Request

            ## Error Codes

            | Status Code | Meaning                          | Description |

            | ----------- | -------------------------------- | ----------- |

            | 42216       | Invalid Document Type            | The provided
            document type was invalid. Must be either 'DL', 'PP', 'MI', 'PR',
            'SI', 'TI', 'OT'. |

            | 42217       | Invalid Issuing Country          | The provided
            issuing country was invalid. Must be 2-character country code. |

            | 42218       | Invalid Issuing State            | The provided
            state was invalid. Must be 2-character state code. |

            | 42219       | Invalid Document Number          | The provided
            document number was missing. |

            | 42220       | Invalid Document Expiration Date | The provided
            expiration date was in the past or malformed. Must be formatted
            'YYYY-MM-DD'. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: &ref_5
                title: Error
                type: object
                x-examples: {}
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items: &ref_81
                      title: DetailedError
                      type: object
                      description: >-
                        An individual error object with a code, message, and
                        error_detail
                      required: &ref_35
                        - code
                        - message
                        - error_detail
                      properties: &ref_36
                        code:
                          type: integer
                          example: 422**
                        message:
                          type: string
                          example: error message
                        error_detail:
                          type: array
                          items:
                            type: object
                            properties:
                              field:
                                type: string
                                example: example_field
                              message:
                                type: string
                                example: this field is invalid
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"document_number":"1234567890","document_type":"PP","issuing_state":"PA","issuing_country":"US","expiration_date":"2030-06-12"}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/identity_documents",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              document_number: '1234567890',
              document_type: 'PP',
              issuing_state: 'PA',
              issuing_country: 'US',
              expiration_date: '2030-06-12'
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST",
            "/v1/patients/%7Bpatient_id%7D/identity_documents", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents\"\n\n\tpayload := strings.NewReader(\"{\\\"document_number\\\":\\\"1234567890\\\",\\\"document_type\\\":\\\"PP\\\",\\\"issuing_state\\\":\\\"PA\\\",\\\"issuing_country\\\":\\\"US\\\",\\\"expiration_date\\\":\\\"2030-06-12\\\"}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/identity_documents/{document_id}':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - schema:
          type: string
        name: patient_id
        in: path
        required: true
        description: Partner Patient ID
      - schema:
          type: string
        name: document_id
        in: path
        required: true
        description: Identity Document UUID
    get:
      summary: Get Patient Identity Documents By ID
      tags:
        - Patients
      operationId: get-patient-identity-document
      description: Retrieve single identity document for a patient
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_4
        '404':
          description: patient_id/document_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET",
            "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    patch:
      summary: Update an Identity Document for a Patient
      tags:
        - Patients
      operationId: update-patient-identity-document
      description: Update identity document for a patient
      requestBody:
        content:
          application/json:
            schema: &ref_74
              title: UpdateIdentityDocumentRequest
              type: object
              required:
                - document_type
                - issuing_country
              example:
                document_number: '1234567890'
                document_type: PP
                issuing_state: PA
                issuing_country: US
                expiration_date: '2030-06-12'
              properties:
                document_number:
                  type: string
                  description: The plaintext value document number
                document_type:
                  type: string
                  description: >-
                    The two letter code associated with the type of document (DL
                    - Driver's License, MI - Military ID, OT - Other, PP -
                    Passport, PR - Permanent Resident Card, SI - State Issued
                    ID, TI - Tribal ID)
                  enum:
                    - DL
                    - MI
                    - OT
                    - PP
                    - PR
                    - SI
                    - TI
                issuing_state:
                  type: string
                  format: 'ISO 3166-2:US state code'
                  description: >-
                    The state code associated with the state that issued the
                    document
                issuing_country:
                  type: string
                  format: ISO 3166 alpha-2 country code
                  description: >-
                    The country code associated with the country that issued the
                    document
                expiration_date:
                  type: string
                  format: date
                  description: >-
                    The expiration date of the document formatted as YYYY-MM-DD
                    - Optional
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_4
        '404':
          description: patient_id/document_id not found
        '422':
          description: >
            #Invalid Request

            ## Error Codes

            | Status Code | Meaning                          | Description |

            | ----------- | -------------------------------- | ----------- |

            | 42216       | Invalid Document Type            | The provided
            document type was invalid. Must be either 'DL', 'PP', 'MI', 'PR',
            'SI', 'TI', 'OT'. |

            | 42217       | Invalid Issuing Country          | The provided
            issuing country was invalid. Must be 2-character country code. |

            | 42218       | Invalid Issuing State            | The provided
            state was invalid. Must be 2-character state code. |

            | 42220       | Invalid Document Expiration Date | The provided
            expiration date was in the past or malformed. Must be formatted
            'YYYY-MM-DD'. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"document_number":"1234567890","document_type":"PP","issuing_state":"PA","issuing_country":"US","expiration_date":"2030-06-12"}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "PATCH",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              document_number: '1234567890',
              document_type: 'PP',
              issuing_state: 'PA',
              issuing_country: 'US',
              expiration_date: '2030-06-12'
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Patch.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PATCH",
            "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.patch("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"document_number\":\"1234567890\",\"document_type\":\"PP\",\"issuing_state\":\"PA\",\"issuing_country\":\"US\",\"expiration_date\":\"2030-06-12\"}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D\"\n\n\tpayload := strings.NewReader(\"{\\\"document_number\\\":\\\"1234567890\\\",\\\"document_type\\\":\\\"PP\\\",\\\"issuing_state\\\":\\\"PA\\\",\\\"issuing_country\\\":\\\"US\\\",\\\"expiration_date\\\":\\\"2030-06-12\\\"}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    delete:
      summary: Delete an Identity Document for a Patient
      tags:
        - Patients
      operationId: delete-patient-identity-document
      description: Delete identity document for a patient
      responses:
        '204':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
        '404':
          description: patient_id/document_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request DELETE \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Delete.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE",
            "/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/identity_documents/%7Bdocument_id%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/rx':
    parameters:
      - *ref_6
      - *ref_7
      - name: patient_id
        description: Partner Patient ID
        in: path
        required: true
        schema:
          type: string
      - name: status
        in: query
        description: Prescription Status
        required: false
        schema:
          type: string
          enum:
            - new
            - active
            - inactive
    get:
      summary: Get All Patient Prescriptions
      tags:
        - Patients
      operationId: get-patient-rx
      description: Retrieve all prescriptions for a patient
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  medication_requests:
                    type: array
                    items: &ref_11
                      allOf:
                        - &ref_52
                          title: ApiMedicationRequest
                          type: object
                          example:
                            id: 183601
                            active: true
                            receive_date: '2019-09-14T13:17:54.906-07:00'
                            drug_name: IBUPROFEN 400 MG TABLET
                            ndc: '62135040012'
                            gcn: 16393
                            sig_text: >-
                              Take 2 tablets by mouth every 8 hours as needed
                              for pain/discomfort.
                            written_qty: 90
                            refills_left: 2
                            tracking_code: null
                            expire_date: '2020-09-13T17:00:00.000-07:00'
                          required:
                            - id
                            - active
                            - receive_date
                            - drug_name
                            - product_option_values
                          properties:
                            id:
                              type: integer
                              description: Prescription ID
                            active:
                              type: boolean
                              description: Prescription is active or inactive
                            receive_date:
                              type: string
                              format: date-time
                              description: Prescription received date
                            drug_name:
                              type: string
                              description: Requested medication
                            ndc:
                              type: string
                              description: Prescribed National Drug Code
                            gcn:
                              type: integer
                              description: Prescribed GCN
                            sig_text:
                              type: string
                              description: >-
                                Prescriber instructions (optional,
                                non-null/empty on certain status)
                            written_qty:
                              type: number
                              format: float
                              description: Prescribed quantity
                            refills_left:
                              type: number
                              format: float
                              description: Number of refills remaining
                            tracking_code:
                              type: string
                              description: >-
                                This field will include serial numbers for
                                dispensed medications when provided. Only
                                included in the response if your formulary
                                includes medications that necessitate it.
                            expire_date:
                              type: string
                              format: date-time
                              description: Prescription expiration date
                            address: &ref_66
                              title: Address With Validation
                              x-examples: {}
                              allOf:
                                - *ref_8
                                - properties:
                                    validation_status:
                                      description: >-
                                        Whether or not this address has gone
                                        through validation
                                      type: string
                                      enum:
                                        - requires_validation
                                        - validated
                                        - validation_failed
                            product_option_values:
                              type: array
                              description: Product option values
                              items:
                                type: object
                                properties:
                                  option_name:
                                    type: string
                                    description: 'Option name (e.x. Strength, Form)'
                                  option_value:
                                    type: string
                                    description: 'Option value (e.x. 500 mg, Tablet)'
                            is_controlled_substance:
                              type: boolean
                        - properties:
                            medication_dispenses:
                              description: Dispensed prescriptions
                              type: array
                              items: &ref_56
                                allOf:
                                  - &ref_38
                                    title: MedicationDispense
                                    type: object
                                    example:
                                      order_date: '2019-09-14T13:17:54.906-07:00'
                                      order_number: XQ05O2A
                                      order_status: Shipped
                                      order_type: Verified Order - w/ Rx
                                      scheduled_date: '2019-10-14'
                                      product_name: Motrin
                                      generic_name: Ibuprofen
                                      manufacturer_name: Eci
                                      strength: 400 mg
                                      form: Tablet
                                      package_size: 90
                                      image_url: >-
                                        https://cdn.honeybeehealth.com/default_product_images/bottle.png
                                      days_supply_dispensed: 15
                                      dispense_id: 414
                                      sku: '386270000250'
                                    properties:
                                      order_date:
                                        type: string
                                        format: date-time
                                        description: Order entered date
                                      order_number:
                                        type: string
                                        description: Alphanumerical order number
                                      order_status:
                                        type: string
                                        description: >-
                                          Order status (Processing, Filling,
                                          Shipped, Delivered, Canceled)
                                      order_type:
                                        type: string
                                        description: 'Order type (New, Refill, Redo)'
                                      scheduled_date:
                                        type: string
                                        format: date
                                        description: The date the order is scheduled for
                                      product_name:
                                        type: string
                                        description: Branded product name
                                      generic_name:
                                        type: string
                                        description: Generic ingredient name
                                      manufacturer_name:
                                        type: string
                                        description: Manufacturer name
                                      strength:
                                        type: string
                                        description: Medication strength and unit
                                      form:
                                        type: string
                                        description: 'Drug form (e.g. Tablet, Capsule, etc)'
                                      package_size:
                                        type: number
                                        format: float
                                        description: Dispensed package size
                                      image_url:
                                        type: string
                                        description: Pill image location
                                      days_supply_dispensed:
                                        type: number
                                        format: float
                                        description: >-
                                          The days supply dispensed with this
                                          dispense.
                                      dispense_id:
                                        type: integer
                                        format: int64
                                        description: The dispense id
                                      sku:
                                        type: string
                                        description: The sku of the product
                                      shipment:
                                        type: object
                                        description: Shipment
                                        title: Shipment
                                        example: &ref_9
                                          shipment_date: '2025-07-03T14:33:50.510Z'
                                          estimated_delivery_date: '2025-07-09T01:00:00.000Z'
                                          actual_delivery_date: '2025-07-09T01:00:00.000Z'
                                          tracking_url: >-
                                            https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=9405511298370701053281
                                          tracking_no: '9405511298370701053281'
                                          carrier: USPS
                                          method: USPS Priority
                                        properties: &ref_10
                                          shipment_date:
                                            type: string
                                            format: date-time
                                            description: Date shipment left Honeybee facility
                                          estimated_delivery_date:
                                            type: string
                                            format: date-time
                                            description: Estimated delivery date
                                          actual_delivery_date:
                                            type: string
                                            format: date-time
                                            description: Actual delivery date
                                          tracking_url:
                                            type: string
                                            description: Shipment tracking URL
                                          tracking_no:
                                            type: string
                                            description: Shipment tracking no.
                                          carrier:
                                            type: string
                                            description: 'Shipment carrier (USPS, FedEx, UPS)'
                                          method:
                                            type: string
                                            description: >-
                                              Shipment carrier specific method e.g.
                                              Priorty Mail or First Class Mail
                                  - properties:
                                      shipment:
                                        type: object
                                        description: Shipment
                                        title: Shipment
                                        example: *ref_9
                                        properties: *ref_10
        '404':
          description: patient_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET",
            "/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx?status=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/rx/{rx_id}':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - name: patient_id
        in: path
        description: Partner Patient ID
        required: true
        schema:
          type: string
      - name: rx_id
        in: path
        description: Honeybee Health Prescription ID
        required: true
        schema:
          type: string
    get:
      summary: Get Patient Prescription
      tags:
        - Patients
      operationId: get-patient-medication
      description: Retrieve matching patient prescription
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_11
        '404':
          description: patient_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/rx/%7Brx_id%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/patient_safety':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - schema:
          type: string
        name: patient_id
        in: path
        required: true
        description: Partner Patient ID
    post:
      summary: Add Patient Safety Data
      tags:
        - Patients
      description: Add Patient Safety Data
      requestBody:
        content:
          application/json:
            schema: *ref_12
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema: *ref_12
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: &ref_14
                title: BadRequestError
                type: object
                x-examples: {}
                required:
                  - errors
                properties:
                  errors:
                    type: array
                    items: &ref_82
                      title: DetailedErrorBadRequest
                      type: object
                      description: >-
                        An individual error object with a code, message, and
                        error_detail
                      required:
                        - code
                        - message
                        - error_detail
                      properties:
                        code:
                          type: integer
                          example: 400
                        message:
                          type: string
                          example: error message
                        error_detail:
                          type: array
                          items:
                            type: object
                            properties:
                              field:
                                type: string
                                example: example_field
                              message:
                                type: string
                                example: this field is invalid
        '404':
          description: patient_id not found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"medications":["Ibuprofen","Advil"],"health_conditions":["Dust","Pollen"],"allergies":["Penicillin"]}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/patient_safety",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              medications: ['Ibuprofen', 'Advil'],
              health_conditions: ['Dust', 'Pollen'],
              allergies: ['Penicillin']
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v1/patients/%7Bpatient_id%7D/patient_safety",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety\"\n\n\tpayload := strings.NewReader(\"{\\\"medications\\\":[\\\"Ibuprofen\\\",\\\"Advil\\\"],\\\"health_conditions\\\":[\\\"Dust\\\",\\\"Pollen\\\"],\\\"allergies\\\":[\\\"Penicillin\\\"]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    delete:
      summary: Remove Patient Safety Data
      tags:
        - Patients
      description: Remove Patient Safety Data
      requestBody:
        content:
          application/json:
            schema: *ref_12
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema: *ref_12
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '404':
          description: patient_id not found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request DELETE \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"medications":["Ibuprofen","Advil"],"health_conditions":["Dust","Pollen"],"allergies":["Penicillin"]}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/patient_safety",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              medications: ['Ibuprofen', 'Advil'],
              health_conditions: ['Dust', 'Pollen'],
              allergies: ['Penicillin']
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Delete.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("DELETE",
            "/v1/patients/%7Bpatient_id%7D/patient_safety", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"medications\":[\"Ibuprofen\",\"Advil\"],\"health_conditions\":[\"Dust\",\"Pollen\"],\"allergies\":[\"Penicillin\"]}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/patient_safety\"\n\n\tpayload := strings.NewReader(\"{\\\"medications\\\":[\\\"Ibuprofen\\\",\\\"Advil\\\"],\\\"health_conditions\\\":[\\\"Dust\\\",\\\"Pollen\\\"],\\\"allergies\\\":[\\\"Penicillin\\\"]}\")\n\n\treq, _ := http.NewRequest(\"DELETE\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/shipping_address':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - name: patient_id
        in: path
        description: Partner Patient ID
        required: true
        schema:
          type: string
    post:
      summary: Add Patient Address
      tags:
        - Patients
      description: Add Patient Address
      operationId: create-patient-address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - first_name
                - last_name
                - street1
                - city
                - state
                - zip
              title: Address
              x-examples: &ref_18 {}
              example: &ref_19
                first_name: Sotiria
                last_name: Alla
                phone: '7422937793'
                street1: 1 W. Carriage Street
                street2: '#25'
                city: Minneapolis
                state: MN
                zip: '55406'
                default: true
                accept_suggested: false
                ignore_warnings: false
              type: object
              properties: &ref_20
                first_name:
                  type: string
                  description: The first name for the address
                last_name:
                  type: string
                  description: The last name for the address
                phone:
                  type: string
                  description: The phone for the address
                street1:
                  type: string
                  description: The street address for the order's shipping address
                street2:
                  type: string
                  description: The apartment number for the order's shipping address
                city:
                  type: string
                  description: The city for the order's shipping address
                state:
                  type: string
                  description: The state for the order's shipping address
                zip:
                  type: string
                  description: The zip for the order's shipping address
                default:
                  type: boolean
                  description: Make this the patient's default shipping address
                accept_suggested:
                  type: boolean
                  description: Accepts the suggested address
                ignore_warnings:
                  type: boolean
                  description: >-
                    Ignore all warnings and errors related to the address
                    validation
      responses:
        '201':
          description: Created
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_8
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '404':
          description: Not Found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning             | Description |

            | ----------- | ------------------- | ----------- |

            | 42221       | Invalid Address First Name | The provided first name
            was invalid. |

            | 42222       | Invalid Address Last Name  | The provided last name
            was invalid. |

            | 42223       | Invalid Address Street1    | The provided street1
            was invalid. |

            | 42225       | Invalid Address City       | The provided city was
            invalid. |

            | 42226       | Invalid Address State Abbreviation      | The state
            provided did not match a correct 2-character state code. |

            | 42227       | Invalid Address Zip        | The zip code provided
            was formatted incorrectly, or did not exist in the state provided. |

            | 42228       | Invalid Address Update     | The shipping address
            cannot be updated, the order has already been shipped. |

            | 42229       | Invalid Controlled Substance Address Update     |
            Approval required to update shipping address on orders containing
            controlled medications. |

            | 42230       | Invalid Address            | The provided address
            was invalid. |

            | 42231       | Invalid Address State      | The state provided
            cannot be shipped to. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"first_name":"Sotiria","last_name":"Alla","phone":"7422937793","street1":"1 W. Carriage Street","street2":"#25","city":"Minneapolis","state":"MN","zip":"55406","default":true,"accept_suggested":false,"ignore_warnings":false}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/shipping_address",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              first_name: 'Sotiria',
              last_name: 'Alla',
              phone: '7422937793',
              street1: '1 W. Carriage Street',
              street2: '#25',
              city: 'Minneapolis',
              state: 'MN',
              zip: '55406',
              default: true,
              accept_suggested: false,
              ignore_warnings: false
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST",
            "/v1/patients/%7Bpatient_id%7D/shipping_address", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1 W. Carriage Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address\"\n\n\tpayload := strings.NewReader(\"{\\\"first_name\\\":\\\"Sotiria\\\",\\\"last_name\\\":\\\"Alla\\\",\\\"phone\\\":\\\"7422937793\\\",\\\"street1\\\":\\\"1 W. Carriage Street\\\",\\\"street2\\\":\\\"#25\\\",\\\"city\\\":\\\"Minneapolis\\\",\\\"state\\\":\\\"MN\\\",\\\"zip\\\":\\\"55406\\\",\\\"default\\\":true,\\\"accept_suggested\\\":false,\\\"ignore_warnings\\\":false}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/patients/{patient_id}/shipping_address/{address_id}':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - name: patient_id
        in: path
        description: Partner Patient ID
        required: true
        schema:
          type: string
      - name: address_id
        in: path
        description: Address ID
        required: true
        schema:
          type: integer
    delete:
      summary: Delete Patient Address
      tags:
        - Patients
      description: Delete Patient Address
      operationId: delete-patient-address
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning             | Description |

            | ----------- | ------------------- | ----------- |

            | 42228       | Invalid Address Update     | cannot delete address,
            this address has been used in a current or previous order |

            | 42229       | Invalid Controlled Substance Address Update     |
            Approval required to update shipping address on orders containing
            controlled medications. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request DELETE \
              --url https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Delete.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE",
            "/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/patients/%7Bpatient_id%7D/shipping_address/%7Baddress_id%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /products:
    parameters:
      - *ref_6
      - *ref_7
      - &ref_43
        name: sort
        in: query
        description: Sort direction and attribute
        required: false
        example: +product_name
        schema:
          type: string
      - name: 'ndc[]'
        in: query
        description: 'collection of NDC, maximum 10'
        required: false
        schema:
          type: array
          example:
            - 12345-0678-09
            - 12345-0678-10
          items:
            type: string
      - name: summary
        in: query
        description: Don't load pricing or addons
        required: false
        schema:
          type: boolean
      - name: available_only
        in: query
        description: Only return products that are available to formulary
        required: false
        schema:
          type: boolean
      - name: hide_packaging
        in: query
        description: Hide packaging items
        required: false
        schema:
          type: boolean
      - name: search_keyword
        in: query
        description: Search keyword
        required: false
        schema:
          type: string
      - name: category
        in: query
        description: Product health condition category to filter by
        required: false
        schema:
          type: string
    get:
      summary: Get All Products with Price Information
      tags:
        - Products
      operationId: get-products
      description: Get all available products with pricing information
      responses:
        '200':
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          description: OK
          content:
            application/json:
              schema:
                type: array
                items: &ref_58
                  title: Product
                  required:
                    - product_name
                    - sku
                    - form
                    - strength
                    - requires_prescription
                    - package_unit_type_name
                    - categories
                    - restrictions
                    - variants
                  properties:
                    ndc:
                      type: string
                      description: 'The NDC associated with the product, if available'
                      example: 12345-0678-10
                    gcn:
                      type: integer
                      description: 'The GCN associated with the product, if available'
                      example: 54321
                    sku:
                      type: string
                      description: The SKU associated with the product
                      example: tadalafil-5mg-tablet
                    product_name:
                      type: string
                      description: The brand name of the product
                      example: Motrin
                    generic_name:
                      type: string
                      description: The generic name of the product
                      example: Ibuprofen
                    form:
                      type: string
                      description: The form the product is distributed in
                      example: tablet
                    strength:
                      type: string
                      description: The strength of an individual unit of the product
                      example: 5mg
                    image_url:
                      type: string
                      description: A publicly accessible URL for an image of the product
                      example: url string
                    requires_prescription:
                      type: boolean
                      description: >-
                        Whether the product requires a prescription to order or
                        not
                    manufacturer_name:
                      type: string
                      description: The manufacturer of the product
                    package_unit_type_name:
                      type: string
                      description: >-
                        The type of unit used for the package (one of count,
                        solids, liquids)
                    unit_of_measure:
                      type: string
                      description: 'The unit of measure for the product (one of ct, gm, mL)'
                    request_status:
                      description: The status of the formulary request (if applicable)
                      nullable: true
                      enum:
                        - pending
                        - approved
                        - denied
                        - closed
                    request_est_monthly_volume:
                      type: integer
                      description: Estimated first month volume (if applicable)
                    request_launch_date:
                      type: string
                      description: Target launch date for the product (if applicable)
                    categories:
                      type: array
                      description: The category of the product
                      items:
                        type: string
                    restrictions:
                      type: array
                      description: The restrictions of the product
                      items:
                        type: string
                    variants:
                      type: array
                      items:
                        type: object
                        required:
                          - package_size
                          - price
                        properties:
                          package_size:
                            type: number
                            format: float
                          price:
                            type: number
                            format: float
                    prices:
                      type: array
                      items:
                        type: object
                        properties:
                          start_package_size:
                            type: number
                            format: float
                            example: 0
                          end_package_size:
                            type: number
                            format: float
                          base_price:
                            type: number
                            example: 7
                          units_included_in_base_price:
                            type: number
                            format: float
                            example: 25
                          additional_price_per_unit_after_base:
                            type: number
                            example: 1.3333
                    shippable_states:
                      type: array
                      description: >-
                        A list of state abbreviations that this product can be
                        shipped to
                      items:
                        type: string
                    addons:
                      type: array
                      description: A list of addons for the product
                      items: &ref_46
                        title: Addon
                        type: object
                        x-examples: {}
                        required:
                          - name
                          - sku
                        properties:
                          name:
                            type: string
                            description: The Addon Name
                          sku:
                            type: string
                            description: The Addon SKU
                          package_size:
                            type: integer
                            description: The Addon Package Size
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                |
            Description                             |

            | ----------- | ---------------------- |
            --------------------------------------- |

            | 42381       | Invalid Product Search | This list of NDCs exceeds
            10 or bad NDC |
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://partners.honeybeehealth.com/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET",
            "/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/products?sort=%2Bproduct_name&ndc%5B%5D=12345-0678-09&ndc%5B%5D=12345-0678-10&summary=SOME_BOOLEAN_VALUE&available_only=SOME_BOOLEAN_VALUE&hide_packaging=SOME_BOOLEAN_VALUE&search_keyword=SOME_STRING_VALUE&category=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /orders:
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
    get:
      summary: Get All Orders
      tags:
        - Orders
      operationId: get-orders
      description: Get all orders for partner organization
      parameters:
        - name: page
          in: query
          description: Page number for pagination
          required: false
          schema:
            type: integer
            format: int32
        - name: limit
          in: query
          description: Page limit for pagination
          required: false
          schema:
            type: integer
            format: int32
        - name: sort
          in: query
          description: Attribute to sort by (preceeding -/+ denotes sort direction)
          required: false
          schema:
            type: string
        - name: search_keyword
          in: query
          description: >-
            A searchable keyword to filter orders. Attempts to match names and
            emails
          required: false
          schema:
            type: string
        - name: patient_first_name
          in: query
          description: Patient first name to filter orders by (fuzzy match)
          required: false
          schema:
            type: string
        - name: patient_last_name
          in: query
          description: Patient last name to filter orders by (fuzzy match)
          required: false
          schema:
            type: string
        - name: patient_dob
          in: query
          description: Patient DoB to filter orders by (fuzzy match)
          required: false
          schema:
            type: string
            format: date
        - name: user_email
          in: query
          description: Patient email to filter orders by (fuzzy match)
          required: false
          schema:
            type: string
        - name: min_purchase_date
          in: query
          description: The lower limit of the purchase date to filter orders by
          required: false
          schema:
            type: string
            format: date
        - name: max_purchase_date
          in: query
          description: The upper limit of the purchase date to filter orders by
          required: false
          schema:
            type: string
            format: date
        - name: min_shipped_at
          in: query
          description: The lower limit of the shipped date to filter orders by
          required: false
          schema:
            type: string
            format: date
        - name: max_shipped_at
          in: query
          description: The upper limit of the shipped date to filter orders by
          required: false
          schema:
            type: string
            format: date
        - name: min_total
          in: query
          description: The lower limit of the total order amount to filter orders by
          required: false
          schema:
            type: number
            format: decimal
        - name: max_total
          in: query
          description: The upper limit of the total order amount to filter orders by
          required: false
          schema:
            type: number
            format: decimal
        - name: order_status_id
          in: query
          description: The order status id to filter orders by
          required: false
          schema:
            type: integer
            format: int32
        - name: shipping_method_id
          in: query
          description: The shipping method id to filter orders by
          required: false
          schema:
            type: integer
            format: int32
        - name: partner_uuid
          in: query
          description: The brand id to filter orders by
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  orders:
                    type: array
                    items: &ref_63
                      title: Order
                      type: object
                      x-examples: {}
                      properties:
                        replace:
                          type: object
                          properties:
                            order_number:
                              type: string
                              description: >-
                                The order number of the order that is being
                                replaced
                              example: MXQJ9A
                            reason_id:
                              type: integer
                              format: int32
                              description: >-
                                The id of the reason this order is replacing
                                another order
                              example: 2
                        order_number:
                          type: string
                          description: The order number associated with the order
                          example: MXO72E
                        status_name:
                          type: string
                          description: The name of the order status the order is in
                          example: Processing
                        purchase_date:
                          type: string
                          format: date-time
                          description: The date the order was purchased/received
                        shipped_at:
                          type: string
                          format: date-time
                          description: The date the order was shipped
                        patient_id:
                          type: string
                          description: >-
                            The Patient Id (reference number) used by the
                            partner to identify the patient in their system
                          example: 1441
                        patient_first_name:
                          type: string
                          description: The first name of the patient the order is for
                          example: Sotiria
                        patient_last_name:
                          type: string
                          description: The last name of the patient the order is for
                          example: Alla
                        patient_full_name:
                          type: string
                          description: The full name of the patient the order is for
                          example: Sotiria Alla
                        patient_dob:
                          type: string
                          format: date
                          description: The DoB of the patient the order is for
                        user_email:
                          type: string
                          description: The email of the patient the order is for
                          example: example@gmail.com
                        shipping:
                          type: number
                          format: decimal
                          description: The shipping cost of the order
                        shipping_address_full_name:
                          type: string
                          description: >-
                            The recipient's full name for the the order's
                            shipping address
                          example: Sotiria Alla
                        shipping_address_street1:
                          type: string
                          description: The street address for the order's shipping address
                          example: 1 W. Carriage Street
                        shipping_address_street2:
                          type: string
                          description: >-
                            The apartment number for the order's shipping
                            address
                          example: '#25'
                        shipping_address_city:
                          type: string
                          description: The city for the order's shipping address
                          example: Minneapolis
                        shipping_address_state_id:
                          type: number
                          description: The state id for the order's shipping address
                          example: 12
                        shipping_address_zip:
                          type: string
                          description: The zip for the order's shipping address
                          example: '55406'
                        shipping_method_name:
                          type: string
                          description: The description of the shipping method name
                          example: FedEx Express
                        subtotal:
                          type: number
                          format: decimal
                          description: >-
                            The subtotal dollar amount of the summed price of
                            all items
                          example: 15
                        tracking_code:
                          type: string
                          description: >-
                            This field will include serial numbers for dispensed
                            medications when provided. Is only included in the
                            response if your formulary includes medications that
                            necessitate it.
                          example: 1412k3ljkasdli2
                        total:
                          type: number
                          format: decimal
                          description: The total dollar value for the order
                          example: 20.14
                        tax:
                          type: number
                          format: float
                          description: The total tax value for the order
                        item_count:
                          type: string
                          description: The total number of items in the order
                          example: '14.0'
                        product_full_names:
                          type: array
                          example:
                            - Amiodarone (Pacerone)
                            - Acetazolamide (Diamox)
                          items:
                            type: string
                          description: An array of product names in the order
                        tracking_urls:
                          type: array
                          example:
                            - >-
                              https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=***************
                            - >-
                              https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=***************
                          items:
                            type: string
                          description: An array of tracking urls associated with the order
                        order_type_name:
                          type: string
                          description: The origin of the order
                        order_fees:
                          type: array
                          items: &ref_75
                            title: OrderFee
                            type: object
                            required:
                              - id
                              - amount
                              - fee_type_name
                              - fee_type_key
                            properties:
                              id:
                                type: integer
                                format: int32
                                description: The order fee ID
                              amount:
                                type: number
                                format: decimal
                                description: The dollar amount of the order fee
                              fee_type_name:
                                type: string
                                description: The name of the fee applied to the order
                              fee_type_key:
                                type: string
                                description: The key of the fee applied to the order
                        brand:
                          type: object
                          description: The brand associated with the order
                          title: Brand
                          x-examples: *ref_15
                          properties: *ref_16
                  total_record_count:
                    type: integer
                    format: int64
                    description: Total existing searchable records for pagination
                  total_order_amount:
                    type: number
                    format: float
                    description: >-
                      The sum of order totals less than deducted credit for the
                      queried orders
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://partners.honeybeehealth.com/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE' \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET",
            "/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders?page=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&sort=SOME_STRING_VALUE&search_keyword=SOME_STRING_VALUE&patient_first_name=SOME_STRING_VALUE&patient_last_name=SOME_STRING_VALUE&patient_dob=SOME_STRING_VALUE&user_email=SOME_STRING_VALUE&min_purchase_date=SOME_STRING_VALUE&max_purchase_date=SOME_STRING_VALUE&min_shipped_at=SOME_STRING_VALUE&max_shipped_at=SOME_STRING_VALUE&min_total=SOME_NUMBER_VALUE&max_total=SOME_NUMBER_VALUE&order_status_id=SOME_INTEGER_VALUE&shipping_method_id=SOME_INTEGER_VALUE&partner_uuid=SOME_STRING_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    post:
      summary: Create New Order
      tags:
        - Orders
      operationId: create-order
      description: Create a new order
      requestBody: &ref_44
        required: true
        content:
          application/json:
            schema: &ref_49
              title: CreateOrderRequest
              type: object
              required:
                - patient
                - items
                - shipping
              properties:
                brand_id:
                  type: string
                  format: uuid
                  description: >-
                    This attribute is used if your account is configured with
                    multiple brands.
                shipping:
                  type: object
                  required:
                    - method_id
                  properties:
                    method_id:
                      type: integer
                    signature_confirmation:
                      type: boolean
                    label_format:
                      type: string
                      enum:
                        - zpl
                    label_data:
                      type: string
                      description: must be base64 encoded including newlines
                    tracking_number:
                      type: string
                patient:
                  oneOf:
                    - &ref_67
                      title: New Patient
                      x-examples: {}
                      type: object
                      required:
                        - first_name
                        - last_name
                        - dob
                        - gender
                        - email
                        - patient_safety
                      example:
                        first_name: Ryan
                        last_name: Reid
                        dob: '1980-03-11'
                        gender: Male
                        email: example@gmail.com
                        phone: '3478343341'
                        patient_safety:
                          medications: []
                          health_conditions: []
                          allergies: []
                      properties:
                        first_name:
                          type: string
                          description: The first name of the patient
                        last_name:
                          type: string
                          description: The last name of the patient
                        dob:
                          type: string
                          format: date
                          description: The DoB of the patient
                        gender:
                          type: string
                          pattern: ^M|F|N$
                          description: The gender of the patient
                        email:
                          type: string
                          description: The email of the patient
                        phone:
                          type: string
                          pattern: '^\d{10}$'
                          description: The phone number of the patient
                        patient_safety: *ref_12
                        identity_documents:
                          type: array
                          description: Required if ordering a controlled substance
                          items: *ref_17
                    - &ref_68
                      type: object
                      title: Existing Patient
                      required:
                        - patient_id
                      properties:
                        patient_id:
                          type: string
                        patient_safety: *ref_12
                        identity_documents:
                          type: array
                          description: Required if ordering a controlled substance
                          items: *ref_17
                address: &ref_65
                  title: Address
                  x-examples: *ref_18
                  example: *ref_19
                  type: object
                  properties: *ref_20
                items:
                  type: array
                  minItems: 1
                  items: &ref_50
                    type: object
                    title: >-
                      Order items sent in the items array to the create order
                      endpoint
                    oneOf:
                      - title: Order Item with Prescription ID
                        type: object
                        required:
                          - prescription_id
                        properties:
                          prescription_id:
                            type: integer
                          quantity:
                            type: integer
                            default: 1
                          package_size:
                            type: number
                            description: >-
                              If different from default prescription written
                              quantity.
                      - title: Order Item with SKU
                        type: object
                        description: >-
                          SKUs can be used to create the order with
                          over-the-counter items or prescription items
                        required:
                          - sku
                        properties:
                          sku:
                            type: string
                          quantity:
                            type: integer
                            default: 1
                          package_size:
                            type: number
                            description: Required if a Prescription ID is not included.
                          prescription_id:
                            type: integer
                          prescriber: &ref_21
                            type: object
                            title: Prescriber
                            description: >-
                              Required if a prescription ID is not included in
                              the request
                            required:
                              - name
                              - phone
                            properties:
                              name:
                                type: string
                              phone:
                                type: string
                                pattern: '^\d{10}$'
                              fax:
                                type: string
                                pattern: '^\d{10}$'
                              zip:
                                type: string
                                pattern: '^\d{5}$'
                      - title: Order Item with GCN
                        type: object
                        description: >-
                          GCNs can be used to create an order with prescription
                          items.
                        required:
                          - gcn_seqno
                        properties:
                          gcn_seqno:
                            type: string
                          quantity:
                            type: integer
                            default: 1
                          package_size:
                            type: number
                            description: Required if a prescription ID is not included.
                          prescription_id:
                            type: integer
                          prescriber: *ref_21
                      - title: Order Item with NDC
                        type: object
                        description: >-
                          NDCs can be used to create an order with prescription
                          items and a specific brand is desired.
                        required:
                          - ndc
                        properties:
                          ndc:
                            type: string
                          quantity:
                            type: integer
                            default: 1
                          package_size:
                            type: number
                            description: Required if a prescription ID is not included.
                          prescription_id:
                            type: integer
                          prescriber: *ref_21
      responses:
        '201':
          description: Created
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  order_number:
                    type: string
                  patient_id:
                    type: string
                  brand:
                    type: object
                    description: The brand associated with the order
                    title: Brand
                    x-examples: *ref_15
                    properties: *ref_16
                  warnings:
                    type: object
                    description: Warnings about the order
                    title: OrderWarnings
                    x-examples: &ref_28 {}
                    properties: &ref_29
                      address:
                        type: array
                        items:
                          type: object
                          properties:
                            street2:
                              type: string
                            suggested_address:
                              type: object
                              properties:
                                street1:
                                  type: string
                                street2:
                                  type: string
                                city:
                                  type: string
                                state:
                                  type: string
                                zip:
                                  type: string
                            entered_address:
                              type: object
                              properties:
                                street1:
                                  type: string
                                street2:
                                  type: string
                                city:
                                  type: string
                                state:
                                  type: string
                                zip:
                                  type: string
                  medication_requests:
                    type: array
                    items: *ref_11
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                                 |
            Description |

            | ----------- | --------------------------------------- |
            ------------------------------------------------------- |

            | 42201       | Invalid Patient Email                   | The
            provided email was invalid. |

            | 42202       | Invalid Patient First Name              | The
            provided first name was invalid. |

            | 42203       | Invalid Patient Last Name               | The
            provided last name was invalid. |

            | 42204       | Invalid Patient Phone                   | The
            provided phone was invalid. |

            | 42205       | Invalid Patient Gender                  | The
            provided gender code was invalid. |

            | 42206       | Invalid Patient Id                      | The
            provided patient id was invalid. |

            | 42208       | Invalid Patient Identity Documents      | Missing
            required identity documents due to a controlled substance included
            in the request. |

            | 42216       | Invalid Document Type                   | The
            provided document type was invalid. Must be one of 'DL', 'PP', 'MI',
            'PR', 'SI', 'TI', 'OT'. |

            | 42217       | Invalid Issuing Country                 | The
            provided issuing country was invalid. Must be 2-character country
            code. |

            | 42218       | Invalid Issuing State                   | The
            provided state was invalid. Must be 2-character state code. |

            | 42219       | Invalid Document Number                 | The
            provided document number was missing. |

            | 42220       | Invalid Document Expiration Date        | The
            provided expiration date was in the past or malformed. Must be
            formatted 'YYYY-MM-DD'. |

            | 42221       | Invalid Address First Name              | The
            provided first name was invalid. |

            | 42222       | Invalid Address Last Name               | The
            provided last name was invalid. |

            | 42223       | Invalid Address Street1                 | The
            provided street1 was invalid. |

            | 42225       | Invalid Address City                    | The
            provided city was invalid. |

            | 42226       | Invalid Address State Abbreviation      | The state
            provided did not match a correct 2-character state code. |

            | 42227       | Invalid Address Zip                     | The zip
            code provided was formatted incorrectly, or did not exist in the
            state provided. |

            | 42230       | Invalid Address                         | The
            provided address was invalid. |

            | 42231       | Invalid Address State                   | The state
            provided cannot be shipped to. |

            | 42241       | Invalid Item NDC                        | The
            provided NDC does not match a product offering in the catalog. |

            | 42242       | Invalid Item Quantity                   | The
            provided quantity does not match a product offering in the catalog.
            |

            | 42243       | Invalid Item Prescriber Name            | The
            provided prescriber name was invalid. |

            | 42244       | Invalid Item Prescriber Phone           | The
            provided prescriber phone was invalid. |

            | 42245       | Invalid Item Prescriber Fax             | The
            provided prescriber fax was invalid. |

            | 42246       | Invalid Item GCN                        | The
            provided GCN Sequence Number does not match a product offering in
            the catalog. |

            | 42247       | Invalid Item Package Size               | The
            provided package size does not match a product offering in the
            catalog. |

            | 42249       | Invalid Item Prescription Id            | The
            provided prescription id for `partner_requested_fills` workflow was
            invalid. |

            | 42250       | Invalid Item Prescription Refills       | The
            provided prescription id for `partner_requested_fills` workflow has
            no remaining refills. |

            | 42253       | Invalid Item Inventory                  | The
            requested item has no remaining inventory available. |

            | 42254       | Invalid Item SKU                        | The
            provided SKU for does not match a product offering in the catalog. |

            | 42255       | Invalid Item Prescription Quantity      | The
            requested quantity exceeds what is on the prescription. |

            | 42256       | Invalid Item Shipping Method            | The
            requested shipping method cannot be used on an item in this order. |

            | 42257       | Invalid Item Prescription Expired       | The
            requested prescription is expired. |

            | 42258       | Invalid Item Prescription Ndc           | The
            requested item does not match medication on prescription. |

            | 42259       | Invalid Item Written Quantity           | The
            written quantity on the prescription does not match a product
            offering in the catalog. |

            | 42260       | Invalid Item Product Selection          | The
            requested item does not match a product in your formulary. |

            | 42291       | Invalid Shipping Method Id              | The
            provided shipping method id is invalid. |

            | 42292       | Invalid Shipping Signature Confirmation | The
            requested shipping signature confirmation is not available for the
            shipping method id selected. |

            | 42293       | Invalid Shipping Method Carrier         | The
            requested shipping method is incompatible with addresss for general
            delivery or PO BOX. |

            | 42294       | Invalid Shipping Label Format           | The
            provided shipping label format is invalid. |

            | 42295       | Invalid Shipping Label Impermissible    | The
            account is not permitted to submit custom shipping labels. |

            | 42296       | Invalid Shipping Label Data             | The label
            data provided does not match the format. |

            | 42380       | Invalid Brand                           | The
            provided brand id did not match a known brand for this account. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/orders \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"brand_id":"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da","shipping":{"method_id":0,"signature_confirmation":true,"label_format":"zpl","label_data":"string","tracking_number":"string"},"patient":{"first_name":"Ryan","last_name":"Reid","dob":"1980-03-11","gender":"Male","email":"example@gmail.com","phone":"3478343341","patient_safety":{"medications":[],"health_conditions":[],"allergies":[]}},"address":{"first_name":"Sotiria","last_name":"Alla","phone":"7422937793","street1":"1 W. Carriage Street","street2":"#25","city":"Minneapolis","state":"MN","zip":"55406","default":true,"accept_suggested":false,"ignore_warnings":false},"items":[{"prescription_id":0,"quantity":1,"package_size":0}]}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              brand_id: '1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da',
              shipping: {
                method_id: 0,
                signature_confirmation: true,
                label_format: 'zpl',
                label_data: 'string',
                tracking_number: 'string'
              },
              patient: {
                first_name: 'Ryan',
                last_name: 'Reid',
                dob: '1980-03-11',
                gender: 'Male',
                email: 'example@gmail.com',
                phone: '3478343341',
                patient_safety: {medications: [], health_conditions: [], allergies: []}
              },
              address: {
                first_name: 'Sotiria',
                last_name: 'Alla',
                phone: '7422937793',
                street1: '1 W. Carriage Street',
                street2: '#25',
                city: 'Minneapolis',
                state: 'MN',
                zip: '55406',
                default: true,
                accept_suggested: false,
                ignore_warnings: false
              },
              items: [{prescription_id: 0, quantity: 1, package_size: 0}]
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://partners.honeybeehealth.com/v1/orders")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"patient\":{\"first_name\":\"Ryan\",\"last_name\":\"Reid\",\"dob\":\"1980-03-11\",\"gender\":\"Male\",\"email\":\"example@gmail.com\",\"phone\":\"3478343341\",\"patient_safety\":{\"medications\":[],\"health_conditions\":[],\"allergies\":[]}},\"address\":{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false},\"items\":[{\"prescription_id\":0,\"quantity\":1,\"package_size\":0}]}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"patient\":{\"first_name\":\"Ryan\",\"last_name\":\"Reid\",\"dob\":\"1980-03-11\",\"gender\":\"Male\",\"email\":\"example@gmail.com\",\"phone\":\"3478343341\",\"patient_safety\":{\"medications\":[],\"health_conditions\":[],\"allergies\":[]}},\"address\":{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false},\"items\":[{\"prescription_id\":0,\"quantity\":1,\"package_size\":0}]}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v1/orders", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/orders")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"patient\":{\"first_name\":\"Ryan\",\"last_name\":\"Reid\",\"dob\":\"1980-03-11\",\"gender\":\"Male\",\"email\":\"example@gmail.com\",\"phone\":\"3478343341\",\"patient_safety\":{\"medications\":[],\"health_conditions\":[],\"allergies\":[]}},\"address\":{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1 W. Carriage Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false},\"items\":[{\"prescription_id\":0,\"quantity\":1,\"package_size\":0}]}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders\"\n\n\tpayload := strings.NewReader(\"{\\\"brand_id\\\":\\\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\\\",\\\"shipping\\\":{\\\"method_id\\\":0,\\\"signature_confirmation\\\":true,\\\"label_format\\\":\\\"zpl\\\",\\\"label_data\\\":\\\"string\\\",\\\"tracking_number\\\":\\\"string\\\"},\\\"patient\\\":{\\\"first_name\\\":\\\"Ryan\\\",\\\"last_name\\\":\\\"Reid\\\",\\\"dob\\\":\\\"1980-03-11\\\",\\\"gender\\\":\\\"Male\\\",\\\"email\\\":\\\"example@gmail.com\\\",\\\"phone\\\":\\\"3478343341\\\",\\\"patient_safety\\\":{\\\"medications\\\":[],\\\"health_conditions\\\":[],\\\"allergies\\\":[]}},\\\"address\\\":{\\\"first_name\\\":\\\"Sotiria\\\",\\\"last_name\\\":\\\"Alla\\\",\\\"phone\\\":\\\"7422937793\\\",\\\"street1\\\":\\\"1 W. Carriage Street\\\",\\\"street2\\\":\\\"#25\\\",\\\"city\\\":\\\"Minneapolis\\\",\\\"state\\\":\\\"MN\\\",\\\"zip\\\":\\\"55406\\\",\\\"default\\\":true,\\\"accept_suggested\\\":false,\\\"ignore_warnings\\\":false},\\\"items\\\":[{\\\"prescription_id\\\":0,\\\"quantity\\\":1,\\\"package_size\\\":0}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/orders/{order_number}':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: Authorization
        in: header
        description: Bearer Token
        schema:
          type: string
        required: true
      - name: order_number
        in: path
        description: Order Number
        required: true
        schema:
          type: string
    get:
      summary: Get Order
      tags:
        - Orders
      operationId: get-order
      description: Get order
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: &ref_30
                title: OrderExtended
                type: object
                x-examples: {}
                properties:
                  replace:
                    type: object
                    properties:
                      order_number:
                        type: string
                        description: The order number of the order that is being replaced
                        example: MXQJ9A
                      reason_id:
                        type: integer
                        format: int32
                        description: >-
                          The id of the reason this order is replacing another
                          order
                        example: 2
                  order_number:
                    type: string
                    description: The order number associated with the order
                    example: MXO72E
                  subtotal:
                    type: number
                    format: float
                    description: The subtotal dollar value for the order
                    example: 15.75
                  total:
                    type: number
                    format: float
                    description: The total dollar value for the order
                    example: 20.75
                  tax:
                    type: number
                    format: float
                    description: The total tax value for the order
                    example: 1.25
                  shipping:
                    type: number
                    format: float
                    description: The total shipping value for the order
                    example: 5.25
                  purchase_date:
                    type: string
                    format: date-time
                    description: The date the order was purchased/received
                    example: '2023-05-31T21:59:12.926Z'
                  tracking_code:
                    type: string
                    description: >-
                      This field will include serial numbers for dispensed
                      medications when provided. Is only included in the
                      response if your formulary includes medications that
                      necessitate it.
                    example: null
                  status_name:
                    type: string
                    description: The name of the order status the order is in
                    example: Processing
                  status_reason:
                    type: string
                    description: The reason the order is in this status (if applicable)
                    example: Partner Canceled - No Longer Needed
                  order_type_name:
                    type: string
                    description: The origin of the order
                    example: Verified Order - w/ Rx
                  patient:
                    description: The patient to whom the order belongs
                    title: Patient
                    x-examples: *ref_22
                    type: object
                    example: *ref_23
                    properties: *ref_24
                  shipping_method:
                    type: object
                    description: The shipping method of the order
                    title: ShippingMethod
                    x-examples: &ref_31 {}
                    required: &ref_32
                      - id
                      - method_name
                      - shipping_time
                      - carrier_name
                      - partner_name
                      - brand_id
                      - price
                      - at_cost
                      - is_default
                    properties: &ref_33
                      id:
                        type: integer
                        format: int32
                        description: The shipping method ID
                      method_name:
                        type: string
                        description: The shipping method name
                      shipping_time:
                        type: string
                        description: >-
                          A description of how long a typical package takes to
                          be delivered
                      carrier_name:
                        type: string
                        description: The name of the carrier for this shipping method
                      partner_name:
                        type: string
                        description: >-
                          The name of the partner or child partner for this
                          shipping method
                      brand_id:
                        type: string
                        description: >-
                          The ID of the partner or child partner for this
                          shipping method
                      price:
                        type: number
                        format: float
                        description: The cost of using the shipping method
                      at_cost:
                        type: boolean
                        description: Whether this shipping method is at cost to the partner
                      is_default:
                        type: boolean
                        description: >-
                          Whether this shipping method is the default for the
                          partner
                      available_options:
                        type: array
                        items: &ref_73
                          title: ShippingMethodOptions
                          x-examples: {}
                          type: object
                          properties:
                            id:
                              type: integer
                              format: int32
                              description: The shipping method option id
                            name:
                              type: string
                              description: The shipping method option name
                            price:
                              type: number
                              format: float
                              description: The shipping method option price
                  shipping_address:
                    type: object
                    description: The shipping address of the order
                    title: Address
                    x-examples: *ref_25
                    example: *ref_26
                    properties: *ref_27
                  order_items:
                    type: array
                    items: &ref_64
                      title: OrderItem
                      x-examples: {}
                      example:
                        manufacturer_name: Example Manufacturer Name
                        strength: 500 mg
                        form: Tablet
                        price: '4.0'
                        quantity: 1
                        package_size: 14
                        generic_name: Metformin
                        product_name: Glucophage
                        product_type: Medication
                        image_url: 'https://example-cdn.honeybeehealth.com/abc123'
                        package_unit_type: ct
                        ndc: '23155010205'
                        item_scans:
                          - scanned_data: 111STS-OR-00310533453617250000
                      type: object
                      properties:
                        ndc:
                          type: string
                          description: The ndc of the product
                        manufacturer_name:
                          type: string
                          description: The manufacturer of the product
                        strength:
                          type: string
                          description: The strength of the product
                        form:
                          type: string
                          description: The form of the product
                        price:
                          type: string
                          description: The price of the item
                        quantity:
                          type: number
                          format: decimal
                          description: The number of items purchased
                        package_size:
                          type: number
                          format: decimal
                          description: The package size of the items
                        product_name:
                          type: string
                          description: The product name
                        product_type:
                          type: string
                          description: The type of product associated with the item
                        image_url:
                          type: string
                          description: The product image location
                        generic_name:
                          type: string
                          description: The generic name of the medication
                        package_unit_type:
                          type: string
                          description: The package unit abbreviation
                        item_scans:
                          type: array
                          description: >-
                            Any barcode/QR code scans taken of picked items in
                            the order
                          items:
                            type: object
                            properties:
                              scanned_data:
                                type: string
                  warnings:
                    type: object
                    description: Warnings about the order
                    title: OrderWarnings
                    x-examples: *ref_28
                    properties: *ref_29
                  brand:
                    type: object
                    description: The brand associated with the order
                    title: Brand
                    x-examples: *ref_15
                    properties: *ref_16
        '404':
          description: Not Found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("GET", "/v1/orders/%7Border_number%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    patch:
      summary: Update Order
      tags:
        - Orders
      operationId: update-order
      description: Update an existing order
      requestBody:
        content:
          application/json:
            schema: &ref_62
              title: UpdateOrderBody
              type: object
              properties:
                brand_id:
                  type: string
                  format: uuid
                  description: >-
                    This attribute is used if your account is configured with
                    multiple brands.
                shipping_address_id:
                  type: integer
                shipping:
                  type: object
                  required:
                    - method_id
                  properties:
                    method_id:
                      type: integer
                    signature_confirmation:
                      type: boolean
                    label_format:
                      type: string
                      enum:
                        - zpl
                      description: required if sending label data
                    label_data:
                      type: string
                      description: >-
                        must be base64 encoded including newlines. Required if
                        sending label format.
                    tracking_number:
                      type: string
                      description: required if sending label data
                address:
                  type: object
                  required:
                    - first_name
                    - last_name
                    - street1
                    - street2
                    - city
                    - state
                    - zip
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    street1:
                      type: string
                    street2:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                      pattern: '^[A-Z]{2}$'
                    zip:
                      type: string
                      pattern: '^\d{5}$'
                    phone:
                      type: string
                    accept_suggested:
                      type: boolean
                    ignore_warnings:
                      type: boolean
                items:
                  type: array
                  items:
                    type: object
                    required:
                      - action
                    properties:
                      ndc:
                        type: string
                      update_ndc:
                        type: string
                      sku:
                        type: string
                      update_sku:
                        type: string
                      gcn_seqno:
                        type: integer
                      quantity:
                        type: integer
                      package_size:
                        type: number
                      action:
                        type: string
                        enum:
                          - add
                          - update
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_30
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '404':
          description: Not Found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                                 |
            Description |

            | ----------- | --------------------------------------- |
            -------------------------------------------- |

            | 42221       | Invalid Address First Name              | The
            provided first name was invalid. |

            | 42222       | Invalid Address Last Name               | The
            provided last name was invalid. |

            | 42223       | Invalid Address Street1                 | The
            provided street1 was invalid. |

            | 42225       | Invalid Address City                    | The
            provided city was invalid. |

            | 42226       | Invalid Address State Abbreviation      | The state
            provided did not match a correct 2-character state code. |

            | 42227       | Invalid Address Zip                     | The zip
            code provided was formatted incorrectly, or did not exist in the
            state provided. |

            | 42228       | Invalid Address Update                  | The
            shipping address cannot be updated, order has already shipped. |

            | 42229       | Invalid Address Controlled Substance    | The
            shipping address cannot be updated, order contains controlled
            substances. |

            | 42230       | Invalid Address                         | The
            provided address was invalid. |

            | 42231       | Invalid Address State                   | The state
            provided cannot be shipped to. |

            | 42241       | Invalid Item NDC                        | The
            provided NDC does not match a product offering in the catalog. |

            | 42242       | Invalid Item Quantity                   | The
            provided quantity does not match a product offering in the catalog.
            |

            | 42246       | Invalid Item GCN                        | The
            provided GCN Sequence Number does not match a product offering in
            the catalog. |

            | 42247       | Invalid Item Package Size               | The
            provided package size does not match a product offering in the
            catalog. |

            | 42248       | Invalid Item Action                     | The
            provided action does not match the enumerable values acceptable. |

            | 42249       | Invalid Item Prescription Id            | The
            provided prescription Id was invalid |

            | 42250       | Invalid Item Prescription Refills       | The
            provided prescription has no refills remaining |

            | 42251       | Invalid Item Not Found                  | The
            attempt to update an order item was not found, please check ndc or
            gcn_seqno supplied |

            | 42252       | Invalid Item Update Ndc                 | The
            attempt to update an order item NDC was invalid. Please check
            update_ndc supplied |

            | 42253       | Invalid Item Inventory                  | The
            requested order item has no available inventory remaining |

            | 42254       | Invalid Item SKU                        | The
            requested SKU does not match a product offering in the catalog. |

            | 42255       | Invalid Item Prescription Quantity      | The
            requested quantity exceeds what is on the prescription. |

            | 42256       | Invalid Item Shipping Method            | The
            requested shipping method cannot be used on an item in this order. |

            | 42257       | Invalid Item Prescription Expired       | The
            requested prescription is expired. |

            | 42260       | Invalid Item Product Selection          | The
            requested item does not match a product in your formulary. |

            | 42291       | Invalid Shipping Method Id              | The
            provided shipping method id is invalid. |

            | 42292       | Invalid Shipping Signature Confirmation | The
            requested shipping signature confirmation is not available for the
            shipping method id selected. |

            | 42293       | Invalid Shipping Method Carrier         | The
            requested shipping method is incompatible with addresss for general
            delivery or PO BOX. |

            | 42294       | Invalid Shipping Label Format           | The
            provided shipping label format is invalid. |

            | 42295       | Invalid Shipping Label Impermissible    | The
            account is not permitted to submit custom shipping labels. |

            | 42296       | Invalid Shipping Label Data             | The label
            data provided does not match the format. |

            | 42380       | Invalid Brand                           | The
            provided brand id did not match a known brand for this account. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"brand_id":"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da","shipping_address_id":0,"shipping":{"method_id":0,"signature_confirmation":true,"label_format":"zpl","label_data":"string","tracking_number":"string"},"address":{"first_name":"string","last_name":"string","street1":"string","street2":"string","city":"string","state":"string","zip":"string","phone":"string","accept_suggested":true,"ignore_warnings":true},"items":[{"ndc":"string","update_ndc":"string","sku":"string","update_sku":"string","gcn_seqno":0,"quantity":0,"package_size":0,"action":"add"}]}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "PATCH",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              brand_id: '1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da',
              shipping_address_id: 0,
              shipping: {
                method_id: 0,
                signature_confirmation: true,
                label_format: 'zpl',
                label_data: 'string',
                tracking_number: 'string'
              },
              address: {
                first_name: 'string',
                last_name: 'string',
                street1: 'string',
                street2: 'string',
                city: 'string',
                state: 'string',
                zip: 'string',
                phone: 'string',
                accept_suggested: true,
                ignore_warnings: true
              },
              items: [
                {
                  ndc: 'string',
                  update_ndc: 'string',
                  sku: 'string',
                  update_sku: 'string',
                  gcn_seqno: 0,
                  quantity: 0,
                  package_size: 0,
                  action: 'add'
                }
              ]
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Patch.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping_address_id\":0,\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"ndc\":\"string\",\"update_ndc\":\"string\",\"sku\":\"string\",\"update_sku\":\"string\",\"gcn_seqno\":0,\"quantity\":0,\"package_size\":0,\"action\":\"add\"}]}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping_address_id\":0,\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"ndc\":\"string\",\"update_ndc\":\"string\",\"sku\":\"string\",\"update_sku\":\"string\",\"gcn_seqno\":0,\"quantity\":0,\"package_size\":0,\"action\":\"add\"}]}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PATCH", "/v1/orders/%7Border_number%7D", payload,
            headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.patch("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"brand_id\":\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\",\"shipping_address_id\":0,\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"ndc\":\"string\",\"update_ndc\":\"string\",\"sku\":\"string\",\"update_sku\":\"string\",\"gcn_seqno\":0,\"quantity\":0,\"package_size\":0,\"action\":\"add\"}]}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D\"\n\n\tpayload := strings.NewReader(\"{\\\"brand_id\\\":\\\"1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da\\\",\\\"shipping_address_id\\\":0,\\\"shipping\\\":{\\\"method_id\\\":0,\\\"signature_confirmation\\\":true,\\\"label_format\\\":\\\"zpl\\\",\\\"label_data\\\":\\\"string\\\",\\\"tracking_number\\\":\\\"string\\\"},\\\"address\\\":{\\\"first_name\\\":\\\"string\\\",\\\"last_name\\\":\\\"string\\\",\\\"street1\\\":\\\"string\\\",\\\"street2\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"zip\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"accept_suggested\\\":true,\\\"ignore_warnings\\\":true},\\\"items\\\":[{\\\"ndc\\\":\\\"string\\\",\\\"update_ndc\\\":\\\"string\\\",\\\"sku\\\":\\\"string\\\",\\\"update_sku\\\":\\\"string\\\",\\\"gcn_seqno\\\":0,\\\"quantity\\\":0,\\\"package_size\\\":0,\\\"action\\\":\\\"add\\\"}]}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    delete:
      summary: Cancel Order
      tags:
        - Orders
      operationId: cancel-order
      description: Cancel an order if it has not yet been filled
      responses:
        '204':
          description: No Content
        '404':
          description: Not Found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request DELETE \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "DELETE",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Delete.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("DELETE", "/v1/orders/%7Border_number%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.delete("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/orders/{order_number}/reorders':
    parameters:
      - name: order_number
        in: path
        description: Order Number
        required: true
        schema:
          type: string
    post:
      summary: Reorder a previously shipped order
      tags:
        - Orders
      description: Create a Reorder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - reason
              properties:
                reason:
                  type: string
                  description: >-
                    The "reason name" for replacing the order. Valid reasons
                    include those returned from the replacement reasons API.
                shipping:
                  type: object
                  properties:
                    method_id:
                      type: integer
                    signature_confirmation:
                      type: boolean
                    label_format:
                      type: string
                      enum:
                        - zpl
                    label_data:
                      type: string
                      description: must be base64 encoded including newlines
                    tracking_number:
                      type: string
                address:
                  type: object
                  description: required if sending shipping label
                  required:
                    - first_name
                    - last_name
                    - street1
                    - street2
                    - city
                    - state
                    - zip
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    street1:
                      type: string
                    street2:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                      pattern: '^[A-Z]{2}$'
                    zip:
                      type: string
                      pattern: '^\d{5}$'
                    phone:
                      type: string
                    accept_suggested:
                      type: boolean
                    ignore_warnings:
                      type: boolean
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      sku:
                        type: string
                        description: >-
                          SKUs can be used to create the order with
                          over-the-counter items or prescription items.
                      quantity:
                        type: integer
                        default: 1
                        description: >-
                          The number of items purchased. Required if a
                          Prescription ID is not included.
                      package_size:
                        type: integer
                        description: >-
                          The package_size purchased. Required if a Prescription
                          ID is not included.
                      prescription_id:
                        type: integer
                        description: >-
                          Prescription ID are required if redo product requires
                          prescription
      responses:
        '201':
          description: Created
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  order_number:
                    type: string
                  patient_id:
                    type: string
                  brand:
                    type: object
                    description: The brand associated with the order
                    title: Brand
                    x-examples: *ref_15
                    properties: *ref_16
                  warnings:
                    type: object
                    description: Warnings about the order
                    title: OrderWarnings
                    x-examples: *ref_28
                    properties: *ref_29
                  medication_requests:
                    type: array
                    items: *ref_11
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                                 |
            Description |

            | ----------- | --------------------------------------- |
            ------------------------------------------------------- |

            | 42201       | Invalid Patient Email                   | The
            provided email was invalid. |

            | 42202       | Invalid Patient First Name              | The
            provided first name was invalid. |

            | 42203       | Invalid Patient Last Name               | The
            provided last name was invalid. |

            | 42204       | Invalid Patient Phone                   | The
            provided phone was invalid. |

            | 42205       | Invalid Patient Gender                  | The
            provided gender code was invalid. |

            | 42206       | Invalid Patient Id                      | The
            provided patient id was invalid. |

            | 42221       | Invalid Address First Name              | The
            provided first name was invalid. |

            | 42222       | Invalid Address Last Name               | The
            provided last name was invalid. |

            | 42223       | Invalid Address Street1                 | The
            provided street1 was invalid. |

            | 42225       | Invalid Address City                    | The
            provided city was invalid. |

            | 42226       | Invalid Address State Abbreviation      | The state
            provided did not match a correct 2-character state code. |

            | 42227       | Invalid Address Zip                     | The zip
            code provided was formatted incorrectly, or did not exist in the
            state provided. |

            | 42230       | Invalid Address                         | The
            provided address was invalid. |

            | 42231       | Invalid Address State                   | The state
            provided cannot be shipped to. |

            | 42241       | Invalid Item NDC                        | The
            provided NDC does not match a product offering in the catalog. |

            | 42242       | Invalid Item Quantity                   | The
            provided quantity does not match a product offering in the catalog.
            |

            | 42243       | Invalid Item Prescriber Name            | The
            provided prescriber name was invalid. |

            | 42244       | Invalid Item Prescriber Phone           | The
            provided prescriber phone was invalid. |

            | 42245       | Invalid Item Prescriber Fax             | The
            provided prescriber fax was invalid. |

            | 42246       | Invalid Item GCN                        | The
            provided GCN Sequence Number does not match a product offering in
            the catalog. |

            | 42247       | Invalid Item Package Size               | The
            provided package size does not match a product offering in the
            catalog. |

            | 42249       | Invalid Item Prescription Id            | The
            provided prescription id for `partner_requested_fills` workflow was
            invalid. |

            | 42250       | Invalid Item Prescription Refills       | The
            provided prescription id for `partner_requested_fills` workflow has
            no remaining refills. |

            | 42254       | Invalid Item SKU                        | The
            requested SKU does not match a product offering in the catalog. |

            | 42256       | Invalid Item Shipping Method            | The
            requested shipping method cannot be used on an item in this order. |

            | 42257       | Invalid Item Prescription Expired       | The
            requested prescription is expired. |

            | 42258       | Invalid Item Prescription Ndc           | The
            requested item does not match medication on prescription. |

            | 42259       | Invalid Item Written Quantity           | The
            written quantity on the prescription does not match a product
            offering in the catalog. |

            | 42260       | Invalid Item Product Selection          | The
            requested item does not match a product in your formulary. |

            | 42291       | Invalid Shipping Method Id              | The
            provided shipping method id is invalid. |

            | 42292       | Invalid Shipping Signature Confirmation | The
            requested shipping signature confirmation is not available for the
            shipping method id selected. |

            | 42293       | Invalid Shipping Method Carrier         | The
            requested shipping method is incompatible with addresss for general
            delivery or PO BOX. |

            | 42380       | Invalid Brand                           | The
            provided brand id did not match a known brand for this account. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/reorders \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"reason":"string","shipping":{"method_id":0,"signature_confirmation":true,"label_format":"zpl","label_data":"string","tracking_number":"string"},"address":{"first_name":"string","last_name":"string","street1":"string","street2":"string","city":"string","state":"string","zip":"string","phone":"string","accept_suggested":true,"ignore_warnings":true},"items":[{"sku":"string","quantity":1,"package_size":0,"prescription_id":0}]}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D/reorders",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              reason: 'string',
              shipping: {
                method_id: 0,
                signature_confirmation: true,
                label_format: 'zpl',
                label_data: 'string',
                tracking_number: 'string'
              },
              address: {
                first_name: 'string',
                last_name: 'string',
                street1: 'string',
                street2: 'string',
                city: 'string',
                state: 'string',
                zip: 'string',
                phone: 'string',
                accept_suggested: true,
                ignore_warnings: true
              },
              items: [{sku: 'string', quantity: 1, package_size: 0, prescription_id: 0}]
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/reorders")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"reason\":\"string\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"sku\":\"string\",\"quantity\":1,\"package_size\":0,\"prescription_id\":0}]}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"reason\":\"string\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"sku\":\"string\",\"quantity\":1,\"package_size\":0,\"prescription_id\":0}]}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v1/orders/%7Border_number%7D/reorders",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/reorders")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"reason\":\"string\",\"shipping\":{\"method_id\":0,\"signature_confirmation\":true,\"label_format\":\"zpl\",\"label_data\":\"string\",\"tracking_number\":\"string\"},\"address\":{\"first_name\":\"string\",\"last_name\":\"string\",\"street1\":\"string\",\"street2\":\"string\",\"city\":\"string\",\"state\":\"string\",\"zip\":\"string\",\"phone\":\"string\",\"accept_suggested\":true,\"ignore_warnings\":true},\"items\":[{\"sku\":\"string\",\"quantity\":1,\"package_size\":0,\"prescription_id\":0}]}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/reorders\"\n\n\tpayload := strings.NewReader(\"{\\\"reason\\\":\\\"string\\\",\\\"shipping\\\":{\\\"method_id\\\":0,\\\"signature_confirmation\\\":true,\\\"label_format\\\":\\\"zpl\\\",\\\"label_data\\\":\\\"string\\\",\\\"tracking_number\\\":\\\"string\\\"},\\\"address\\\":{\\\"first_name\\\":\\\"string\\\",\\\"last_name\\\":\\\"string\\\",\\\"street1\\\":\\\"string\\\",\\\"street2\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"state\\\":\\\"string\\\",\\\"zip\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"accept_suggested\\\":true,\\\"ignore_warnings\\\":true},\\\"items\\\":[{\\\"sku\\\":\\\"string\\\",\\\"quantity\\\":1,\\\"package_size\\\":0,\\\"prescription_id\\\":0}]}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/orders/{order_number}/shipping_address':
    parameters:
      - name: order_number
        in: path
        description: Order Number
        required: true
        schema:
          type: string
    put:
      summary: Put Order Shipping Address
      tags:
        - Orders
      description: Put Order Shipping Address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - first_name
                - last_name
                - street1
                - city
                - state
                - zip
              title: Address
              x-examples: *ref_18
              example: *ref_19
              type: object
              properties: *ref_20
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: *ref_8
        '400':
          description: Malformed Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_14
        '404':
          description: Not Found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                                        |
            Description |

            | ----------- | ---------------------------------------------- |
            ----------- |

            | 42221       | Invalid Address First Name                     | The
            provided first name was invalid. |

            | 42222       | Invalid Address Last Name                      | The
            provided last name was invalid. |

            | 42223       | Invalid Address Street1                        | The
            provided street1 was invalid. |

            | 42225       | Invalid Address City                           | The
            provided city was invalid. |

            | 42226       | Invalid Address State Abbreviation             | The
            state provided did not match a correct 2-character state code. |

            | 42227       | Invalid Address Zip                            | The
            zip code provided was formatted incorrectly, or did not exist in the
            state provided. |

            | 42229       | Invalid Controlled Substance Address Update    |
            Approval required to update shipping address on orders containing
            controlled medications. |

            | 42230       | Invalid Address                                | The
            provided address was invalid. |

            | 42231       | Invalid Address State                          | The
            state provided cannot be shipped to. |

            | 42293       | Invalid Shipping Method Carrier                | The
            shipping method is incompatible with addresss for general delivery
            or PO BOX. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PUT \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/shipping_address \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"first_name":"Sotiria","last_name":"Alla","phone":"7422937793","street1":"1 W. Carriage Street","street2":"#25","city":"Minneapolis","state":"MN","zip":"55406","default":true,"accept_suggested":false,"ignore_warnings":false}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "PUT",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D/shipping_address",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              first_name: 'Sotiria',
              last_name: 'Alla',
              phone: '7422937793',
              street1: '1 W. Carriage Street',
              street2: '#25',
              city: 'Minneapolis',
              state: 'MN',
              zip: '55406',
              default: true,
              accept_suggested: false,
              ignore_warnings: false
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/shipping_address")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Put.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1
            W. Carriage
            Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("PUT",
            "/v1/orders/%7Border_number%7D/shipping_address", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.put("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/shipping_address")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"first_name\":\"Sotiria\",\"last_name\":\"Alla\",\"phone\":\"7422937793\",\"street1\":\"1 W. Carriage Street\",\"street2\":\"#25\",\"city\":\"Minneapolis\",\"state\":\"MN\",\"zip\":\"55406\",\"default\":true,\"accept_suggested\":false,\"ignore_warnings\":false}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/shipping_address\"\n\n\tpayload := strings.NewReader(\"{\\\"first_name\\\":\\\"Sotiria\\\",\\\"last_name\\\":\\\"Alla\\\",\\\"phone\\\":\\\"7422937793\\\",\\\"street1\\\":\\\"1 W. Carriage Street\\\",\\\"street2\\\":\\\"#25\\\",\\\"city\\\":\\\"Minneapolis\\\",\\\"state\\\":\\\"MN\\\",\\\"zip\\\":\\\"55406\\\",\\\"default\\\":true,\\\"accept_suggested\\\":false,\\\"ignore_warnings\\\":false}\")\n\n\treq, _ := http.NewRequest(\"PUT\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/orders/{order_number}/partner_order_action_requests':
    parameters:
      - name: order_number
        in: path
        description: Order Number
        required: true
        schema:
          type: string
    get:
      summary: Get Partner Order Action Requests on Order
      tags:
        - Orders
      description: Get Partner Order Action Requests on Order
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: &ref_76
                title: OrderException
                x-examples: {}
                type: object
                properties:
                  id:
                    type: integer
                    format: int32
                    description: The exception ID
                  name:
                    type: string
                    description: The exception name
                  message:
                    type: string
                    description: The exception extended description
                  order_actions:
                    type: array
                    items: &ref_34
                      title: OrderAction
                      x-examples: {}
                      type: object
                      properties:
                        event_key:
                          type: string
                          description: >-
                            The order action event_key used to pass to the
                            partner_order_action_requests endpoint
                        action:
                          type: string
                          description: The order action description
        '404':
          description: Not Found
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D/partner_order_action_requests",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/v1/orders/%7Border_number%7D/partner_order_action_requests",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
    post:
      summary: Submit New Partner Order Action Request
      tags:
        - Orders
      description: Submit New Partner Order Action Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - event
              title: OrderStatusEvent
              x-examples: &ref_77 {}
              properties: &ref_78
                event:
                  type: string
                  format: string
                  description: The event to apply to the order.
                  enum:
                    - VERIFIED_BY_PARTNER
                    - CANCEL_BY_PARTNER
                    - PUT_ON_HOLD_BY_PARTNER
                    - REQUEST_REFUND_BY_PARTNER
                reason_id:
                  type: integer
                  format: int32
                  description: >
                    The id of the refund reason. Only required for
                    `REQUEST_REFUND_BY_PARTNER` event.


                    Possible `reason_ids` for `REQUEST_REFUND_BY_PARTNER` event:


                    | Reason ID | Reason Name                        |

                    | --------- | ---------------------------------- |

                    | 37        | Honeybee Error                     |
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema: &ref_79
                title: OrderStatusEventResponse
                x-examples: {}
                properties:
                  order_number:
                    type: string
                    format: string
                    description: The updated order's order number
                  status_name:
                    type: string
                    format: string
                    description: The update order's status
        '404':
          description: Not Found
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
        '422':
          description: >
            #Invalid Request


            ## Error Codes

            | Status Code | Meaning                          | Description |

            | ----------- | -------------------------------- | ----------- |

            | 42430       | Invalid Order Status Reason Id   | The provided
            order status reason id is invalid. |

            | 42461       | Invalid Order Action Event       | The provided
            order action event is invalid. |

            | 42462       | Invalid Order Action Request     | The provided
            order cannot be verified through the API. |

            | 42463       | Invalid Order for Action Request | The event cannot
            be applied to the order. |
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: *ref_5
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"event":"VERIFIED_BY_PARTNER","reason_id":0}'
        - lang: Node
          source: >-
            const http = require("https");


            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/orders/%7Border_number%7D/partner_order_action_requests",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };


            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });


            req.write(JSON.stringify({event: 'VERIFIED_BY_PARTNER', reason_id:
            0}));

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body = "{\"event\":\"VERIFIED_BY_PARTNER\",\"reason_id\":0}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload = "{\"event\":\"VERIFIED_BY_PARTNER\",\"reason_id\":0}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST",
            "/v1/orders/%7Border_number%7D/partner_order_action_requests",
            payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"event\":\"VERIFIED_BY_PARTNER\",\"reason_id\":0}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/orders/%7Border_number%7D/partner_order_action_requests\"\n\n\tpayload := strings.NewReader(\"{\\\"event\\\":\\\"VERIFIED_BY_PARTNER\\\",\\\"reason_id\\\":0}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /refund_reasons:
    get:
      summary: Get All Available Refund Reasons
      tags:
        - Refund Reasons
      operationId: get-refund-reasons
      description: Get all available refund reasons
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  refund_reasons:
                    type: array
                    items: &ref_70
                      title: RefundReason
                      x-examples: {}
                      type: object
                      properties:
                        id:
                          type: integer
                          format: int32
                          description: The refund reason ID
                        reason_name:
                          type: string
                          description: The refund reason name
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/refund_reasons \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/refund_reasons",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://partners.honeybeehealth.com/v1/refund_reasons")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/v1/refund_reasons", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/refund_reasons")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/refund_reasons\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /replacement_reasons:
    get:
      summary: Get All Available Replacement Reasons
      tags:
        - Replacement Reasons
      operationId: get-replacement-reasons
      description: Get all available replacement reasons
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  replacement_reasons:
                    type: array
                    items: &ref_71
                      title: ReplacementReason
                      x-examples: {}
                      type: object
                      properties:
                        id:
                          type: integer
                          format: int32
                          description: The replacement reason ID
                        reason_name:
                          type: string
                          description: The replacement reason name
                        notes:
                          type: string
                          description: >-
                            More detailed information related to the replacement
                            reason
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/replacement_reasons \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/replacement_reasons",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/replacement_reasons")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/v1/replacement_reasons", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/replacement_reasons")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/replacement_reasons\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /shipping_methods:
    get:
      summary: Get All Available Shipping Methods
      tags:
        - Shipping Methods
      operationId: get-shipping-methods
      description: Get all available shipping methods
      parameters:
        - name: 'gcn[]'
          in: query
          description: >-
            collection of GCNs. When provided, only shipping methods that are
            available for the given GCNs will be returned.
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  shipping_methods:
                    type: array
                    items: &ref_72
                      title: ShippingMethod
                      x-examples: *ref_31
                      type: object
                      required: *ref_32
                      properties: *ref_33
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://partners.honeybeehealth.com/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Get.new(url)

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE", headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/shipping_methods?gcn%5B%5D=SOME_ARRAY_VALUE\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /order_actions:
    get:
      summary: Get All Available Order Actions
      tags:
        - Order Actions
      operationId: get-order-actions
      description: Get all available order actions
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
            ETag: *ref_2
          content:
            application/json:
              schema:
                properties:
                  order_actions:
                    type: array
                    items: *ref_34
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url https://partners.honeybeehealth.com/v1/order_actions \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/order_actions",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: |-
            require 'uri'
            require 'net/http'
            require 'openssl'

            url = URI("https://partners.honeybeehealth.com/v1/order_actions")

            http = Net::HTTP.new(url.host, url.port)
            http.use_ssl = true
            http.verify_mode = OpenSSL::SSL::VERIFY_NONE

            request = Net::HTTP::Get.new(url)
            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            response = http.request(request)
            puts response.read_body
        - lang: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/v1/order_actions", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.get("https://partners.honeybeehealth.com/v1/order_actions")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/order_actions\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  /simulate:
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
    post:
      summary: Simulate Event
      tags:
        - Sandbox
      operationId: simulate-event
      description: Simulate events in the sandbox environment for testing webhooks
      requestBody:
        content:
          application/json:
            schema: &ref_80
              title: SimulateEvent
              example:
                simulation_type: event
                simulation:
                  event_type: RX_RECEIVED
                  medication_requests:
                    - prescriber_name: Dr. Jane Foster
                      drug_name: ATORVASTATIN 10MG TABLET
                      ndc: '5976201551'
                      gcn: 16393
                      sig_text: Take 1 tablet daily
                      written_qty: 90
                      refills_left: 2
                      expire_date: '2023-06-12T14:15:22Z'
                      drug_schedule: 4
              type: object
              properties:
                simulation_type:
                  type: string
                  enum:
                    - event
                simulation:
                  type: object
                  properties:
                    event_id:
                      type: number
                      readOnly: true
                    event_type:
                      type: string
                      enum:
                        - RX_RECEIVED
                    medication_requests:
                      type: array
                      items:
                        type: object
                        properties:
                          prescriber_name:
                            type: string
                            description: Prescriber name
                          drug_name:
                            type: string
                            description: Drug description
                          ndc:
                            type: string
                            description: Drug NDC Code
                          gcn:
                            type: integer
                            description: Drug GCN
                          sig_text:
                            type: string
                            description: Directions
                          written_qty:
                            type: number
                            description: Written quantity
                          refills_left:
                            type: number
                            description: Refills left on prescription
                          expire_date:
                            type: string
                            format: date-time
                            description: Prescription expiration date
                          drug_schedule:
                            type: number
                            description: DEA Drug Schedule (use 4 for most medications)
      responses:
        '202':
          description: Accepted
        '409':
          description: Conflicting Request
          headers:
            X-Request-Id: *ref_0
          content:
            application/json:
              schema: *ref_13
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request POST \
              --url https://partners.honeybeehealth.com/v1/simulate \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"simulation_type":"event","simulation":{"event_type":"RX_RECEIVED","medication_requests":[{"prescriber_name":"Dr. Jane Foster","drug_name":"ATORVASTATIN 10MG TABLET","ndc":"5976201551","gcn":16393,"sig_text":"Take 1 tablet daily","written_qty":90,"refills_left":2,"expire_date":"2023-06-12T14:15:22Z","drug_schedule":4}]}}'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/simulate",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              simulation_type: 'event',
              simulation: {
                event_type: 'RX_RECEIVED',
                medication_requests: [
                  {
                    prescriber_name: 'Dr. Jane Foster',
                    drug_name: 'ATORVASTATIN 10MG TABLET',
                    ndc: '5976201551',
                    gcn: 16393,
                    sig_text: 'Take 1 tablet daily',
                    written_qty: 90,
                    refills_left: 2,
                    expire_date: '2023-06-12T14:15:22Z',
                    drug_schedule: 4
                  }
                ]
              }
            }));
            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url = URI("https://partners.honeybeehealth.com/v1/simulate")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Post.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'

            request["content-type"] = 'application/json'

            request.body =
            "{\"simulation_type\":\"event\",\"simulation\":{\"event_type\":\"RX_RECEIVED\",\"medication_requests\":[{\"prescriber_name\":\"Dr.
            Jane Foster\",\"drug_name\":\"ATORVASTATIN 10MG
            TABLET\",\"ndc\":\"5976201551\",\"gcn\":16393,\"sig_text\":\"Take 1
            tablet
            daily\",\"written_qty\":90,\"refills_left\":2,\"expire_date\":\"2023-06-12T14:15:22Z\",\"drug_schedule\":4}]}}"


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            payload =
            "{\"simulation_type\":\"event\",\"simulation\":{\"event_type\":\"RX_RECEIVED\",\"medication_requests\":[{\"prescriber_name\":\"Dr.
            Jane Foster\",\"drug_name\":\"ATORVASTATIN 10MG
            TABLET\",\"ndc\":\"5976201551\",\"gcn\":16393,\"sig_text\":\"Take 1
            tablet
            daily\",\"written_qty\":90,\"refills_left\":2,\"expire_date\":\"2023-06-12T14:15:22Z\",\"drug_schedule\":4}]}}"


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/v1/simulate", payload, headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://partners.honeybeehealth.com/v1/simulate")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"simulation_type\":\"event\",\"simulation\":{\"event_type\":\"RX_RECEIVED\",\"medication_requests\":[{\"prescriber_name\":\"Dr. Jane Foster\",\"drug_name\":\"ATORVASTATIN 10MG TABLET\",\"ndc\":\"5976201551\",\"gcn\":16393,\"sig_text\":\"Take 1 tablet daily\",\"written_qty\":90,\"refills_left\":2,\"expire_date\":\"2023-06-12T14:15:22Z\",\"drug_schedule\":4}]}}")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/simulate\"\n\n\tpayload := strings.NewReader(\"{\\\"simulation_type\\\":\\\"event\\\",\\\"simulation\\\":{\\\"event_type\\\":\\\"RX_RECEIVED\\\",\\\"medication_requests\\\":[{\\\"prescriber_name\\\":\\\"Dr. Jane Foster\\\",\\\"drug_name\\\":\\\"ATORVASTATIN 10MG TABLET\\\",\\\"ndc\\\":\\\"5976201551\\\",\\\"gcn\\\":16393,\\\"sig_text\\\":\\\"Take 1 tablet daily\\\",\\\"written_qty\\\":90,\\\"refills_left\\\":2,\\\"expire_date\\\":\\\"2023-06-12T14:15:22Z\\\",\\\"drug_schedule\\\":4}]}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
  '/webhooks/{event_id}':
    parameters:
      - name: Accept
        in: header
        description: application/json
        schema:
          type: string
        required: true
      - name: event_id
        in: path
        description: The event ID
        schema:
          type: string
        required: true
    patch:
      summary: Replay Webhook
      tags:
        - Webhooks
      responses:
        '200':
          description: OK
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema: &ref_84
                title: Webhook
                type: object
                x-examples: {}
                required:
                  - uid
                  - request_body
                  - success
                  - event_type
                  - created_at
                properties:
                  uid:
                    type: string
                    format: uuid
                  request_body:
                    type: string
                  response_body:
                    type: string
                  success:
                    type: boolean
                  response_status_code:
                    type: integer
                  event_type:
                    type: string
                  signature:
                    type: string
                  created_at:
                    type: string
                    format: date-time
        '404':
          description: event_id not found
        '422':
          description: Unprocessable Entity
          headers:
            X-Request-Id: *ref_0
            X-Honeybee-Signature: *ref_1
          content:
            application/json:
              schema:
                title: UnprocessableError
                type: object
                x-examples: &ref_83 {}
                description: >-
                  An individual error object with a code, message, and
                  error_detail
                required: *ref_35
                properties: *ref_36
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://partners.honeybeehealth.com/v1/webhooks/%7Bevent_id%7D \
              --header 'Accept: SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Node
          source: |-
            const http = require("https");

            const options = {
              "method": "PATCH",
              "hostname": "partners.honeybeehealth.com",
              "port": null,
              "path": "/v1/webhooks/%7Bevent_id%7D",
              "headers": {
                "Accept": "SOME_STRING_VALUE",
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Ruby
          source: >-
            require 'uri'

            require 'net/http'

            require 'openssl'


            url =
            URI("https://partners.honeybeehealth.com/v1/webhooks/%7Bevent_id%7D")


            http = Net::HTTP.new(url.host, url.port)

            http.use_ssl = true

            http.verify_mode = OpenSSL::SSL::VERIFY_NONE


            request = Net::HTTP::Patch.new(url)

            request["Accept"] = 'SOME_STRING_VALUE'

            request["Authorization"] = 'Bearer REPLACE_BEARER_TOKEN'


            response = http.request(request)

            puts response.read_body
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("partners.honeybeehealth.com")


            headers = {
                'Accept': "SOME_STRING_VALUE",
                'Authorization': "Bearer REPLACE_BEARER_TOKEN"
                }

            conn.request("PATCH", "/v1/webhooks/%7Bevent_id%7D",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
        - lang: Java
          source: >-
            HttpResponse<String> response =
            Unirest.patch("https://partners.honeybeehealth.com/v1/webhooks/%7Bevent_id%7D")
              .header("Accept", "SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
        - lang: Go
          source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://partners.honeybeehealth.com/v1/webhooks/%7Bevent_id%7D\"\n\n\treq, _ := http.NewRequest(\"PATCH\", url, nil)\n\n\treq.Header.Add(\"Accept\", \"SOME_STRING_VALUE\")\n\treq.Header.Add(\"Authorization\", \"Bearer REPLACE_BEARER_TOKEN\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}"
x-webhooks:
  rxReceived:
    post:
      summary: Prescription Received
      tags:
        - Events
      security: []
      requestBody:
        description: Prescription Received
        content:
          application/json:
            schema:
              allOf:
                - &ref_37
                  title: WebhookEvent
                  type: object
                  x-examples: {}
                  properties:
                    event_id:
                      type: string
                      format: uuid
                    patient_id:
                      type: string
                      description: Patient ID
                      example: ay87nt
                - properties:
                    event_type:
                      type: string
                      description: RX_RECEIVED
                      example: RX_RECEIVED
                - type: object
                  properties:
                    medication_requests:
                      type: array
                      items: &ref_53
                        title: RxReceivedMedicationRequest
                        type: object
                        example:
                          id: 183601
                          prescription_id: 183601
                          prescription_msg_id: app-1233413144
                          patient_id: utt2cn
                          prescriber_name: Dr. Julius Michael Hibbert
                          active: true
                          receive_date: '2019-09-14T13:17:54.906-07:00'
                          drug_name: IBUPROFEN 400 MG TABLET
                          ndc: '62135040012'
                          gcn: 16393
                          sig_text: >-
                            Take 2 tablets by mouth every 8 hours as needed for
                            pain/discomfort.
                          written_qty: 90
                          refills_left: 1
                          days_supply: 1.5
                          expire_date: '2020-09-13T17:00:00.000-07:00'
                          drug_schedule: '0'
                        properties:
                          id:
                            type: integer
                            description: Prescription ID
                          prescription_id:
                            type: integer
                            description: Prescription ID
                          prescription_msg_id:
                            type: string
                            description: Prescription message ID
                          patient_id:
                            type: string
                            description: Patient ID (will not update for existing patients)
                          prescriber_name:
                            type: string
                            description: Prescriber name
                          active:
                            type: boolean
                            description: Prescription is active or inactive
                          receive_date:
                            type: string
                            format: date-time
                            description: Prescription received date
                          drug_name:
                            type: string
                            description: Requested medication
                          ndc:
                            type: string
                            description: Prescribed National Drug Code
                          gcn:
                            type: integer
                            description: Prescribed Generic Code Number
                          sig_text:
                            type: string
                            description: >-
                              Prescriber instructions (optional, non-null/empty
                              on certain status)
                          written_qty:
                            type: number
                            format: float
                            description: Prescribed quantity
                          refills_left:
                            type: number
                            format: float
                            description: Number of refills remaining
                          days_supply:
                            type: number
                            format: float
                            description: Days Supply
                          expire_date:
                            type: string
                            format: date-time
                            description: Prescription expiration date
                          drug_schedule:
                            type: string
                            description: FDA drug schedule
      responses:
        '200':
          description: 200 Status Code indicates a successful delivery
  rxUpdated:
    post:
      summary: Prescription Updated
      tags:
        - Events
      security: []
      requestBody:
        description: Prescription Updated
        content:
          application/json:
            schema:
              allOf:
                - *ref_37
                - properties:
                    event_type:
                      type: string
                      description: RX_UPDATED
                      example: RX_UPDATED
                - type: object
                  properties:
                    medication_requests:
                      type: array
                      items: &ref_55
                        allOf:
                          - &ref_41
                            title: RxUpdatedMedicationRequest
                            type: object
                            example:
                              id: 183601
                              prescription_id: 183601
                              active: true
                              receive_date: '2019-09-14T13:17:54.906-07:00'
                              drug_name: IBUPROFEN 400 MG TABLET
                              ndc: '62135040012'
                              gcn: 16393
                              sig_text: >-
                                Take 2 tablets by mouth every 8 hours as needed
                                for pain/discomfort.
                              written_qty: 90
                              refills_left: 2
                              expire_date: '2020-09-13T17:00:00.000-07:00'
                            properties:
                              id:
                                type: integer
                                description: Prescription ID
                              prescription_id:
                                type: integer
                                description: Prescription ID
                              active:
                                type: boolean
                                description: Prescription is active or inactive
                              receive_date:
                                type: string
                                format: date-time
                                description: Prescription received date
                              drug_name:
                                type: string
                                description: Requested medication
                              ndc:
                                type: string
                                description: Prescribed National Drug Code
                              gcn:
                                type: integer
                                description: Prescribed Generic Code Number
                              sig_text:
                                type: string
                                description: >-
                                  Prescriber instructions (optional,
                                  non-null/empty on certain status)
                              written_qty:
                                type: number
                                format: float
                                description: Prescribed quantity
                              refills_left:
                                type: number
                                format: float
                                description: Number of refills remaining
                              expire_date:
                                type: string
                                format: date-time
                                description: Prescription expiration date
                          - properties:
                              medication_dispenses:
                                description: Dispensed prescriptions
                                type: array
                                items: &ref_57
                                  allOf:
                                    - &ref_42
                                      allOf:
                                        - *ref_38
                                        - properties:
                                            shipment:
                                              type: object
                                              description: Shipment
                                              allOf: &ref_60
                                                - &ref_59
                                                  title: Shipment
                                                  example: *ref_9
                                                  properties: *ref_10
                                                - properties:
                                                    latest_shipment_update:
                                                      type: object
                                                      description: >-
                                                        The latest update from the carrier for
                                                        the shipment.
                                                      title: ShipmentUpdate
                                                      example: &ref_39
                                                        event_code: NT
                                                        description: 'In Transit, Arriving On Time'
                                                        occurred_at: '2019-09-15T09:28:57.000-07:00'
                                                      properties: &ref_40
                                                        event_code:
                                                          type: string
                                                          description: >-
                                                            A 2-character code relayed from the
                                                            carrier.
                                                        description:
                                                          type: string
                                                          description: >-
                                                            A description of the shipment update
                                                            associated with the event code.
                                                        occurred_at:
                                                          type: string
                                                          format: date-time
                                                          description: When the update occurred by the carrier.
                                                    shipment_updates:
                                                      example:
                                                        - event_code: NT
                                                          description: 'In Transit, Arriving On Time'
                                                          occurred_at: '2019-09-15T09:28:57.000-07:00'
                                                        - event_code: OA
                                                          description: Accepted at USPS Origin Facility
                                                          occurred_at: '2019-09-14T09:28:57.000-07:00'
                                                      type: array
                                                      items: &ref_61
                                                        title: ShipmentUpdate
                                                        example: *ref_39
                                                        type: object
                                                        properties: *ref_40
                                    - properties:
                                        dispense_scans:
                                          type: array
                                          description: >-
                                            Any barcode/QR code scans taken of
                                            picked medication dispenses
                                          items:
                                            type: object
                                            properties:
                                              scanned_data:
                                                type: string
      responses:
        '200':
          description: 200 Status Code indicates a successful delivery
  orderException:
    post:
      summary: Order Exception Raised
      tags:
        - Events
      security: []
      requestBody:
        description: Order Exception Raised
        content:
          application/json:
            schema:
              allOf:
                - *ref_37
                - properties:
                    event_type:
                      type: string
                      description: ORDER_EXCEPTION
                      example: ORDER_EXCEPTION
                    exception:
                      type: object
                      example:
                        id: 67
                        order_number: 9D84N
                        name: State Invalid
                        message: State needs to be updated on the order
                        order_actions:
                          - event_key: verified_by_partner
                            action: >-
                              API Update - Update your order via our API with
                              the proper services to address the errors listed
                              in the hold reason and validate that you have
                              finished using the Partner Request Order Action
                              API listed in our documentation
                      properties:
                        id:
                          type: integer
                          format: int32
                          description: The exception ID
                        order_number:
                          type: string
                          description: The order number
                        name:
                          type: string
                          description: The exception name
                        message:
                          type: string
                          description: The exception extended description
                        order_actions:
                          type: array
                          items: *ref_34
      responses:
        '200':
          description: 200 Status Code indicates a successful delivery
  shipmentUpdated:
    post:
      summary: Shipment Updated
      tags:
        - Events
      security: []
      requestBody:
        description: Shipment Updated
        content:
          application/json:
            schema:
              allOf:
                - *ref_37
                - properties:
                    event_type:
                      type: string
                      description: SHIPMENT_UPDATED
                      example: SHIPMENT_UPDATED
                - type: object
                  properties:
                    medication_requests:
                      type: array
                      items: &ref_54
                        allOf:
                          - *ref_41
                          - properties:
                              medication_dispenses:
                                description: Dispensed prescriptions
                                type: array
                                items: *ref_42
      responses:
        '200':
          description: 200 Status Code indicates a successful delivery
components:
  headers:
    X-Request-Id: *ref_0
    X-Honeybee-Signature: *ref_1
    X-Honeybee-Secret:
      description: Base64 encoded HMAC-SHA1 hash of partner-supplied secret
      schema:
        type: string
      example: HVEqaMSPSgL2fl7+Mx7b3LAO72pw
    ETag: *ref_2
  parameters:
    accept: *ref_6
    authorization: *ref_7
    limit:
      name: limit
      in: query
      description: Page size for pagination
      required: false
      schema:
        type: integer
        default: 25
    page:
      name: page
      in: query
      description: Offset for pagination
      required: false
      schema:
        type: integer
        default: 0
    search_keyword:
      name: search_keyword
      in: query
      description: Keyword to search For
      required: false
      schema:
        type: string
    sort: *ref_43
  requestBodies:
    CreateOrderRequest: *ref_44
    CreateIdentityProviderRequest:
      required: true
      content:
        application/json:
          schema: &ref_48
            title: CreateIdentityProviderRequest
            type: object
            required:
              - entity_name
            properties:
              entity_name:
                type: string
                description: The Entity Name
              idp_entity_id:
                type: string
                description: The IDP Entity ID
              idp_sso_service_url:
                type: string
                description: The IDP SSO Service URL
              certificate:
                type: string
                description: The X.509 Certificate
              name_identifier_format:
                type: string
                description: The Name Identifier Format
              sso_domains:
                type: array
                items:
                  type: string
                description: The SSO Domains
              idp_metadata:
                type: string
                description: The IDP Metadata
    CreateFormularyRequestRequest:
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - requests
            properties:
              requests:
                type: array
                minItems: 1
                maxItems: 50
                items: &ref_51
                  type: object
                  required:
                    - sku
                    - launch_date
                    - est_monthly_volume
                  properties:
                    sku:
                      type: string
                      description: Product SKU
                    launch_date:
                      type: string
                      format: yyyy-mm-dd
                      description: Target launch date for the product
                    est_monthly_volume:
                      type: integer
                      description: Estimated first month volume
                      minimum: 0
                      example: 1000
  schemas:
    Account: *ref_45
    Addon: *ref_46
    Brand: *ref_47
    CreateIdentityProviderRequest: *ref_48
    CreateOrderRequest: *ref_49
    CreateOrderRequestItem: *ref_50
    IdentityProvider:
      title: IdentityProvider
      type: object
      required:
        - id
        - entity_name
        - idp_entity_id
        - idp_sso_service_url
        - idp_cert_fingerprint
        - idp_cert_fingerprint_algorithm
        - name_identifier_format
        - sso_domains
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          description: The Identity Provider ID
        entity_name:
          type: string
          description: The Entity Name
        idp_entity_id:
          type: string
          description: The IDP Entity ID
        idp_sso_service_url:
          type: string
          description: The IDP SSO Service URL
        idp_cert_fingerprint_algorithm:
          type: string
          description: The IDP Certificate Fingerprint Algorithm
        name_identifier_format:
          type: string
          description: The Name Identifier Format
        sso_domains:
          type: array
          items:
            type: string
          description: The SSO Domains
        created_at:
          type: string
          format: date-time
          description: The Date and Time the Identity Provider was created
        updated_at:
          type: string
          format: date-time
          description: The Date and Time the Identity Provider was last updated
    FormularyRequestItem: *ref_51
    FormularyProductRequest:
      type: object
      required:
        - sku
        - launch_date
        - est_monthly_volume
        - price
        - request_status
      properties:
        sku:
          type: string
          description: Product SKU
        launch_date:
          type: string
          format: date
          description: Target launch date for the product
        est_monthly_volume:
          type: integer
          description: Estimated first month volume
        price:
          type: number
          format: float
          description: Projected price of the product
        request_status:
          type: string
          enum:
            - pending
            - approved
            - denied
            - closed
        variants:
          type: array
          items:
            type: object
            required:
              - package_size
              - price
            properties:
              package_size:
                type: number
                format: float
              price:
                type: number
                format: float
    PrescriberRequestProperties: *ref_21
    PostRx:
      title: PostRx
      type: object
      x-examples: {}
      properties:
        Message:
          type: object
          required:
            - Body
          properties:
            Body:
              type: object
              required:
                - NewRx
              properties:
                NewRx:
                  type: object
                  required:
                    - Patient
                    - Pharmacy
                    - Prescriber
                    - MedicationPrescribed
                  properties:
                    Patient:
                      type: object
                      required:
                        - HumanPatient
                      properties:
                        HumanPatient:
                          type: object
                          required:
                            - Name
                            - Gender
                            - DateOfBirth
                            - CommunicationNumbers
                            - Address
                          properties:
                            Identification:
                              type: object
                              properties:
                                MedicalRecordIdentificationNumberEHR:
                                  type: string
                            Name:
                              type: object
                              required:
                                - FirstName
                                - LastName
                              properties:
                                FirstName:
                                  type: string
                                LastName:
                                  type: string
                            Gender:
                              type: string
                            DateOfBirth:
                              type: object
                              required:
                                - Date
                              properties:
                                Date:
                                  type: string
                            CommunicationNumbers:
                              type: object
                              required:
                                - ElectronicMail
                              properties:
                                ElectronicMail:
                                  type: string
                                  format: email
                                PrimaryTelephone:
                                  type: object
                                  properties:
                                    Number:
                                      type: string
                            Address:
                              type: object
                              required:
                                - AddressLine1
                                - City
                                - StateProvince
                                - PostalCode
                                - CountryCode
                              properties:
                                AddressLine1:
                                  type: string
                                AddressLine2:
                                  type: string
                                City:
                                  type: string
                                StateProvince:
                                  type: string
                                PostalCode:
                                  type: string
                                CountryCode:
                                  type: string
                    Pharmacy:
                      type: object
                      required:
                        - BusinessName
                        - Identification
                        - Address
                      properties:
                        BusinessName:
                          type: string
                        Identification:
                          type: object
                          required:
                            - NPI
                          properties:
                            NPI:
                              type: string
                            NCPDPID:
                              type: string
                        Address:
                          type: object
                          required:
                            - AddressLine1
                            - City
                            - StateProvince
                            - PostalCode
                            - CountryCode
                          properties:
                            AddressLine1:
                              type: string
                            AddressLine2:
                              type: string
                            City:
                              type: string
                            StateProvince:
                              type: string
                            PostalCode:
                              type: string
                            CountryCode:
                              type: string
                        CommunicationNumbers:
                          type: object
                          properties:
                            PrimaryTelephone:
                              type: object
                              properties:
                                Number:
                                  type: string
                            Fax:
                              type: object
                              properties:
                                Number:
                                  type: string
                    Prescriber:
                      type: object
                      required:
                        - NonVeterinarian
                      properties:
                        NonVeterinarian:
                          type: object
                          required:
                            - Name
                            - Identification
                            - PracticeLocation
                          properties:
                            Name:
                              type: object
                              required:
                                - FirstName
                                - LastName
                              properties:
                                FirstName:
                                  type: string
                                LastName:
                                  type: string
                            Identification:
                              type: object
                              required:
                                - NPI
                              properties:
                                NPI:
                                  type: string
                            PracticeLocation:
                              type: object
                              required:
                                - BusinessName
                              properties:
                                BusinessName:
                                  type: string
                            Address:
                              type: object
                              properties:
                                AddressLine1:
                                  type: string
                                AddressLine2:
                                  type: string
                                City:
                                  type: string
                                StateProvince:
                                  type: string
                                PostalCode:
                                  type: string
                                CountryCode:
                                  type: string
                            CommunicationNumbers:
                              type: object
                              properties:
                                PrimaryTelephone:
                                  type: object
                                  properties:
                                    Number:
                                      type: string
                                Fax:
                                  type: object
                                  properties:
                                    Number:
                                      type: string
                    MedicationPrescribed:
                      type: object
                      required:
                        - DrugCoded
                        - DaysSupply
                        - Quantity
                        - Sig
                        - WrittenDate
                        - NumberOfRefills
                        - Note
                      properties:
                        DrugDescription:
                          type: string
                        DrugCoded:
                          type: object
                          required:
                            - ProductCode
                          properties:
                            ProductCode:
                              type: object
                              required:
                                - Code
                              properties:
                                Code:
                                  type: string
                                Qualifier:
                                  type: string
                            DrugDbCode:
                              type: object
                              properties:
                                Code:
                                  type: string
                                Qualifier:
                                  type: string
                        DaysSupply:
                          type: integer
                        Quantity:
                          type: object
                          required:
                            - Value
                          properties:
                            Value:
                              type: integer
                            CodeListQualifier:
                              type: string
                            QuantityUnitOfMeasure:
                              type: object
                              properties:
                                Code:
                                  type: string
                        Sig:
                          type: object
                          required:
                            - SigText
                          properties:
                            SigText:
                              type: string
                        WrittenDate:
                          type: object
                          required:
                            - Date
                          properties:
                            Date:
                              type: string
                        NumberOfRefills:
                          type: integer
                        Substitutions:
                          type: integer
                        Note:
                          type: string
            Header:
              type: object
              properties:
                MessageID:
                  type: string
                PrescriberOrderNumber:
                  type: string
    WebhookEvent: *ref_37
    MedicationRequestSummary:
      title: MedicationRequestSummary
      type: object
      required:
        - id
        - partner_patient_id
        - drug_name
        - start_date
        - refills_left
        - prescription_status
        - product_option_values
      properties:
        id:
          type: integer
          description: Prescription ID
        script_no:
          type: string
          description: Prescription number
        partner_patient_id:
          type: string
          description: Partner's patient reference number
        patient_full_name:
          type: string
          description: 'Patient''s full name in "Last, First" format'
        patient_dob:
          type: string
          format: date
          description: Patient date of birth
        provider_name:
          type: string
          description: Prescribing provider's name
        provider_phone:
          type: string
          description: Prescribing provider's phone number
        drug_name:
          type: string
          description: Requested medication
        product_option_values:
          type: array
          description: Product option values
          items:
            type: object
            properties:
              option_name:
                type: string
                description: 'Option name (e.x. Strength, Form)'
              option_value:
                type: string
                description: 'Option value (e.x. 500 mg, Tablet)'
        ndc:
          type: string
          description: National Drug Code
        gcn:
          type: string
          description: Generic Code Number
        sig_text:
          type: string
          description: Prescriber instructions (SIG)
        written_qty:
          type: number
          format: float
          description: Prescribed quantity
        days_supply:
          type: number
          format: float
          description: Days supply for prescription
        refills_left:
          type: number
          format: float
          description: Number of refills remaining
        last_refill_date:
          type: string
          format: date
          description: Date of last refill
        start_date:
          type: string
          format: date
          description: Prescription start date
        prescription_status:
          type: string
          enum:
            - active
            - new
            - inactive
          description: 'Prescription status (inactive, new, or active)'
      example:
        id: 183601
        active: true
        receive_date: '2019-09-14T13:17:54.906-07:00'
    ApiMedicationRequest: *ref_52
    RxUpdatedMedicationRequest: *ref_41
    RxReceivedMedicationRequest: *ref_53
    ApiMedicationRequestWithDispenses: *ref_11
    WebhookMedicationRequestWithDispenses: *ref_54
    RxUpdatedWebhook: *ref_55
    WebhookRxReceivedMedicationRequest: *ref_53
    MedicationDispense: *ref_38
    ApiMedicationDispense: *ref_56
    WebhookMedicationDispense: *ref_42
    WebhookRxUpdatedMedicationDispense: *ref_57
    Product: *ref_58
    Shipment: *ref_59
    WebhookShipment:
      allOf: *ref_60
    ShipmentUpdate: *ref_61
    UpdateIdentityProviderRequest:
      title: UpdateIdentityProviderRequest
      type: object
      required:
        - entity_name
      properties:
        entity_name:
          type: string
          description: The Entity Name
        idp_entity_id:
          type: string
          description: The IDP Entity ID
        idp_sso_service_url:
          type: string
          description: The IDP SSO Service URL
        certificate:
          type: string
          description: The X.509 Certificate
        name_identifier_format:
          type: string
          description: The Name Identifier Format
        sso_domains:
          type: array
          items:
            type: string
          description: The SSO Domains
        idp_metadata:
          type: string
          description: The IDP Metadata
    UpdateOrderBody: *ref_62
    OrderExtended: *ref_30
    PutOrderShippingAddress:
      title: OrderShippingAddress
      type: object
      x-examples: {}
      required:
        - address
      properties:
        address:
          type: object
          required:
            - first_name
            - last_name
            - street1
            - city
            - state
            - zip
          properties:
            first_name:
              type: string
              description: The shipping address first name
            last_name:
              type: string
              description: The shipping address last name
            phone:
              type: string
              description: The shipping address phone
            street1:
              type: string
              description: The shipping address street address
            street2:
              type: string
              description: The shipping address apartment number
            city:
              type: string
              description: The shipping address city
            state:
              type: string
              description: The shipping address state
            zip:
              type: string
              description: The shipping address zip code
    Order: *ref_63
    OrderItem: *ref_64
    AddressRequest: *ref_65
    Address: *ref_8
    AddressWithValidation: *ref_66
    CreateClientApplicationBody:
      title: CreateClientApplicationBody
      x-examples: {}
      properties:
        name:
          type: string
    CreateClientApplicationResponse:
      title: CreateClientApplicationResponse
      x-examples: {}
      properties:
        id:
          type: string
        name:
          type: string
        client_id:
          type: string
        client_secret:
          type: string
        is_active:
          type: boolean
    ClientApplication:
      title: ClientApplication
      x-examples: {}
      required:
        - id
        - name
        - client_id
        - is_active
        - sign_events
        - created_at
      properties:
        id:
          type: string
        name:
          type: string
        client_id:
          type: string
        is_active:
          type: boolean
        signs_events:
          type: boolean
        created_at:
          type: string
          format: date-time
    AddressSuggestion:
      title: Address Suggestion
      x-examples: {}
      type: object
      properties:
        description:
          type: string
          description: The whole address inline
        place_id:
          type: string
          description: The google places id for this address
        structured_formatting:
          type: object
          properties:
            main_text:
              type: string
              description: The first line of the address
            secondary_text:
              type: string
              description: The second line of the address
        terms:
          description: Each address element broken out into an array
          type: array
          items:
            type: object
            properties:
              offset:
                type: number
                description: >-
                  The index of the starting character in the original address
                  string
              value:
                type: string
                description: The term substring
    AddressSuggestionDetail:
      title: Address Suggestion Detail
      x-examples: {}
      type: object
      properties:
        address_components:
          type: array
          items:
            type: object
            properties:
              long_name:
                type: string
                description: The long name of the address component
              short_name:
                type: string
                description: The short name of the address component
              types:
                type: array
                items:
                  type: string
                  description: >-
                    The identifier for what portion of the address this
                    component applies to
        types:
          type: array
          items:
            type: string
            description: The type of address
    AddressValidate:
      title: Address Validate
      x-examples: {}
      type: object
      properties:
        code:
          type: number
          description: The ship engine status code for the validation request
        retry_after:
          type: string
          format: date
          description: The ship engine response try after value
        status:
          type: string
          description: The status of the validation
          enum:
            - verified
            - unverified
            - warning
            - error
        matched_address:
          type: object
          properties:
            name:
              type: string
              description: The name associated with the matched address
            phone:
              type: string
              description: The phone number associated with the matched address
            company_name:
              type: string
              description: The company name associated with the matched address
            address_line1:
              type: string
              description: The first address line associated with the matched address
            address_line2:
              type: string
              description: The second address line associated with the matched address
            address_line3:
              type: string
              description: The last address line associated with the matched address
            city_locality:
              type: string
              description: The city associated with the matched address
            state_province:
              type: string
              description: The state associated with the matched address
            postal_code:
              type: string
              description: The zip code associated with the matched address
            country_code:
              type: string
              description: The country code associated with the matched address
            address_residential_indicator:
              type: string
              description: >-
                The indicator of whether of not this address belongs to a
                business or a personal residence
              enum:
                - 'yes'
                - unknown
                - 'no'
        original_address:
          type: object
          properties:
            name:
              type: string
              description: The name associated with the original address
            phone:
              type: string
              description: The phone number associated with the original address
            company_name:
              type: string
              description: The company name associated with the original address
            address_line1:
              type: string
              description: The first address line associated with the original address
            address_line2:
              type: string
              description: The second address line associated with the original address
            address_line3:
              type: string
              description: The last address line associated with the original address
            city_locality:
              type: string
              description: The city associated with the original address
            state_province:
              type: string
              description: The state associated with the original address
            postal_code:
              type: string
              description: The zip code associated with the original address
            country_code:
              type: string
              description: The country code associated with the original address
            address_residential_indicator:
              type: string
              description: >-
                The indicator of whether of not this address belongs to a
                business or a personal residence
              enum:
                - 'yes'
                - unknown
                - 'no'
        warning_messages:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                description: The Ship Engine warning code
              message:
                type: string
                description: The message associated with the warning code
              type:
                type: string
                description: The type of warning message
                enum:
                  - warning
                  - error
              detail_code:
                type: string
                description: >-
                  The detail code used for differentiating different
                  warning/error messages
    NewPatient: *ref_67
    ExistingPatientRequestProperties: *ref_68
    Patient: *ref_3
    PatientSafety: *ref_12
    PatientUpdateRequestBody: *ref_69
    RefundReason: *ref_70
    ReplacementReason: *ref_71
    ShippingMethod: *ref_72
    ShippingMethodOptions: *ref_73
    Inventory:
      title: Inventory
      x-examples: {}
      type: object
      required:
        - sku
        - description
        - threshold
        - partner_name
        - belongs_to_child
      properties:
        sku:
          type: string
          description: The SKU of the inventory
        description:
          type: string
          description: The description of the inventory
        threshold:
          type: integer
          format: int32
          description: The amount of days of stock to alert on
        threshold_active:
          type: boolean
          description: determines whether an alert will trigger for this threshold or not
        partner_name:
          type: string
          description: The name of the partner in charge of the inventory
        belongs_to_child:
          type: boolean
          description: >-
            The inventory belongs to the child, or brand, rather than the
            partner
    IdentityDocument: *ref_4
    UpdateInventoryRequest:
      title: UpdateInventoryRequest
      type: object
      required:
        - inventory
      properties:
        inventory:
          type: array
          items:
            type: object
            required:
              - sku
              - threshold
            properties:
              sku:
                type: string
                description: The SKU of the inventory
              threshold:
                type: integer
                format: int32
                description: The amount of days of stock to alert on
    CreateIdentityDocumentRequest: *ref_17
    UpdateIdentityDocumentRequest: *ref_74
    OrderFee: *ref_75
    OrderException: *ref_76
    OrderAction: *ref_34
    OrderStatus:
      title: OrderStatus
      x-examples: {}
      type: object
      properties:
        id:
          type: integer
          format: int32
          description: The order status ID
        status_name:
          type: string
          description: The order status name
    HealthCondition:
      title: HealthCondition
      x-examples: {}
      type: object
      required:
        - condition_name
        - permalink
      properties:
        condition_name:
          type: string
          description: The health condition name
        permalink:
          type: string
          description: The health condition permalink
    OrderStatusEvent:
      title: OrderStatusEvent
      x-examples: *ref_77
      properties: *ref_78
    OrderStatusEventResponse: *ref_79
    OrderWarnings:
      title: OrderWarnings
      x-examples: *ref_28
      properties: *ref_29
    VerifyUserRequestBody:
      title: VerifyUser
      type: object
      required:
        - dob
      properties:
        dob:
          type: string
          format: date
        order_number:
          type: string
    SimulateEvent: *ref_80
    DetailedError: *ref_81
    DetailedErrorBadRequest: *ref_82
    Error: *ref_5
    UnprocessableError:
      title: UnprocessableError
      type: object
      x-examples: *ref_83
      description: 'An individual error object with a code, message, and error_detail'
      required: *ref_35
      properties: *ref_36
    BadRequestError: *ref_14
    ConflictingRequestError: *ref_13
    Webhook: *ref_84
    ApiRequest:
      title: ApiRequest
      type: object
      x-examples: {}
      required:
        - id
        - application_name
        - request_method
        - path
        - request_ip
        - created_at
        - response_code
      properties:
        id:
          type: integer
          description: The Request ID
        application_name:
          type: string
          description: the name of the set of API credentials performing the request
        request_method:
          type: string
          description: The HTTP method
        path:
          type: string
          description: The API request pathname
        request_ip:
          type: string
          format: ip
          description: The IP address of the client performing the request
        created_at:
          type: string
          format: date-time
          description: The timestamp the API request was performed
        response_code:
          type: integer
          description: The HTTP response code
        request_body:
          type: string
          description: The request body
        response_body:
          type: string
          description: The response body
  securitySchemes:
    OAuth2:
      type: oauth2
      description: This API uses OAuth 2.0 with client credentials grant flow
      flows:
        clientCredentials:
          tokenUrl: 'https://auth.honeybeehealth.com/oauth/token'
          scopes: {}
