NAV
bash javascript

Info

Welcome to the generated API reference.

API Rest

Get rules

Example request:

curl -X GET -G "https://app.shopifydevelopers.net/requestforquotev2/api/rules?shop=formtest11.myshopify.com&api_secret=1a78782efd6fdad821eb0309e9686209" 
const url = new URL("https://app.shopifydevelopers.net/requestforquotev2/api/rules");

    let params = {
            "shop": "formtest11.myshopify.com",
            "api_secret": "1a78782efd6fdad821eb0309e9686209",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "settings": {
        "rules": {
            "all": {
                "enable": true
            },
            "manual": {
                "enable": true,
                "manual_products": "8891619269,8891467653,8891108421,8890965829,8890890373,8891599621,8891601029,8891608837,8891609733,8891574725,8891576133,8891651653"
            },
            "automate": {
                "enable": false,
                "automate_rule": [
                    {
                        "value": "",
                        "where": "CONTAINS",
                        "select": "TITLE"
                    }
                ],
                "automate_operator": "and"
            }
        }
    }
}

HTTP Request

GET api/rules

Query Parameters

Parameter Status Description
shop optional string required The Shopify URL of shop.
api_secret optional string required The api_secret in Globo Request for Quote Settings.

Get form

Example request:

curl -X GET -G "https://app.shopifydevelopers.net/requestforquotev2/api/form?shop=formtest11.myshopify.com&api_secret=1a78782efd6fdad821eb0309e9686209" 
const url = new URL("https://app.shopifydevelopers.net/requestforquotev2/api/form");

    let params = {
            "shop": "formtest11.myshopify.com",
            "api_secret": "1a78782efd6fdad821eb0309e9686209",
        };
    Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));

let headers = {
    "Accept": "application/json",
    "Content-Type": "application/json",
}

fetch(url, {
    method: "GET",
    headers: headers,
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "form": {
        "elements": [
            {
                "id": 101952,
                "form_id": 5812,
                "code": "name",
                "type": "text",
                "subtype": "text",
                "label": "Name",
                "default": null,
                "placeholder": "Enter your name",
                "className": null,
                "maxlength": null,
                "rows": null,
                "required": 1,
                "validate": null,
                "description": null,
                "created_at": "2020-05-18 03:46:33",
                "updated_at": "2020-05-18 03:46:33"
            },
            {
                "id": 101953,
                "form_id": 5812,
                "code": "email",
                "type": "text",
                "subtype": "email",
                "label": "Email",
                "default": null,
                "placeholder": "Enter your email",
                "className": null,
                "maxlength": null,
                "rows": null,
                "required": 1,
                "validate": null,
                "description": null,
                "created_at": "2020-05-18 03:46:33",
                "updated_at": "2020-05-18 03:46:33"
            },
            {
                "id": 101954,
                "form_id": 5812,
                "code": "message",
                "type": "textarea",
                "subtype": null,
                "label": "Message",
                "default": null,
                "placeholder": "Message",
                "className": null,
                "maxlength": null,
                "rows": null,
                "required": 1,
                "validate": null,
                "description": null,
                "created_at": "2020-05-18 03:46:33",
                "updated_at": "2020-05-18 03:46:33"
            }
        ]
    }
}

HTTP Request

GET api/form

Query Parameters

Parameter Status Description
shop optional string required The Shopify URL of shop.
api_secret optional string required The api_secret in Globo Request for Quote Settings.

Create new quote

Example request:

curl -X POST "https://app.shopifydevelopers.net/requestforquotev2/api/quote" \
    -H "Content-Type: application/json" \
    -d '{"shop":"formtest11.myshopify.com","api_secret":"1a78782efd6fdad821eb0309e9686209","line_items":[{"id":8891619269,"variant_id":40552368517,"quantity":9}],"additional_data":{"name":"John doe","email":"someone@example.com","message":"I need better price."}}'
const url = new URL("https://app.shopifydevelopers.net/requestforquotev2/api/quote");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "shop": "formtest11.myshopify.com",
    "api_secret": "1a78782efd6fdad821eb0309e9686209",
    "line_items": [
        {
            "id": 8891619269,
            "variant_id": 40552368517,
            "quantity": 9
        }
    ],
    "additional_data": {
        "name": "John doe",
        "email": "someone@example.com",
        "message": "I need better price."
    }
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

Example response (200):

{
    "success": true,
    "quote_id": "1234",
    "msg": "Thank your for your quote, we'll get back shortly."
}

HTTP Request

POST api/quote

Body Parameters

Parameter Type Status Description
shop string required The Shopify URL of shop.
api_secret string required The api_secret in Globo Request for Quote Settings.
line_items.*.id integer required The product id.
line_items.*.variant_id integer required The variant id of product.
line_items.*.quantity integer required The quantity of line item. Example:
additional_data.name string optional This additional data depends on data that you get with get form API. (name is property "code" of form name element)
additional_data.email string optional This additional data depends on data that you get with get form API. (email is property "code" of form email element)
additional_data.message string optional This additional data depends on data that you get with get form API. (message is property "code" of form message element)