API Reference

    API Endpoint

        https://profiquote.com/api/
                

The PriceQuote API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

The ProfiQuote API doesn't support bulk updates. You can work on only one object per request.

Authentication


    Example

        curl --location 'http://my.profiquote.com/api/customer' \
             --header 'Authorization: e439145d109a3200ff778de'

        (use your own api key)
            

The ProfiQuote API uses API keys to authenticate requests. You can view and manage your API keys in the My Account.

Your API keys carry many privileges, so be sure to keep them secure. Don't share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Authentication to the API is performed with HTTP Basic Auth. Provide your API key as the basic auth username value. You don't need to provide a password.

You must make all API calls over HTTPS. Calls that you make over plain HTTP will fail. API requests without authentication will also fail.

METHODS

Method Description
GET Get data
POST Insert record
PUT Update record
DELETE Delete record

Customers


Example

curl --location 'http://my.profiquote.com/api/customer?name=lilly' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "name": "Lilly",
            "street": "",
            "zip": "",
            "city": "",
            "state": "",
            "country": "USA",
            "email": "",
            "phone": "",
            "note": "Lilly note",
            "type": "PERSON"
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Customers, get one by Id, update or insert one.
https://my.profiquote.com/api/customer


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
name String Customer's name, max. 250 chars
type Enum PERSON, COMPANY
street String (optional) Address, text
city String (optional) City, max. 200 chars
zip String (optional) Zip, max. 20 chars
state String (optional) State, max. 200 chars
country String (optional) Country, max. 200 chars
email String (optional) Email, max. 200 chars
phone String (optional) Phone, max. 200 chars
note String (optional) Internal note, text

Products


Example

curl --location 'http://my.profiquote.com/api/product?name=hammer' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 188,
            "name": "Hammer",
            "description": "A hammer is a tool.",
            "price": 23.0,
            "orderOur": "HAM123",
            "unit": "pc(s)",
            "picture": "https://mydata.profiquote.com/data/i1/product1_188.jpg?dt=1641801880162"
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Products, get one by Id, update or insert one.
https://my.profiquote.com/api/product


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
name String Product name, max. 250 chars
description String (optional) Product description, text
price Double Selling price
orderOur String (optional) Ordering number, max. 50 chars
unit String (optional) Unit, max. 20 chars
picture Url (optional) Picture Url

Price Quotes


Example

curl --location 'http://my.profiquote.com/api/price-quote' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "number": "2024021",
            "idCustomer": 1,
            "idState": 4
            "idCurrency": 1,
            "idLanguage": 1,
            "date": "2024-01-19",
            "dateValid": "2024-02-18",
            "description": "Text before items",
            "afterText": "Text after items",
            "note": "",
            "price": 1500.0,
            "priceAfterDiscount": 1000.0,
            "customerName": "John Doe",
            "customerStreet": "",
            "customerZip": "",
            "customerCity": "",
            "customerState": "",
            "customerCountry": "USA"
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Price Quotes, get one by Id, update or insert one.
https://my.profiquote.com/api/price-quote


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
number String Price Quote Number, max. 50 chars
idCustomer Number (optionanl) Customer Id, check Libs section
idState Number Price Quote State Id, check Libs section
idCurrency Number Currency Id, check Libs section
idLanguage Number Language Id, check Libs section
date Date Creation Date in SQL format
dateValid Date Valid until Date in SQL format
description String (optionanl) Text before items, text/html
afterText String (optionanl) Text after items, text/html
note String (optionanl) Internal note, text
customerName String (optionanl) Customer name, max. 250 chars
customerStreet String (optionanl) Customer address, text
customerZip String (optionanl) Customer zip, max. 20 chars
customerCity String (optionanl) Customer city, max. 200 chars
customerState String (optionanl) Customer state, max. 200 chars
customerCountry String (optionanl) Customer country, max. 200 chars



Price Quote Items


Example

curl --location 'http://my.profiquote.com/api/price-quote-item/1' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "idPriceQuote": 1,
            "type": "ITEM",
            "name": "Hammer",
            "description": "Perfect tool for your business",
            "amount": 1.0,
            "price": 20.0,
            "discountType": "NONE",
            "discount": 0.0,
            "unit": "pc(s)",
            "idProduct": 0,
            "itemOrder": 1,
            "orderOur": "HAM123",
            "picture": ""
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 10
}
            

You can get list of Price Quote Items, get one by Id, update or insert one.
https://my.profiquote.com/api/price-quote/idPriceQuote
https://my.profiquote.com/api/price-quote/idPriceQuote/id


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
idPriceQuote Number Price Quote Id
type Enum ITEM, NOTE, SUMMARY
name String Item name, max. 50 chars
description String (optional) Item description, text
amount Double Quantity
price Double Price
discountType Enum NONE, ABSOLUTE, PERCENTAGE
discount Double Discount value, e.g. 30 for 30% PERCENTAGE discount
unit String Item unix, max. 20 chars
idProduct Number Product Id
itemOrder Number Item order, 1 for first item, 2 for second, ...
orderOur String (optional) Order number, max. 50 chars
picture Url Picture url



Download Price Quote PDF


Example

curl --location 'http://my.profiquote.com/api/report/1/basic' \
     --header 'Authorization: your_api_key'
            

Result example

PDF
            

Download PDF of Price Quote
https://my.profiquote.com/api/report/idPriceQuote/code


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
idPriceQuote Number Price Quote Id
code Enum basic, visitcard, black, blue, brown, green (black, blue, brown, green are only for PREMIUM)

Libs

For requests above you need to know Ids of some libraries. ProfiQuote is very customizable.


Currencies


Example

curl --location 'http://my.profiquote.com/api/currency' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "code": "$",
            "rate": 1.0
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Currencies, get one by Id, update or insert one.
https://my.profiquote.com/api/currency


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
code String Currency code, max. 10 chars
rate Double Exchange rate of foreign currency in relation to domestic currency



Languages


Example

curl --location 'http://my.profiquote.com/api/language' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "name": "English",
            "lang": "ENGLISH"
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Languages, get one by Id, update or insert one.
https://my.profiquote.com/api/language


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
name String Language name, max. 250 chars
lang Enum ENGLISH, GERMAN - Internal language



Price Quote Statuses


Example

curl --location 'http://my.profiquote.com/api/price-quote/status' \
     --header 'Authorization: your_api_key'
            

Result example

{
    "records": [
        {
            "id": 1,
            "name": "created",
            "color": "primary"
        }
    ],
    "page": 1,
    "pageAmount": 1,
    "recordsTotal": 1
}
            

You can get list of Price Quote statuses, get one by Id, update or insert one.
https://my.profiquote.com/api/price-quote/status


QUERY PARAMETERS

Field Type Description
secret_key String Your API key
name String Price Quote State name, max. 250 chars
color Enum primary, secondary, success, dark, warning, danger, ... - bootstrap colors

Errors

The Westeros API uses the following error codes:

Error Code Meaning
X00 Some parameters are missing. This error appears when you don't pass all mandatory parameters.
X01 Unknown or unvalid secret_key. This error appears if you use an unknow API key or if your API key expired.

If you needed some help, please don't hesitate to contact us on info@profiquote.com