Added to Cart
Cart Subtotal ( items):

Your order qualifies for FREE Shipping!

MNPCBD API Documentation - HackMD

MiracleCBDProducts API Documentation

Base URLS

Staging: http://staging.miraclecbdproducts.com
Production: https://miraclecbdproducts.com

Endpoints

Retrieving Products

To retrieve the available products of miraclecbdproducts.com, all you just need to do is to send a GET request to this endpoint:

/api/product/?username=<username>

Take note that in order to access this API, you need to supply your username when sending the request in the query params.

Possible responses of this endpoint:
A. Failed Request

{
    "error": "Error message"
}

B. Successful Request

{
    "results": [
        {
            "id": "1",
            "name": "Product Name",
            "description": "Just another cool product",
            "price": "59.99",
            "slug": "product-name",
            "category": "Category 1",
            "sub_category": "Sub Category1",
            "mg_of_cbd": "20",
            "ingredients": "20mg of ingredient 1 with ingredient 2",
            "image_path": "https://miraclecbdproducts.com/images/product-images/product1.png", // full URL path to the product image
            "coa_path": "https://miraclecbdproducts.com/images/coa-images/product1.png" // full URL path to the COA image
        }
    ]
}

Creating Orders

To create an order, you need to send a POST request to this endpoint:

/api/order/

Since this endpoint is a private endpoint, you need to supply your username and password when sending the request. The request body looks like this:

{
    "username": "yourusername",
    "password": "yourpassword",
    "products": [
        {
            "id": 1, // id of the first product
            "quantity": 1 // quantity of the first product
        },
        {
            "id": 2, // id of the second product
            "quantity": 2 // quantity of the second product
        }
    ],
    "billing_address_first_name": "John Doe",
    "billing_address_last_name": "Evans",
    "billing_address_address1": "Address 1",
    "billing_address_address2": "", // optional
    "billing_address_city": "City 1",
    "billing_address_zip_code": "12345",
    "billing_address_state": "StateName", // MUST be the full name of the state (https://state.1keydata.com/)
    "billing_address_email": "email1.com",
    "billing_address_phone": "1231231234",
    
    // shipping address values do not need to be the same with
    // the billing address values
    "shipping_address_first_name": "John Doe",
    "shipping_address_last_name": "Evans",
    "shipping_address_address1": "Address 2",
    "shipping_address_address2": "", // optional
    "shipping_address_city": "City 2",
    "shipping_address_zip_code": "54321",
    "shipping_address_state": "StateName", // MUST be the full name of the state (https://state.1keydata.com/)
    "shipping_address_email": "email2.com",
    "shipping_address_phone": "1231234321",

    "ip_address": "172.58.185.192" // the IP address of the customer - optional
}

Possible responses of this endpoint:
A. Failed Request

{
    "error": "Error message"
}

B. Successful Request

{
    "message": "Order was created."
}