Introduction
The Web Connector is designed to allow you to access your prof.ITplus or Profit4 data via an easy to manage interface to either integrate with your own website or internal tools, or to power a website managed by OGL.
The connector presents an API that is RESTful, stateless, uses key based authentication, and always returns JSON formatted data in the body of the response. Where data is sent to the API, JSON formatted data is sent in the body of the request.
Terminology
The following terminology is used throughout this documentation;
| Term | Description |
|---|---|
| back end | Your internal system, this will likely be prof.ITplus or Profit4, but other data sources are supported. Your orders, customer details and product prices are all stored here in their authoritative form. |
| front end | The customer facing system, for instance a shopfront or mobile application. This system queries the back end to stay up with date, and submits new orders and other requests to the back end via this connector. |
| endpoint | The endpoint is the URL you send your requests to. |
| channel | In Profit4, you can make products available via multiple channels. Your connector will either be configured for a specific channel, or by default to show all products. In prof.ITplus this refers to the 'Web' flag on products, which enables a product for the web channel. |
| depot/warehouse | Refer to the same thing - a general location for physical products. The depot terminology is used in prof.ITplus, warehouse is used in Profit4. |
Compatibility
Most core features are available no matter which back-office system you are using however some features or variables will be marked with P+ or P4 indicating that this feature or attribute is only available on this system.
Formatting
The following formats are assumed through this documentation;
| Term | Description |
|---|---|
| currency | Decimal number. This is not guaranteed to be rounded, and you should deal with rounding appropriately in your front-end. Depending on configuration various balances and totals may be output either as decimals (e.g. 1.99) or integers (e.g. 199). |
| date | All dates will be sent as ISO-8601 formatted data, E.g. 2013-04-12. |
| datetime | All dates with times will be sent as ISO-8601 formatted data, including a timezone offset. E.g. 2013-04-12T15:52:01+00:00. |
| percentages | Decimal number. Does not include any % characters |
| strings | As per the JSON specification, all strings are sent as UTF-8 encoded data and should be handled appropriately. |
| country | Countries are defined as a case-insensitive two letter code as defined in ISO 3166-1 e.g. GB, FR, DE |
Data format
Example response
{
"meta": {
"source": "mysql",
"company": "mycompany",
"cache": {
"ststockdetails.PRD00041": {
"status":"stale-recache",
"cached_on":"2020-03-11T12:30:10+00:00"
},
...
}
},
"data": [
{
"type": "product",
"id": "PRD00041",
"attributes": {
...
}
}
],
"errors": [
{
"status": 404,
"title": "App\Exceptions\ProductNotFoundException",
"detail": "Product \"PRD00046\" not found."
},
...
]
}
All responses from the connector will be of the same format, with at least 3 elements at the top level;
| Term | Description |
|---|---|
data |
The data. An array of items. Each type of item has a unique identifier (type), a unique id (id), and a number of attributes. |
errors |
Details of any errors that occurred in processing the message - e.g. missing products or bad customer details. |
metadata |
This will include metadata about the request; the customer name, cache details, and data source. Details of how caching works are covered further down in this document. |
Data Validation for POST requests
The limitations of POST request fields (type, length and if they are required) are listed by the endpoints. For P4 systems there are no max lengths.
Common options
Pretty printing
Appending ?pretty=1 to any URL will generate human-readable responses. This should only be used for debugging purposes.
Multiple Companies P+
Appending ?OVERRIDE_PP_COMPANY=1 to any URL will force the connector to connect to that specific company.
Authentication
To authorize, use this code:
# You should use this header on every single request
curl "https://webconnector.oglsoftware.co.uk/endpoint" \
-H "Authorization: PLAIN apikeyhere"
Make sure to replace
apikeyherewith your API key.
We use an API key to authenticate each request you make. This is a string of numbers and characters that is unique to you. An API key will be provided to you by your project leader.
Authorization: PLAIN apikeyhere
Access control list
An access control list can be configured on the server side. This allows specific API keys to access specific endpoints. For instance, you can restrict certain sensitive operations such as user deletion, or create an API that can only access a stock list and nothing else. Please enquire if you require this configuring.
Products and Prices
There are two types of request - with the first you do not provide customer details. This then fetches details for your 'web default user'. This is a user that contains the default pricing structure for anonymous users on your front-end. The second format contains a customer code, and will fetch prices for a specific customer.
Get All Products
curl "https://webconnector.oglsoftware.co.uk/products" \
-H "Authorization: PLAIN apikeyhere"
The command returns the following JSON as a response in the 'data' array
[
{
"type": "product",
"id": "PRD00041"
},
{
"type": "product",
"id": "PRD00042"
},
...
]
This endpoint retrieves a list of all stockcodes. You can compare it to an internal list to calculate any items that require importing, or deleting. Products will only appear in this list if they belong to the relevant channel in Profit4, or the web indicator is set to 'Web' or 'Both' in prof.ITplus.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products
Get All Customer Products
curl "https://webconnector.oglsoftware.co.uk/customer/<customer>/products" \
-H "Authorization: PLAIN apikeyhere"
The command returns the following JSON as a response in the 'data' array
[
{
"type": "product",
"id": "PRD00041"
},
{
"type": "product",
"id": "PRD00042"
},
...
]
This endpoint retrieves a list of all stockcodes where the customer has a custom price. Products will only appear in this list if they belong to the relevant channel in Profit4, or the web indicator is set to 'Web' or 'Both' in prof.ITplus.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/products
Get All Customer Prices
curl "https://webconnector.oglsoftware.co.uk/customer/<customer>/prices" \
-H "Authorization: PLAIN apikeyhere"
The command returns the following JSON as a response in the 'data' array
[
{
"type": "customer_prices",
"id": "PRD00041",
"attributes": {
"stockcode": "PRD00041",
"price1": 10,
"price1discr": -5,
"price1net": 9.5,
"price2qty": 0,
"price2": 0,
"price2discr": 0,
"price2net": 0,
"price3qty": 0,
"price3": 0,
"price3discr": 0,
"price3net": 0,
"price4qty": 0,
"price4": 0,
"price4discr": 0,
"price4net": 0,
"price5qty": 0,
"price5": 0,
"price5discr": 0,
"price5net": 0,
"price6qty": 0,
"price6": 0,
"price6discr": 0,
"price6net": 0,
"sellunit": 1,
"sellunitdesc": "Each",
"cref": "OGL001"
}
},
...
]
This endpoint retrieves a list of all prices where the customer has a custom price. Products will only appear in this list if they belong to the relevant channel in Profit4, or the web indicator is set to 'Web' or 'Both' in prof.ITplus.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/prices
Get a Specific Product
curl "https://webconnector.oglsoftware.co.uk/product/AB00005" \
-H "Authorization: PLAIN apikeyhere"
The command returns the following JSON in the 'data' array
[
{
"type": "product",
"id": "PRD00041",
"attributes": {
"sku": "PRD00041",
"altcode": "ALT00041",
"weight": 0.612,
"packedweight": 0.980,
"unit": 1,
"vatrate": 0,
"customer": "JA0001",
"description": "Bag of Sand",
"stockavailable": 4,
"price": {
"source": "customer",
"pricecode": 1,
"price": 9.99,
"pricediscr": 0,
"pricenet": 9.99,
"priceincvat": 9.99,
"sellunit": 1,
"sellunitdesc": "EACH",
"vatcd": 1,
"stockqty": 26,
"quantity-breaks": {
"1": {
"quantity": 1,
"quantity-to": 9,
"quantity-range": "1 - 9",
"price": 9.99,
"pricediscr": 0,
"pricenet": 9.99,
"priceincvat": 9.99
},
...
"3": {
"quantity": 20,
"quantity-to": -1,
"quantity-range": "20+",
"price": 7.99,
"pricediscr": 0,
"pricenet": 7.99,
"priceincvat": 7.99
}
},
"discsrc": 11
},
"pricebands": {
"1": 9.99,
"2": 8.99,
...
},
"minimumprice": 20.3,
"costprice": 15.2,
"image": "PRD00041-bag.png",
"sonormord": 5,
"soincr": 5,
"barcode": "3033710074365",
"productclass": "B",
"superseded": "PRD00041v2",
"obsolete": false,
"pgroup": "PG1",
"ptype": "PT1",
"category": "CAT1",
"origin": "GB",
"leadtime1": 2,
"leadtime2": 3,
"leadtime3": 4,
"minimumlevel": 10,
"maximumlevel": 100,
"reorderlevel": 20
}
}
]
Fetches the details for a single product, plus comprehensive price data. A full list of the meaning of all fields can be found in Appendix A - product records.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/product/<sku>
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/product/<sku>
URL Parameters
| Parameter | Description |
|---|---|
sku |
The stock code of the item to retrieve |
customer |
(optional) The customer code to fetch prices for. Excluding this will fetch your default web customers pricing. |
Get a range of products
curl "https://webconnector.oglsoftware.co.uk/products" \
-H "Authorization: PLAIN apikeyhere" \
-H "Content-Type: application/json" \
-X POST \
-d '{"skus":["PRD00041", "PRD00042", "BAD PRODUCT"]}'
To allow you to request very large ranges of stock codes at one time.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/products/
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/products/
POST Body
The body of the request should contain the SKUs to fetch as follows;
{
"skus": [
"PRD00041",
"PRD00042",
"PRD00042-blue",
...
]
}
The body of the POST request should contain a json formatted string with a single property 'skus' containing an array of stock code strings. An example is shown to the right. The request will return an object consisting of a list of products using the format details in Get a Specific Product above, and indexed by stockcode.
The command returns the following JSON in the 'data' array
[
{
"type": "product",
"id": "PRD00041",
"attributes": {
"sku": "PRD00041",
"weight": 0.612,
"unit": 1,
...
}
},
...
]
In cases where a product cannot be found, it will not be returned, and an error will be shown in the errors section of the returned values explaining why the product could not be located.
Fetch stock levels
Request format (POST Body). Optionally this can be empty and all stock levels will be returned.
{
"skus": [
"PRD00041",
"PRD00042",
"PRD00042-blue",
...
]
}
The command returns the following JSON in the 'data' array
[
{
"type": "stock",
"id": "PRD00041",
"attributes": {
"stockavailable": 49,
"lev": 40,
"alloc": 1,
"isswo": 0,
"makeable": 10
}
},
...
]
Fetch the stock levels for specified products.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/products/stock
POST https://webconnector.oglsoftware.co.uk/products/stock/depot/<Depot Code>
POST https://webconnector.oglsoftware.co.uk/products/stock/warehouse/<Warehouse Code>
URL Parameters
| Parameter | Description |
|---|---|
Depot Code |
(optional) The two character depot code to receive stock for. If this is left blank, the stock levels in all depots will be added together. P+ |
Warehouse Code |
(optional) The ID of the warehouse to fetch stock from. If this is left blank a default warehouse will be used. Only one warehouse is ever fetched at a time. P4 |
POST Body
The body of the POST request should contain a json formatted string with a single property 'skus' containing an array of stock code strings. An example is shown to the right. The request will return an array of stock items with quantities available. lev is the current stock level, alloc details the number of products allocated to orders, isswo details the amount of stock issued to work orders. makeable shows the number of this item that can be made up from other stock.
Fetch recent stock levels
The GET command returns the following JSON in the 'data' array
[
{
"type": "stock",
"id": "PRD00041",
"attributes": {
"stockavailable": 49,
"lev": 40,
"alloc": 1,
"isswo": 0,
"makeable": 10
}
},
...
]
Fetch a list of products that have had a stock level change since the last POST request to this URL. You should initially make a GET request, followed by a confirmation via POST once you have processed stock data.
The GET request will fetch the recently changed stock codes and their levels. The POST request will acknowledge this and clear down the list of stock codes that were last requested.
This method of fetching stock updates is recommended over fetching all stock levels as it will usually be far more efficient.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products/stock/recent
GET https://webconnector.oglsoftware.co.uk/products/stock/recent/depot/<Depot Code> P+
GET https://webconnector.oglsoftware.co.uk/products/stock/recent/warehouse/<Warehouse Code> P4
POST https://webconnector.oglsoftware.co.uk/products/stock/recent
URL Parameters
| Parameter | Description |
|---|---|
Depot Code |
(optional) The two character depot code to receive stock for. If this is left blank, the stock levels in all depots will be added together. P+ |
Warehouse Code |
(optional) The ID of the warehouse to fetch stock from. If this is left blank a default warehouse will be used. Only one warehouse is ever fetched at a time. P4 |
POST Body
The body of the POST is empty.
Get the image for a product
Response format of the first form
[
{
"type": "image",
"id": "PRD00041",
"attributes": {
"image": "\/9j\/4AAQSkZJRgABAgA....AZABkAAD\/7AARRHVjoA6A\/\/Z",
"mime_type": "image\/jpeg"
}
}
]
The second form (preview) will return a binary image with the correct headers, and will be displayed directly into the browser if accessed via that method.
Returns the main image for a product. Two forms return different data, the first form returns base 64 encoded data in a JSON array, which can then be stored and re-used. The second returns a binary image with the correct response headers to download or display the image in a browser.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/product/<sku>/image
GET https://webconnector.oglsoftware.co.uk/product/<sku>/image/preview
URL Parameters
| Parameter | Description |
|---|---|
sku |
The stock code of the item to retrieve |
Get All Related Products P4
A response is returned as an object containing a list of related products
{
"data": {
"0": {
"type": "product_related",
"id": "PRD00041",
"attributes": {
"prodcat": "P",
"maincode": "PRD00041",
"relcode": "PRD00042",
"reltype": "crosssell",
"relcodetype": "P"
}
},
...
}
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products/related
Get a specific product's related products P4
A response is returned containing a list of related products for the product requested
{
"data": {
"0": {
"type": "product_related",
"id": "PRD00041",
"attributes": {
"prodcat": "P",
"maincode": "PRD00041",
"relcode": "PRD00042",
"reltype": "crosssell",
"relcodetype": "P"
}
}
}
}
HTTP Request
GET https://webconnector.oglsoftware.co.uk/product/<sku>/related
URL Parameters
| Parameter | Description |
|---|---|
sku |
The stock code of the item to retrieve |
Get product categories P4
A response is returned as an object containing a list of categories
{
"0": {
"type": "product_category",
"id": 7,
"attributes": {
"id": 7,
"path": "00010007",
"alias": "food-beans",
"parent": 1,
"ctitle": "Beans",
"shorttitle": "Beans",
"imgfilename": "beans-large.jpg",
"description": "Beans and related products",
"products": {
"0": {
"sku": "BBEANS_LARGE"
},
...
}
}
},
...
}
Fetch a list of available product categories and the products belonging to those categories.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products/categories
Get product attribute configuration P4
A response is returned as an object containing a list of attribute types
{
"0": {
"type": "product_attribute_config",
"id": 16,
"attributes": {
"id": 16,
"default": 23,
"mandatory": false,
"title": "Material",
"type": "REFERENCE",
"options": {
"0": {
"id": 16,
"description": "Cotton Mix"
},
"1": {
"id": 23,
"description": "Copper"
},
...
}
}
},
...
}
Fetch a list of available product attributes, defaults and possible options
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products/attributes
Get product attributes P4
A response is returned as an object containing a list of attributes belonging to a specific product.
{
"0": {
"type": "product_attribute",
"id": 629,
"attributes": {
"id": 629,
"attribute_id": 16,
"title": "Material",
"value": "Cotton mix",
"publish": true
}
},
...
}
Fetch a list of attribute settings for a specific product
HTTP Request
GET https://webconnector.oglsoftware.co.uk/product/<sku>/attributes
Customers
Get and set details of a specific customer.
List all customers
A response is returned as an object containing a list of customer id's
{
"0": {
"type": "customer",
"id": "AB0039"
},
...
}
List the reference id of all customers.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customers
Get a customers details
A response is returned as a single JSON object
[
{
"type": "customer",
"id": "AB0039",
"attributes": {
"cref": "OGL001",
"invref": "OGL001",
"pricesrc": "OGL001",
"showdisc": true,
"pricecode": "1",
"vatind": "Y",
"vatregno": "GB 172882285",
"stopped": false,
"accstat": "",
"custype": "WEB",
"currcode": "GBP",
"is_retail": false,
"cshsales": false,
"clim": 50000,
"balt": 12948,
"ordval": 10000,
"incvat": false,
"fullname": "OGL Web Services",
"address1": "Worcester Road",
"address2": "",
"address3": "Stourport on Severn",
"address4": "Worcestershire",
"countrycode": "GB",
"postcd": "DY13 9AT",
"email": "test@ogl.co.uk",
"faxno": "01299873900",
"telno": "01299873873",
"rep": "MS",
"linvdt": "2013-10-26T16:32:06+00:00",
"lpaydt": "2013-10-31T16:32:06+00:00",
"cash_with_order": false,
"proforma": false,
"packing": true,
"minordval": 100,
"customertype": "sl",
"disct": "30",
"despordval": 19200,
"bustype": "TRD"
}
}
]
Get standard details of a specific customer. A full list of the meaning of all fields can be found in Appendix B - customer records.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>
Fetch recently updated customers
The GET command returns the following JSON in the 'data' array
[
{
"type": "customer",
"id": "ABC001",
"attributes": {
"cref": "ABC001"
}
},
...
]
Fetch a list of customers that have recently been added or modified since the last POST request to this URL. You should initially make a GET request, followed by a confirmation via POST once you have processed customer updates. This method of fetching customer updates is recommended over fetching all customers as it will usually be far more efficient.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customers/recent
POST https://webconnector.oglsoftware.co.uk/customers/recent
POST Body
The body of the POST is empty.
Add a new customer
curl "https://webconnector.oglsoftware.co.uk/customer" \
-H "Authorization: PLAIN apikeyhere" \
-H "Content-Type: application/json" \
-X POST \
-d '{"fullname": "Test User", "add1": "Test Address 1" ... }'
Add a new customer to the back end system.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/
JSON Body parameters
A response is returned as a single JSON object containing the created customer reference
{
"type": "cref",
"id": "597",
"attributes": {
"cref": "597"
}
}
| Parameter | Type | P+ Len | P+ Req | P4 Req | Description |
|---|---|---|---|---|---|
fullname |
string | 35 | Y | Y | Description of address |
add1 |
string | 35 | N | Y | Address line 1 |
add2 |
string | 30 | N | N | Address line 2 |
add3 |
string | 25 | N | N | Address line 3 |
add4 |
string | 20 | N | N | Address line 4 |
add5 P4 |
string | N | Address line 5 | ||
postcd |
string | 8 | N | Y | Postcode |
countrycode |
string | 2 | N | Y | 2 character ISO code |
name P+ |
string | 30 | N | Contact Name | |
email |
50 | Y | Y | Email for address | |
telno |
string | 20 | N | N | Telephone number for address |
modelacc P+ |
string | 6 | N | Model Account to use for default values | |
usrfld1 P+ |
string | 10 | N | Custom User Field 1 | |
usrfld2 P+ |
string | 10 | N | Custom User Field 2 | |
usrfld3 P+ |
string | 6 | N | Custom User Field 3 | |
usrfld4 P+ |
string | 6 | N | Custom User Field 4 | |
usrfld5 P+ |
string | 30 | N | Custom User Field 5 | |
optineml P+ |
bool | N | Opt in to email marketing | ||
optinpost P+ |
bool | N | Opt in to post marketing | ||
optintel P+ |
bool | N | Opt in to telephone marketing | ||
optintxt P+ |
bool | N | Opt in to text marketing | ||
optinfax P+ |
bool | N | Opt in to fax marketing | ||
showprompts P4 |
bool | N | Show warnings (default false) |
Delete a customer
Remove a customer from the back end system.
HTTP Request
DELETE https://webconnector.oglsoftware.co.uk/customer/<customer>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to remove |
List delivery addresses
A response is returned as an array of json objects
[
{
"type": "address",
"id": "BT0003",
"attributes": {
"cref":"BT0003",
"fullname":"MAIN OFFICE",
"add1":"40 DRIVEHILL DRIVE",
"add2":"HILLDRIVE",
"add3":"",
"add4":"FALKIRK",
"postcd":"FK1 1AA",
"countrycode":"GB",
"telno": "0123456789",
"billing": false
}
},
...
]
List delivery addresses available to a specific customer.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/addresses
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch addresses from |
Add a delivery address
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/addresses
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to add the address for |
JSON Body parameters
| Parameter | Type | P+ Len | P+ Req | P4 Req | Description |
|---|---|---|---|---|---|
fullname |
string | 35 | Y | Y | Description of address |
add1 |
string | 35 | N | N | Address line 1 |
add2 |
string | 30 | N | N | Address line 2 |
add3 |
string | 25 | N | N | Address line 3 |
add4 |
string | 20 | N | N | Address line 4 |
add5 P4 |
string | N | Address line 5 | ||
postcd |
string | 8 | N | N | Postcode |
countrycode |
string | 2 | N | N | 2 character ISO code |
name P+ |
string | 30 | N | Contact Name | |
email |
50 | N | N | Email for address | |
telno |
string | 20 | N | N | Telephone number for address |
showprompts P4 |
bool | N | Show warnings (default false) |
Edit a delivery address
Edit an existing address.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/addresses/<address>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer with the address |
address |
The reference code for the address record |
JSON Body parameters
| Parameter | Type | P+ Len | P+ Req | P4 Req | Description |
|---|---|---|---|---|---|
fullname |
string | 35 | Y | Y | Description of address |
add1 |
string | 35 | N | N | Address line 1 |
add2 |
string | 30 | N | N | Address line 2 |
add3 |
string | 25 | N | N | Address line 3 |
add4 |
string | 20 | N | N | Address line 4 |
add5 P4 |
string | N | Address line 5 | ||
postcd |
string | 8 | N | N | Postcode |
countrycode |
string | 2 | N | N | 2 character ISO code |
name |
string | 50 | N | N | Description of address |
email |
50 | N | N | Email for address | |
telno |
string | 20 | N | N | Telephone number for address |
Delete a delivery address
Remove a delivery address from the back end system.
HTTP Request
DELETE https://webconnector.oglsoftware.co.uk/customer/<customer>/addresses/<address>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer who owns the address |
address |
The code of the address to remove |
List contact details
A response is returned as an array of json objects
[
{
"type": "contact",
"id": "crm-1",
"attributes": {
"add1": "Worcester Road",
"add2": "Stourport-on-Severn",
"add3": "Worcestershire",
"add4": "",
"contactname": "MR SMITH",
"contacttype": "crm",
"email": "webservices@ogl.co.uk",
"emailoptin": true,
"faxno": "01299 873900",
"faxoptin": false,
"id": 1,
"mobno": "",
"postcd": "DY13 9AT",
"postoptin": false,
"telno": "01299 873873",
"teloptin": false,
"txtoptin": false
}
},
...
]
List of contact records for that customer
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/contacts
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch contacts from |
Add a contact P4
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/contacts
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to add the contact for |
JSON Body parameters
| Parameter | Type | P4 Req | Description |
|---|---|---|---|
fullname |
string | Y | Contact name |
add1 |
string | N | Address line 1 |
add2 |
string | N | Address line 2 |
add3 |
string | N | Address line 3 |
add4 |
string | N | Address line 4 |
add5 |
string | N | Address line 5 |
postcd |
string | N | Postcode |
countrycode |
string | N | 2 character ISO code |
email |
N | Email for contact | |
telno |
string | N | Telephone number for contact |
showprompts |
bool | N | Show warnings (default false) |
Edit a contact P4
Edit an existing contact.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/contacts/<contactid>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer with the contact |
contactid |
The reference code for the contact record |
JSON Body parameters
| Parameter | Type | P4 Req | Description |
|---|---|---|---|
fullname |
string | Y | Contact name |
add1 |
string | N | Address line 1 |
add2 |
string | N | Address line 2 |
add3 |
string | N | Address line 3 |
add4 |
string | N | Address line 4 |
add5 |
string | N | Address line 5 |
postcd |
string | N | Postcode |
countrycode |
string | N | 2 character ISO code |
email |
N | Email for contact | |
telno |
string | N | Telephone number for contact |
Delete a contact P4
Remove a contact from the back end system.
HTTP Request
DELETE https://webconnector.oglsoftware.co.uk/customer/<customer>/contact/<contactid>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer with the contact |
contactid |
The reference code for the contact record |
Get customer attribute configuration P4
A response is returned as an object containing a list of attribute types
{
"0": {
"type": "customer_attribute_config",
"id": 3,
"attributes": {
"id": 3,
"default": null,
"mandatory": false,
"title": "First Order Date",
"type": "DATE"
}
},
...
}
Fetch a list of available customer attributes, defaults and possible options
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customers/attributes
Get customer attributes P4
A response is returned as an object containing a list of attributes belonging to a specific customer.
{
"0": {
"type": "customer_attribute",
"id": 296,
"attributes": {
"id": 296,
"attribute_id": 3,
"title": "First Order Date",
"value": "2020-09-01"
}
},
...
}
Fetch a list of attribute settings for a specific customer
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/attributes
Orders
Add an order
Order JSON format
{
"fileno": 53,
"cono": "70",
"cref": "AAM002",
"delad1": "OGL Computer",
"delad2": "Worcester Road",
"delad3": "",
"delad4": "Stourport-on-Severn",
"delad5": "Worcestershire",
"delcountrycode": "GB",
"postcd": "DY13 9AT",
"cshsales": true,
"delcode": "TST",
"carriage": 1.5,
"discr": 1.25,
"disctotal" : 0,
"depot": "01",
"contactemail": "test@ogl.co.uk",
"promocode": "",
"vatinclusive": true,
"note": "Please leave at reception",
"prefix": "WB",
"ordtype": "WEB",
"invoiceaddress": {
"line1" : "Head Office",
...
},
"items": [
{
"stcode": "PRD00041",
"quan": 10,
"price": 5.01,
"desc": "GENERIC PRODUCT A PACK OF 30",
"note": "New customer discount applied",
"depot": "01",
},
...
],
"attributes": [
{
"id" : 23,
"type" : "REFERENCE",
"value" : 39,
"concurrencyversion" : 0
},
...
],
}
A response is returned as a single JSON object containing the following fields;
{
"type": "order_confirmation",
"id": "1459",
"attributes": {
"ordno": 985
}
}
Creates a new order in the back end system. Returns the order number assigned by the back end system. The front end should store this number and use it whenever communicating with the Web Connector.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/order/
JSON Body Parameters
| Parameter | Type | P+ Len | P+ Req | P4 Req | Description |
|---|---|---|---|---|---|
attributes[][concurrencyversion] P4 |
int | Y/N | Version (required if type=REFERENCE) | ||
attributes[][id] P4 |
int | Y | Attribute ID (see attributes) | ||
attributes[][type] P4 |
string | Y | Attribute type (see attributes) | ||
attributes[][value] P4 |
mixed | Y | Attribute value | ||
carriage |
float | Y | Y | Delivery cost | |
cono |
string | 26 | Y | Y | Customer order number |
contactemail |
50 | N | Y | Contact email | |
contactname |
string | 50 | N | N | Contact name |
contacttelno1 |
string | 50 | N | N | Contact telephone number |
cref |
string | 6 | Y | Y | Customer reference |
cshsales |
bool | Y | Y | Cash sale | |
cshstatus P4 |
string | N | Cash Status | ||
delad1 |
string | 35 | N | N | Delivery address line 1 |
delad2 |
string | 35 | N | N | Delivery address line 2 |
delad3 |
string | 30 | N | N | Delivery address line 3 |
delad4 |
string | 25 | N | N | Delivery address line 4 |
delad5 |
string | 20 | N | N | Delivery address line 5 |
delcode |
string | 3 | Y | Y | Delivery method code (see deliverymethods) |
delcountrycode |
string | 2 | N | N | 2 character ISO code |
deldate |
date | N | Y | Delivery date | |
discr |
float | Y | Y | Order discount as a % | |
disctotal |
float | Y | Y | Order discount as a value | |
depot |
string | 2 | N | N | Depot the order should import to |
fileno |
int | Y | Y | File generation number | |
invoiceaddress[line1] P4 |
string | N | Invoice address line 1 | ||
invoiceaddress[line2] P4 |
string | N | Invoice address line 2 | ||
invoiceaddress[line3] P4 |
string | N | Invoice address line 3 | ||
invoiceaddress[line4] P4 |
string | N | Invoice address line 4 | ||
invoiceaddress[line5] P4 |
string | N | Invoice address line 5 | ||
invoiceaddress[postcd] P4 |
string | 8 | N | Invoice address Postcode | |
invoiceaddress[countrycode] P4 |
string | 2 | N | Invoice address 2 character ISO code | |
items[][desc] P+ |
string | N | Description of item | ||
items[][disc] P+ |
float | N | Item discount as a % | ||
items[][issunit] P+ |
int | 6 | N | Unit of issue | |
items[][iunitdesc] P+ |
string | N | Unit of issue description | ||
items[][note] |
string | N | N | Add a text note to the line | |
items[][price] |
float | Y | Y | Price of a single item | |
items[][quan] |
float | Y | Y | Quantity of item being ordered | |
items[][stcode] |
string | Y | Y | Stock code of item | |
items[][vatcd] P+ |
string | 1 | N | VAT code (see rates) | |
items[][depot] |
string | 2 | N | N | Depot the order item should import to |
note |
string | 150 | N | N | Delivery instructions/order comments |
orddate |
date | N | N | Order date (default today) | |
ordtype P+ |
string | 3 | N | Order type | |
paid P4 |
bool | N | Order has been paid | ||
paymentbankid P4 |
int | Y/N | Bank record ID (required if paid=true) | ||
paymentref P4 |
string | Y/N | Payment reference (required if paid=true) | ||
paymentvalue P4 |
float | Y/N | Amount paid (required if paid=true) | ||
paymeth |
string | 3 | Y | Y | Payment method code (see paymentmethods) |
postcd |
string | 8 | Y | Y | Postcode |
prefix P+ |
string | 2 | N | Invoice prefix | |
promocode |
string | 9 | N | N | Promotional code |
quote P4 |
bool | N | Save as quote | ||
showprompts P4 |
bool | N | Show warnings (default false) | ||
vatinclusive P4 |
bool | N | Do prices include VAT (default true) |
Add payment to order P4
JSON format
{
"paymeth": 1,
"paymentref" : "Paypal",
"paymentvalue" : 1000,
"concurrencyversion" : 9,
"paymentbankid": 1
}
A response is returned as a single JSON object containing the following fields;
{
"0": {
"type": "order_update_confirmation",
"id": "1273",
"attributes": {
"ordno": 1273
}
}
}
Updating order through adding new payment
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/order/<order_id>/addpayment
JSON Body Parameters
| Parameter | Type | Req | Description |
|---|---|---|---|
paymeth |
int | Y | Payment method ID |
paymentref |
string | Y | Payment Reference |
paymentvalue |
float | Y | Payment value |
paymentbankid |
int | Y | Bank account id |
concurrencyversion |
int | Y | Order version |
showprompts |
bool | N | Show warnings (default false) |
List all orders
A response is returned as an array of JSON objects
[
{
"type": "order",
"id": "82",
"attributes": {
"ordno": 82,
"value": 648.00,
"cono": "Test",
"orddate": "2018-09-21",
"status": "In Progress",
"statusdesc": "AWAITING_ALLOCATION",
"statusind": 0,
"cref": "AAAXX001",
"address": "Goods Inwards Department"
}
},
...
]
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/orders/<days>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch orders from |
days |
(optional) the number of days to go back. This defaults to 1000 |
Get order details
A response is returned as a single JSON object
[
{
"type": "order",
"id": "82",
"attributes": {
"status": "In Progress",
"carriage": 550,
"cono": "COMPANYREF 00412",
"cref": "OGL001",
"delad1": "OGL Computer Services Ltd.",
"delad2": "Worcester Road",
"delad3": "Stourport-on-Severn",
"delad4": "Worcestershire",
"delad5": "",
"delcode": "VAN",
"discval": 0,
"invref": "OGL001",
"orddate": "2019-06-25",
"deldate": "2018-06-29",
"ordno": 82,
"ordtype": "WEB",
"paymeth": "COD",
"postcd": "DY13 9AT",
"statusind": 0,
"value": 420,
"vatvalue": 84,
"concurrencyversion": 5,
"ordtrack": {
"0": {
"date": "2019-06-25",
"consno": "AB-001627381"
}
}
}
},{
"type": "order_line",
"id": 1,
"attributes": {
"lineno": 1,
"desc": "Art Set Small",
"desc2": "",
"stcode": "ARTSET_SMLL",
"desp": 0,
"quan": 5,
"price": 35,
"value": 175,
"discval": 0
},
...
},{
"type": "order_attachment",
"id": "delivery-confirmation-00031.pdf",
"attributes": {
"filename": "delivery-confirmation-00031.pdf",
"date": "2019-03-01",
"comment": "Delivery Confirmation",
}
...
}
]
Fetch the details of a customers order.
A full explanation of the fields can be found in Appendix C - Order records.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/order/<order_id>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of this customer |
order_id |
The back end order ID - this may be different from the number assigned by the front end. |
Get a range of order details
A response is returned as an array JSON object
[
{
"type": "order",
"id": "82",
"attributes": {
"status": "In Progress",
"carriage": 550,
"cono": "COMPANYREF 00412",
"cref": "OGL001",
"delad1": "OGL Computer Services Ltd.",
"delad2": "Worcester Road",
"delad3": "Stourport-on-Severn",
"delad4": "Worcestershire",
"delad5": "",
"delcode": "VAN",
"discval": 0,
"invref": "OGL001",
"orddate": "2019-06-25",
"deldate": "2018-06-29",
"ordno": 82,
"paymeth": "COD",
"postcd": "DY13 9AT",
"statusind": 0,
"value": 420,
"vatvalue": 84,
"concurrencyversion": 5,
"order_items": {
"0": {
"lineno": 1,
"desc": "Art Set Small",
"desc2": "",
"stcode": "ARTSET_SMLL",
"desp": 0,
"quan": 5,
"price": 35,
"value": 175,
"discval": 0
},
...
},
"ordtrack": {
"0": {
"date": "2019-06-25",
"consno": "AB-001627381"
}
},
"order_attachments": {
"filename": "delivery-confirmation-00031.pdf",
"date": "2019-03-01",
"comment": "Delivery Confirmation"
}
}
},
...
]
Fetch the details of a list of orders
A full explanation of the fields can be found in Appendix C - Order records.
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/orders/
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
orders |
array (int) | A list of order IDs |
Get order attachment
Response format of the first form
[
{
"type": "order_attachment",
"id": "delivery-confirmation-00031.pdf",
"attributes": {
"mime_type": "application\/pdf",
"filename": "delivery-confirmation-00031.pdf",
"contents": "\/9j\/4AAQSkZJRgABAgA....AZABkAAD\/7AARRHVjoA6A\/\/Z"
}
}
]
The second form (view) will return a file, and will be displayed directly into the browser or downloaded if accessed via that method.
Returns the data for a specific attachment, either as binary file, or as a record containing base64 encoded binary data, filename and mime type required to process the attachment.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/order/<order_id>/attachment/<filename>
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/order/<order_id>/attachment/<filename>/preview
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer owning the order |
order_id |
(int) The order ID |
filename |
The filename of the attachment |
Get order statuses
A response is returned as an array of JSON objects
[
{
"type": "order_status",
"id": 48,
"attributes": {
"ordno": 48,
"statusind": 0,
"statusdesc": "QUOTED"
}
},
...
]
Fetch the statuses of a list of orders.
A full explanation of the relation between order statuses in your back-end and how they appear in the Connector can be found in Appendix F - Order statuses.
POST https://webconnector.oglsoftware.co.uk/orders/status
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
orders |
array (int) | A list of order IDs |
List previously ordered products
A response is returned as an array of JSON objects
[
{
"type": "purchase_history",
"id": "PRD00041",
"attributes": {
"cref": "OGL001",
"custcode": "",
"desc": "Bag of Sand",
"stockcode": "PRD00041",
"totalorders": 3,
"totalqty": 28,
"totalvalue": 123.75
}
},
...
]
Returns a list of previously ordered products. Only despatched items are shown.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/products/history?from=<fromdate>&to=<todate>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch previously ordered products from |
fromdate |
The first date (inclusive) to fetch order records from in YYYY-MM-DD format. |
todate |
The last date (inclusive) to fetch order records from in YYYY-MM-DD format |
List previous transactions
A response is returned as an array of JSON objects
[
{
"type": "transaction",
"id": 45,
"attributes": {
"alloc": -2029,
"am1": -2029,
"am2": 0,
"baltot": 0,
"cram": -2029,
"cref": "OGL001",
"disc": 0,
"dispute": "",
"dram": 0,
"duedate": "",
"entdate": "2014-09-05",
"enttime": 59946,
"fcall": -20.29,
"fcdisc": 0,
"fcfwdall": 0,
"fcval": -20.29,
"fwdalloc": 0,
"perenddate": "2013-10-31",
"perno": 1,
"trdate": "2013-10-31",
"trref": "CS40",
"trref2": "SAG:CO:DO NOT HONOUR",
"trtype": "SLCSH",
"unalloc": 0,
"type": "cash"
}
},
...
]
And an aged balance summary as type 'totals'
[
{
"type": "aged_balance",
"id": 46,
"attributes": {
"bal121": 7880,
"bal31": 0,
"bal61": 0,
"bal91": 0,
"balcur": 17193,
"keyfield": "1"
}
}
]
Returns a list of transactions.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/transactions/<days>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch a transaction list from |
days |
(optional) the number of days to go back. This defaults to 180 |
Get ordered items P+
A response is returned as an array of JSON objects
[
{
"type": "ordered_items",
"id": "1018-1",
"attributes": {
"cref": "OGL001",
"desc": "Bag of Sand",
"lineno": 1,
"orddate": "2022-01-17",
"ordno": 1018,
"price": 9.99,
"quan": 5,
"stcode": "PRD00041",
"value": 49.95,
"weight": 3.06
}
},
...
]
Returns a list of items ordered between two dates.
A full explanation of the fields can be found in Appendix C - Ordered items records
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/orders/items?from=<fromdate>&to=<todate>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch previously ordered products from |
fromdate |
The first date (inclusive) to fetch order item records from in YYYY-MM-DD format. |
todate |
The last date (inclusive) to fetch order item records from in YYYY-MM-DD format |
Get order attribute configuration P4
Return an object containing a list of attribute types
{
"0": {
"type": "order_attribute_config",
"id": 24,
"attributes": {
"id": 24,
"default": null,
"sort": 2,
"title": "Local (within 20 miles)",
"type": "REFERENCE",
"options": {
"0": {
"id": 40,
"description": "No"
},
"1": {
"id": 41,
"description": "Yes"
}
}
},
},
"1": {
"type": "order_attribute_config",
"id": 22,
"attributes": {
"id": 22,
"default": null,
"mandatory": false,
"title": "Other",
"type": "INTEGER"
}
},
...
}
Fetch a list of available customer attributes, defaults and possible options
HTTP Request
GET https://webconnector.oglsoftware.co.uk/orders/attributes
Get order attributes P4
Return an object containing a list of attributes belonging to a specific order.
{
"0": {
"type": "order_attribute",
"id": 1237,
"attributes": {
"id": 1237,
"values": {
"0": {
"id": 8733,
"title": "Priority",
"type": "REFERENCE",
"value": null,
"sort": 1,
"concurrencyversion": 0,
"referencevalue": null
}
}
}
},
...
}
Fetch a list of attribute for a specific order
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/order/<order_id>/attributes
Quotations P4
List all quotations
A response is returned as an array of JSON objects
[
{
"type": "quote",
"id": "82",
"attributes": {
"ordno": 1200,
"value": 19.8,
"cono": "Test",
"orddate": "2020-08-20",
"status": "In Progress",
"statusdesc": "QUOTED",
"statusind": 0,
"cref": "AGTRA001",
"address": "AG Transport",
"quotestatus": "ACCEPTED"
}
},
...
]
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/quotes/<days>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to fetch orders from |
days |
(optional) the number of days to go back. This defaults to 1000 |
Get quotation details
A response is returned as a single JSON object
[
{
"type": "quote",
"id": "82",
"attributes": {
"status": "In Progress",
"carriage": 550,
"cono": "COMPANYREF 00412",
"cref": "OGL001",
"delad1": "OGL Computer Services Ltd.",
"delad2": "Worcester Road",
"delad3": "Stourport-on-Severn",
"delad4": "Worcestershire",
"delad5": "",
"delcode": "VAN",
"discval": 0,
"invref": "OGL001",
"orddate": "2019-06-25",
"deldate": "2018-06-29",
"ordno": 82,
"paymeth": "COD",
"postcd": "DY13 9AT",
"statusind": 0,
"value": 420,
"vatvalue": 84,
"quotestatus": "ACCEPTED"
}
},{
"type": "order_line",
"id": 1,
"attributes": {
"lineno": 1,
"desc": "Art Set Small",
"desc2": "",
"stcode": "ARTSET_SMLL",
"desp": 0,
"quan": 5,
"price": 35,
"value": 175,
"discval": 0
},
...
},{
"type": "order_attachment",
"id": "delivery-confirmation-00031.pdf",
"attributes": {
"filename": "delivery-confirmation-00031.pdf",
"date": "2019-03-01",
"comment": "Delivery Confirmation",
}
...
}
]
Fetch the details of a customers quote.
A full explanation of the fields can be found in Appendix C - Order records.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/quote/<quote_id>
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of this customer |
quote_id |
The back end quote ID - this may be different from the number assigned by the front end. |
Get a range of quotation details
A response is returned as an array JSON object
[
{
"type": "quote",
"id": "82",
"attributes": {
"status": "In Progress",
"carriage": 550,
"cono": "COMPANYREF 00412",
"cref": "OGL001",
"delad1": "OGL Computer Services Ltd.",
"delad2": "Worcester Road",
"delad3": "Stourport-on-Severn",
"delad4": "Worcestershire",
"delad5": "",
"delcode": "VAN",
"discval": 0,
"invref": "OGL001",
"orddate": "2019-06-25",
"deldate": "2018-06-29",
"ordno": 82,
"paymeth": "COD",
"postcd": "DY13 9AT",
"statusind": 0,
"value": 420,
"vatvalue": 84,
"quotestatus": "ACCEPTED",
"order_items": {
"0": {
"lineno": 1,
"desc": "Art Set Small",
"desc2": "",
"stcode": "ARTSET_SMLL",
"desp": 0,
"quan": 5,
"price": 35,
"value": 175,
"discval": 0
},
...
}
}
},
...
]
Fetch the details of a list of quotes
A full explanation of the fields can be found in Appendix C - Order records.
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/quotes/
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
quotes |
array (int) | A list of quote IDs |
Rates, Delivery & Currency
Get all tax rates
A response is returned as an array of JSON objects
[
{
"type": "vat_registration",
"id": 0,
"attributes": {
"number": "123456789"
}
},
{
"type": "vat_code",
"id": 1,
"attributes": {
"code": 1,
"rate": 20.00,
"vatuk": true,
"vatnon": false,
"vatec": false,
"vatoth": false,
"vatoutscope": false
}
},
...
]
Fetch all tax codes and exchange rates. There are also flags for default VAT for UK, non-VAT rated, EC VAT, and Other VAT against each item.
This endpoint also returns the VAT registration number for the business, if applicable.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/rates
Get all currencies
A response is returned as an array of JSON objects
[
{
"type": "currency",
"id": 4,
"attributes": {
"code": 4,
"desc": "Pounds Sterling",
"rate": 1.00
},
...
}
]
These currency codes are used in the customer currcode field and indicate the currency preference of that customer.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/currencies
Get all payment methods
A response is returned as an array of JSON objects
[
{
"type": "payment_method",
"id": "CC",
"attributes": {
"code": "CC",
"desc": "Credit Card"
},
...
}
]
Available payment methods supported by the back-end. The payment method code needs to be passed back when adding an order in the paymeth field.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/paymentmethods
Get all delivery methods
A response is returned as an array of JSON objects
[
{
"type": "deliverymethod",
"id": "W02",
"attributes": {
"name": "Web Van Delivery",
"code": "W02",
"charges": {
"0": {
"charge": 500,
"retcharge": 0
},
"2500": {
"charge": 0,
"retcharge": 0
},
...
},
"vatcd": 1,
"linkman": false,
"min_value": 0,
"max_value": 0,
"min_weight": 0,
"max_weight": 0,
"type": "cost"
}
},
...
]
Supported delivery methods and their charges. This code should be passed to new orders via the delcode field.
A full explanation of the fields can be found in Appendix E - Delivery methods.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/deliverymethods
Get all delivery routes P+
A response is returned as an array of JSON objects
[
{
"type": "deliveryroute",
"id": "TUETHURS",
"attributes": {
"desc": "Tues and Thurs",
"code": "TUETHURS",
"area": "",
"daynight": "D",
"monday": false,
"tuesday": true,
"wednesday": false,
"thursday": true,
"friday": false,
"saturday": false,
"sunday": false,
"vtype": "",
"weeknos": "",
"postcodes": {
"0": "DY10",
"1": "DY11"
}
}
},
...
]
Supported delivery routes, when they run and postcode areas they relate to.
A full explanation of the fields can be found in Appendix E - Delivery routes.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/deliveryroutes
GET https://webconnector.oglsoftware.co.uk/customer/<customer>/deliveryroutes
Promotions P+
Retrieve a list of promotions currently running. They are split into two broad categories: 'promotions' which encapsulates BOGOF, percentage and value discounts, and 'linked' which includes buy X get Y type discounts.
A full explanation of the fields can be found in Appendix D - Promotion records.
Get all promotions
A response is returned as an array of JSON objects
[
{
"type": "promotion",
"id": "1",
"attributes": {
"bogobuy": 0,
"bogodisc": 0,
"bogoget": 0,
"bogoinv": 1,
"bogoprice": 0,
"bogoquan": 0,
"brkqty2": 0,
"brkqty3": 0,
"brkqty4": 0,
"brkqty5": 0,
"commdate": "",
"disc": 0,
"expdate": "30\/09\/18",
"issunit": 1,
"linkprod": "N",
"msgline1": "On promotion until 30th September",
"msgline2": "",
"pgroup": "PRM",
"prc1": 99.95,
"prc2": 0,
"prc3": 0,
"prc4": 0,
"prc5": 0,
"promgrp": "",
"promtype": "P",
"ptype": "",
"quodate": "24\/07\/12",
"stcode": "SEASAC2420E",
"type": "promotion"
}
},
{
"type": "linked_promotion",
"id": "1",
"attributes": {
"autoadd": "A",
"disc": 0,
"issunit": 1,
"linkstcode": "ZALSDBF",
"mainquan": 1,
"price": 5,
"quan": 1,
"stcode": "SEAS0825",
"type": "linked_promotion"
}
},
...
]
Fetch a list of all promotions.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/products/promotions
Miscellaneous Requests
These endpoints will send a request to the source server. For instance to request a catalog, or pay an invoice.
Get depots and warehouses
A response is returned as an array of JSON objects
[
{
"type": "warehouse",
"id": "01",
"attributes": {
"code": "01",
"desc": "Main Warehouse"
}
},
{
"type": "warehouse",
"id": "02",
"attributes": {
"code": "02",
"desc": "Returns"
}
},
...
]
Fetch a list of depots and warehouses.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/depots P+
GET https://webconnector.oglsoftware.co.uk/warehouses P4
Request copy invoice
Request a copy of the invoice item. This will be prepared as a PDF by the back-end server and will then be emailed to the requested email addresses as an attachment.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/invoice/<ref>/copy
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to request an invoice from |
ref |
The invoice reference number (numeric) |
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
emails |
array | An array of email address to send the copy to |
Request copy credit note
Request a copy of the credit note item. This will be prepared as a PDF by the back-end server and will then be emailed to the requested email addresses as an attachment.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/credit/<ref>/copy
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to request an credit note from |
ref |
The credit note reference number (numeric) |
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
emails |
array | An array of email address to send the copy to |
Request copy statement
Request a copy of the statement item. This will be prepared as a PDF by the back-end server and will then be emailed to the requested email addresses as an attachment.
HTTP Request
POST https://webconnector.oglsoftware.co.uk/customer/<customer>/statement/copy
URL Parameters
| Parameter | Description |
|---|---|
customer |
The customer code of the customer to request an invoice from |
JSON Body Parameters
| Parameter | Type | Description |
|---|---|---|
emails |
array | An array of email address to send the copy to |
Caching
Clearing the cache
curl "https://webconnector.oglsoftware.co.uk/cache/clear/taxrates" \
-H "Authorization: PLAIN apikeyhere" \
-H "Content-Type: application/json" \
-X GET
If you have a process that requires immediately clearing the cache, you can trigger a request to the cache endpoint to instantly clear out data.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/cache/clear/<key>
URL Parameters
On success a plain text response will be sent, detailing the number of records cleared.
179
| Parameter | Description |
|---|---|
key |
The cache key as defined in the table below. The '*' character is a wildcard so e.g. webproduct.*.WEB001 will clear all products for the web customer. * on it's own will remove all cache records. |
Cache times
The Connector caches as much as possible in memory to provide you with quick responses. Requests will be cached for varying lengths of time depending on the resource, and standard cache lengths are listed below. A single endpoint can consist of several caches - specifically in the case of products and stock levels.
| Key Format | Description | Cache Time (seconds) |
|---|---|---|
attributes.<customer> |
List of customer attribute settings | 60 |
attributes.<sku> |
List of product attribute settings | 60 |
categories |
List of available product categories | 600 |
contacts.<customer> |
List of contacts for a customer | 60 |
currencies |
Currency details | 86400 |
customer_attribute_config |
List of customer attributes | 60 |
customers |
List of all customers | 0 |
delivery.invref.<ref> |
Delivery addresses | 10 |
delivery |
Delivery methods | 86400 |
deliveryroute |
Delivery routes | 86400 |
image.<sku> |
Whether a copy of an image exists locally | 3600 |
order.<customer>.<ref> |
Specific order details | 300 |
order_attribute_config |
List of order attributes | 60 |
order_attributes.<customer>.<ref> |
List of order attribute settings | 60 |
orders.<customer>.<days> |
List of all orders by customer in the last X days | 120 |
payment |
Payment methods | 86400 |
previousproducts.<customer>.<fromdate>.<todate> |
Previously purchased products | 3600 |
product_attribute_config |
List of product attributes | 60 |
promotions |
A list of all promotions available | 3600 |
quote.<customer>.<days> |
List of all quotes by customer in the last X days | 120 |
quote.<customer>.<ref> |
Specific quote details | 300 |
ststockdetails.<depot>.<sku> |
Stock details for a product | 60 |
taxrates |
Tax rates | 86400 |
transactions.<customer>.<days> |
Transactions made by customer in the last X days | 300 |
webcustomer.<customer> |
Customer details | 600 |
webcustomerprices.<customer> |
List all prices where customer has a custom price | 3600 |
webcustomerproducts.<customer> |
List of products where customer has a custom price | 600 |
webproduct.<sku>.<customer> |
Prices for a specific customer and product | 3600 |
webproducts |
List of all products | 600 |
Customising the cache
You can modify the cache behaviour by appending one of the following values to the API request.
| Parameter | Description |
|---|---|
recache |
Ignore any cached value and return a fresh record. The newly fetched record will now be the cached version. You may want to use this on certain user triggered actions such as logging in. |
cache |
Ignore any cached value and return a fresh record. This new record will be cached for the specified number of seconds. You may want to use this when you know that a value will not change for a specified amount of time, or you need more regular updates than the default cache times provide. Be aware that reducing the cache times too low may effect performance of the Connector. |
Cache debugging
Each request returns a set of values relating to which keys were cached and when.
| Value | Description |
|---|---|
cached |
A valid and recent cached value was found and returned |
permanent |
This item is a static value and a cached value will always be returned |
disabled |
Debugging is active, and nothing is cached |
soft-disabled |
Caching is turned off on this item |
uncached |
No cache exists and the request was executed and cached |
expired |
The cache had fully expired and was re-cached |
stale-recache |
The cache was stale and has been refreshed with new data |
stale |
The cache was stale, and a refresh was not possible, so stale data was returned |
Monitoring
Connector statistics
You can and should monitor any mission critical API endpoints. Calling the Connector without any path will cause it to return very useful statistical data on your server.
- Versions - Connector versions to ensure you have the latest version of the code
- Cache data - use this to evaluate if your cache is getting too full and needs more data
- Webserver data - number of requests handled right now, and historically
- Server load - Shows a running total of server load for the last 1, 5 and 15 minutes. If any of these numbers are greater than the number of processors you have then you will be experiencing delays servicing API requests.
- Free memory and disk space
- Op Cache - This is the internal PHP cache. It can show if PHP is struggling with code you have.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/
Further reading
(External links)
- Load averages : https://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
- Nginx stats : https://nginx.org/en/docs/http/ngx_http_stub_status_module.html
- Opcache stats : https://php.net/manual/en/function.opcache-get-status.php
- Redis stats : https://redis.io/commands/INFO
Ping
Pinging confirms that the connector and the back end system are both responding to requests.
HTTP Request
GET https://webconnector.oglsoftware.co.uk/ping
Version
Get the version number of the back end ERP system
HTTP Request
GET https://webconnector.oglsoftware.co.uk/version
Errors
More details on the error will often be included in the body of the response as JSON data. A debugging mode is available that can provide more detailed error information, this can be activated on request.
{
"errors":
[
{
"status": "404",
"title": "Product not found",
"detail": "S887BK R42"
},
...
]
}
The API uses the following error codes:
| Error Code | Type | Meaning |
|---|---|---|
| 400 | Bad Request | Your request is invalid. |
| 401 | Unauthorized | Your API key is wrong. |
| 403 | Forbidden | You do not have access to this resource. |
| 404 | Not Found | The specified resource could not be found. This is generally an invalid stock code or customer code - more information can be found in the body of the request. |
| 405 | Method Not Allowed | You tried to access a resource with an invalid method. Try swapping GET with POST or vice versa. |
| 406 | Not Acceptable | You requested a format that isn't JSON. |
| 409 | Conflict | A duplicate record already exists. Currently supported on creating new customers. |
| 422 | Unprocessable Entity | The body of the request cannot be parsed as JSON, or could not be validated. In the case of validation issues, generally a list of specific problems will be returned as JSON. |
| 500 | Internal Server Error | We had a problem with our server. Try again later. |
| 502 | Bad Gateway | Status code indicates that the server, received an invalid response from the ERP while attempting to fulfill the request. |
| 503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. |
| 504 | Gateway Timeout | Status code indicates that the server, did not receive a timely response from the ERP server it needed to access in order to complete the request. |
In the case of partial errors (for instance 3 out of 100 requested records had issues), we return a 200 status, but the body of the response from the API will return items in the 'errors' attribute, including a status code field that would match the error above.
Appendix A - Product records
This appendix details each of the fields that comes back from a product request.
| Variable | Description |
|---|---|
sku |
The stock code |
altcode |
Alternative stock code |
weight |
The weight in arbitrary units |
packedweight |
The packed weight in arbitrary units |
unit |
The number of units in this item (e.g. 12 cans in pack) |
vatcd |
The VAT code of this product |
vatrate |
The VAT rate being charge to this customer |
customer |
The ID of the customer this record applies to |
description |
The name of the product |
stockavailable |
The number of stock available of this product |
barcode |
A barcode identifying this product |
sonormord |
Minimum order. This is the minimum number of this product that can be ordered. |
soincr |
Order increments. This product can only be ordered in multiples of this value |
costprice |
The cost price of this item |
minimumprice |
The minimum price this item can be sold at |
image |
The image filename for the main product image |
productclass |
The product class (see Product Classes) |
superseded |
Stock code that the product is superseded by |
obsolete |
The obsolete indicator of the product |
pgroup |
The product group |
ptype |
The product category |
category |
The product category |
origin |
Country of origin |
leadtime1 |
Supplier 1 lead time |
leadtime2 |
Supplier 2 lead time |
leadtime3 |
Supplier 3 lead time |
minimumlevel |
Minimuim stock level |
maximumlevel |
Maximum stock level |
reorderlevel |
Reorder/Optimal stock level |
price |
See below |
pricebands |
A list of prices at the different price bands |
Price array
| Variable | Description |
|---|---|
source |
Source of price data |
pricecode |
Descriptions of each value are shown below. |
price |
The price |
pricediscr |
A percentage discount amount |
pricenet |
net price |
priceincvat |
Price including vat |
sellunit |
The number of units included in this price |
sellunitdesc |
A text description of the unit (e.g. EACH or PALLET) |
vatcd |
Vat code (see rates) |
currency |
Currency of price values |
discsrc |
Discount source |
quantity-breaks |
See below |
Product Classes
P+
| Value | Description |
|---|---|
B |
Bought |
D |
Description |
M |
Manufacture |
P |
Process |
L |
Labour |
F |
Finish |
O |
Outwork |
K |
Kit |
H |
Hose |
Price codes
P+
| Value | Description |
|---|---|
L |
List price |
M |
Minimum price |
C |
Cost price |
T |
Trade price |
# |
Price bands 1-5 |
P4
| Value | Description |
|---|---|
SALES_PRICE_MINIMUM |
Minimum price |
SALES_PRICE_# |
Price bands 1-10 |
Quantity breaks
Quantity breaks define the costs for certain amounts of a product purchased.
| Variable | Description |
|---|---|
quantity |
The quantity purchased |
quantity-to |
The upper bound (inclusive) of products purchased |
quantity-range |
A human readable depiction of the range of products (e.g. 1-9) |
price |
Price for this band |
pricediscr |
Percentage discount applied |
pricenet |
Net price of product |
priceincvat |
Price inclusive of VAT |
Appendix B - Customer records
This appendix details each of the fields that comes back from a customer detail request.
| Variable | Description |
|---|---|
accstat |
Three letter code defining the status of the customers account |
address1 |
Address line 1 |
address2 |
Address line 2 |
address3 |
Address line 3 |
address4 |
Address line 4 |
address5 |
Address line 5 P4 |
balt |
The current customer balance. Aged balances can also be found against the transactions endpoint |
cash_with_order |
(boolean) Customer must provide cash with orders |
clim |
Credit limit. Balance should not be allowed to exceed this level |
countrycode |
Country code (2 character ISO code) |
cref |
Customer reference |
cshsales |
(boolean) whether to allow this customer to checkout with cash only |
currcode |
Currency code (see currencies) |
customertype |
If the customer account belong to sl or crm P+ |
custype |
Three letter code defining which group to the customer belongs to |
delcode |
The default delivery code for this customer (see deliverymethods) |
email |
Email address. You must use the contact endpoint to fetch this data in P+ P4 |
eorino |
EORI number P+ |
faxno |
Main fax number |
fullname |
Full name of customer |
incvat |
(boolean) Whether customer should be presented with prices including VAT |
invref |
Invoice address reference |
is_retail |
(boolean) Retail customer |
linvdt |
(datetime) date of last invoice |
lpaydt |
(datetime) date of last payment made |
minordval |
Minimum order value for customer |
ordval |
The customers outstanding orders value P+ |
packing |
(boolean) Should P&P be charged to customer |
postcd |
Postcode |
pricecode |
Price code (see Price codes) |
pricesrc |
Source of prices shown for this customer |
proforma |
(boolean) Proforma invoices issued to customer |
rep |
The code for the customer representative P+ |
showdisc |
Show customer their discount |
stopped |
(boolean) Account stopped. User should not be able to check out |
telno |
Main phone number |
vatind |
VAT status - Y for pays VAT, N for non-VAT customer, E for EU customer (pays no VAT if has VAT code) |
vatregno |
VAT registration number |
disct |
Payment terms code |
despordval |
Dispatched but not invoiced order value |
bustype |
Business type code |
Credit Limits and balances
Against the customer endpoint, you have two values; balt which is the current total of all transactions, and clim which is the current maximum balance that should be allowed on this account.
The customer transactions endpoint outputs recent transactions for the customer. Each individual transaction (invoice, credit note etc.) will be returned within the response with information relating to that transaction. In addition to the individual transactions, there will be a record with a type of 'aged_balance' that will contain the aged balance information for the current period (balc) plus the last 4 periods (balc31, balc61 ...). The total outstanding balance should be a sum of those 5 aged balance totals.
Appendix C - Order records
This appendix details each of the fields that comes back from an order request.
| Variable | Description |
|---|---|
carriage |
The amount of carriage/postage & packing |
cono |
Customer order reference |
contactemail |
Contact email |
contactname |
Contact name for this order |
contacttelno1 |
Contact telephone P4 |
cref |
Customer account reference |
currency |
Currency code of the order (see currencies) |
delad1 |
Delivery address line 1 |
delad2 |
Delivery address line 2 |
delad3 |
Delivery address line 3 |
delad4 |
Delivery address line 4 |
delad5 |
Delivery address line 5 |
delcode |
Delivery method code (see deliverymethods) |
deldate |
(date) Date of delivery. When multiple deliveries have been made, only the latest will display. |
depot |
Depot the order should import into |
discval |
fixed discount on basket |
invad1 |
Invoice address line 1 P4 |
invad2 |
Invoice address line 2 P4 |
invad3 |
Invoice address line 3 P4 |
invad4 |
Invoice address line 4 P4 |
invad5 |
Invoice address line 5 P4 |
invpostcd |
Invoice post code P4 |
invref |
The reference code for the invoice address |
note |
Any delivery notes |
orddate |
(date) Date of order |
ordno |
The back office order ID |
ordtype |
Order type code |
ordtrack |
Order tracking consignment number |
paymeth |
Payment method code |
postcd |
Delivery postcode |
quote |
Whether this is a quote record P4 |
status |
Order status |
statusdesc |
Raw status code P4 |
statusind |
Order status code (see Order statuses) |
type |
Order type |
value |
Order subtotal |
vatvalue |
Total tax on order |
webfileno |
The order file number P+ |
Item records
| Variable | Description |
|---|---|
desc |
Description of the item |
desp |
Quantity despatched |
discval |
Absolute value of any discounts P+ |
lineno |
Unique identifier for line |
note |
Product note (e.g. customisations) |
price |
Price of a single item |
quan |
Quantity ordered |
stcode |
Stock code of item purchased |
value |
Line value |
depot |
Depot the order item should import into |
Ordered item records P+
| Variable | Description |
|---|---|
cref |
Customer account reference |
desc |
Description of the item |
lineno |
Unique identifier for line |
orddate |
(date) Date of order |
ordno |
The back office order ID |
price |
Price of a single item |
quan |
Quantity ordered |
stcode |
Stock code of item purchased |
value |
Line value |
weight |
Line weight |
Order attachment records
| Variable | Description |
|---|---|
comment |
A free form text comment |
date |
The date the file was last added |
filename |
A filename. This is used as the key to fetch the attachment from the API |
Appendix D - Promotion records
This appendix details each of the two types of fields that come back from a promotions request.
Promotions
| Variable | Description |
|---|---|
stockcode |
Stock code this discount applies to |
promtype |
Type of promotion. One of 'P' for special price, 'D' for discount percentage, 'B' for buy-one-get-one |
price1 |
Discounted price |
price2 |
Discounted price for amounts above price2qty |
price2qty |
Quantity of items required to apply discount price2 |
price3 |
Discounted price for amounts above price3qty |
price3qty |
Quantity of items required to apply discount price3 |
price4 |
Discounted price for amounts above price4qty |
price4qty |
Quantity of items required to apply discount price4 |
price5 |
Discounted price for amounts above price5qty |
price5qty |
Quantity of items required to apply discount price5 |
discr |
Discount as percentage between 0 and 100 |
sellunit |
Discounted price applies to this many of the product |
unitprice |
String containing the unit the price applies to (i.e. 'Each') |
vatcd |
Three character VAT code |
bogobuy |
Amount required to buy to activate offer |
bogoget |
Amount of item to receive free or discounted |
bogodisc |
Discount percentage as a number between 1 and 100 (100 being free) |
bogoprice |
Price for each discounted item (0 being free) |
Linked
| Variable | Description |
|---|---|
stockcode |
Stock code to be purchased |
linkstockcode |
Stock code this discount applies to |
mainquantity |
Quantity required to activate |
quantity |
Quantity of discount item |
price |
The price of the discounted item |
sellunit |
String containing the unit the price applies to (i.e. 'Each') |
disc |
The % discount applied to the discounted item |
autoadd |
Automatically add to basket |
Appendix E - Delivery records
Delivery methods
This appendix details the fields returned by a delivery method request.
| Variable | Description |
|---|---|
charges[n] |
Charges to apply for values greater than n |
charges[n][charge] |
The amount of the charge |
charges[n][retcharge] |
The retail amount of the charge |
code |
A short code used to identify the delivery method |
linkman |
(boolean) Linked to delivery routes |
max_value |
The overall maximum cost value this method applies to |
max_weight |
The overall maximum weight this method applies to |
min_value |
The overall minimum cost value this method applies to |
min_weight |
The overall minimum weight this method applies to |
name |
The friendly name of the delivery method |
type |
Whether values apply to weight or cost |
vatcd |
The VAT band applied to deliveries |
Delivery routes
This appendix details the fields returned by a delivery route request.
| Variable | Description |
|---|---|
desc |
The description of the delivery route |
code |
A short code used to identify the delivery route |
area |
The delivery area code |
daynight |
Is it a day or night route (D or N) |
monday-sunday |
(boolean) Are deliveries made on this day |
vtype |
The vehicle type |
weeknos |
The frequency of the route (Odd, Even, All, Last, 1st, 2nd, 3rd or 4th) |
postcodes[] |
List of postcodes this route covers |
Appendix F - Order Statuses
This appendix details the possible order statuses and what they map to in your back end and Magento.
| System | Name | API |
|---|---|---|
| Prof.ITplus | In Progress | 0 |
| Prof.ITplus | Part Despatched | 1 |
| Prof.ITplus | Fully Despatched | 2 |
| Prof.ITplus | Complete | 3 |
| Profit4 | QUOTED | 0 |
| Profit4 | ENQUIRING | 0 |
| Profit4 | AWAITING_ALLOCATION | 0 |
| Profit4 | ALLOCATED | 0 |
| Profit4 | ASSIGNED | 0 |
| Profit4 | PICKED | 0 |
| Profit4 | PICKING | 0 |
| Profit4 | RESERVED | 0 |
| Profit4 | RETURNED | 0 |
| Profit4 | OUT_FOR_DELIVERY (some lines) | 1 |
| Profit4 | DISPATCHED (some lines) | 1 |
| Profit4 | DIRECT_DELIVERY (some lines) | 1 |
| Profit4 | OUT_FOR_DELIVERY (all lines) | 2 |
| Profit4 | DIRECT_DELIVERY (all lines) | 2 |
| Profit4 | DISPATCHED (all lines) | 2 |
| Profit4 | DELIVERED | 3 |
| Profit4 | INVOICED | 3 |
| Magento2 | processing | 0 |
| Magento2 | part_dispatched | 1 |
| Magento2 | dispatched | 2 |
| Magento2 | complete | 3 |
Changelog
Notable changes will be kept in here
[1.9.10] - 2025-06-02
Added
- Added support for setting usrfld data when creating new customers in prof.ITplus integrations
- Added supplier lead time to product response in prof.ITplus integrations
- Added stock min/max/optimal levels to product response in prof.ITplus integrations
[1.9.9] - 2025-04-02
Added
- Added endpoints to return related product data for Profit4 integrations
Updated
- Updated product response to include website fields in profit4 integrations
- Updated product response to include altcode and packed weight in prof.ITplus integrations
- Updated customer response to return payment terms, dispatched order total and business type in prof.ITplus integrations
- Updated order response to include order type in prof.ITplus integrations
Fixed
- Fixed issue with discount values not being applied correctly in prof.ITplus integrations
[1.9.8] - 2025-02-25
Fixed
- Fixed issue with customer references containing special characters in prof.ITplus integrations
[1.9.7] - 2024-12-04
Fixed
- Fixed issue with email address when creating new customers in profit4 integrations
[1.9.6] - 2024-09-19
Fixed
- Fixed issue with creating customers in prof.ITplus integrations.
[1.9.5] - 2024-08-20
Added
- Added barcode, supplier code, commodity code and country of origin to product response in prof.ITplus integrations
[1.9.4] - 2024-08-07
Added
- Added product group, product type and product category to product response in prof.ITplus integrations
Fixed
- Fixed issue with customer price source being set incorrectly in profit4 integrations
[1.9.3] - 2024-07-19
Updated
- Updated order status list with new ASSIGNED_SHORTAGE status for profit4 integrations
[1.9.2] - 2024-04-26
Fixed
- Fixed issue with email address incorrectly updating when address is edited in profit4 integrations
[1.9.1] - 2024-04-18
Fixed
- Fixed issue with certain fields being populated incorrectly when creating new customers in profit4 integrations
[1.9.0] - 2024-01-30
Added
- Added new copy invoice endpoint. Currently only supported in prof.ITplus integrations
[1.8.12] - 2024-01-12
Updated
- Added configuration options to set cash status and nominal business category when creating new customers in profit4 integrations
[1.8.7] - 2024-01-08
Updated
- Added support for promotional pricing in profit4 integrations
Fixed
- Fixed performance issues fetching customer pricing in profit4 integrations
[1.8.6] - 2023-12-22
Fixed
- Fixed issue where cash status would get updated when editing an address in profit4 integrations
[1.8.5] - 2023-12-20
Updated
- Added rounding to to 2 decimal places for prices returned in profit4 integrations
[1.8.4] - 2023-11-20
Fixed
- Fixed issue creating new customers in profit4 integration if no invoice address is provided
- Further fixes to stock level endpoint to prevent incorrect levels being returned
[1.8.3] - 2023-10-24
Added
- Added new configuration for customer price endpoint in p4 integrations to fetch precalculated prices. This is a performance optimisation for large customer price lists.
- Added support for channel filter when fetching product prices in p4 integrations
Fixed
- Fixed issue with stock level causing incorrect levels to be returned in some instances.
[1.8.1] - 2023-08-24
Updated
- Updated docs to include depot fields in the add an order endpoint
[1.8.0] - 2023-08-23
Updated
- Updated customer prices endpoint to utilise performance optimisations added in profit4
Fixed
- Fixed issue with order attachment dates in prof.ITplus integrations
- Fixed issue with credit note transactions in prof.ITplus integrations
- Fixed issue with stock level caching that could cause incorrect level to be returned
- Fixed issue with orders failing to import due to cost price when integrated with profit4
[1.7.1] - 2023-06-01
Fixed
- Fixed issue calculating product prices in p+ integrations
[1.7.0] - 2023-05-09
Added
- Added support for posting a model account reference when creating a new customer (p+ only)
Updated
- Vat inclusive flag in p4 now defaults to false when posting an order
- Cash Status in p4 now defaults to NONE if not a cash sale when posting an order
- Cash Status in p4 now defaults to CASH_WITH_ORDER when creating a new customer
Fixed
- Fixed issue with customer price calculations with p4 integrations
- Fixed error where order line archived type was set to MANUAL when posting an order to p4
- Fixed issue with cshsales field returning incorrectly in p4 integrations
[1.6.1] - 2022-09-29
Added
- Previous order endpoint P4
- aged_balance added to transactions endpoint P4
Updated
- use warehouse ID's instead of descriptions
Fixed
- Fix for order attachments
[1.6.0] - 2022-08-31
Added
- Add
minordvalto customer details - Add
noteto order details P+ - Add new contacts endpoint P4
- Add address line 5 on multiple endpoints P4
- Add get multi order endpoint P4
Updated
- Allow blank
deldateto be sent with new order P+ - Include all delivery accounts in orders endpoint P4
- Allow orders to be searched by head office P4
- Allow cref to be passed on delivery route endpoint P+
Fixed
- Fixed spaces in stock descriptions
- Fixed setting different attribute types P4
[1.5.9] - 2022-07-05
Added
- Ordered Items endpoint P+
- Add
SALES_PRICE_10to product details P4 - Add
vatvaluefield to order details P4 - Add
descfield to product history details - Add
telnofield to address details
Fixed
- Fixed order attachment previews
- Show product image file name P+
[1.5.8] - 2022-04-27
Added
- Delivery method thresholds P4
- Export max/min weight and max/min value for delivery methods
- Add
currencyfield to order details - Add
vatvaluefield to order summary
Updated
- Standardise address format
- Set
countrycodeto GB if blank - Cache ERP version
- Updated docs
- Order
linenoto keep order
Fixed
- Decimals in delivery method charges/weights
- Check if
ordtrackinformation exists - recent stock endpoint P4
[1.5.7] - 2022-03-14
Added
cshstatusoption added to new order P4eorinofield added to customer details P+ordtrackinformation to order details endpointsmandatoryboolean added to attribute configs P4pricebandsinformation to P4 product endpoint
Updated
- Ability to show/hide
costpriceinformation
Fixed
- URL encoded stock codes that max out length P+
- P4 version number formatting
- Fix to allow categories with id greater than 10
[1.5.6] - 2022-01-31
Fixed
- Fixed posting payment issue P4
[1.5.5] - 2022-01-20
Updated
obsoletefield added to product details- Improved offline mode
[1.5.4] - 2021-12-06
Fixed
- Fixed config endpoints P4
[1.5.3] - 2021-12-03
Updated
- Return
ordnowhen adding new order P4
Fixed
- Return correct
invrefandpricesrcP4 - Fixed statement endpoint P4
- Fixed invoice endpoint P4
- Fixed deleting address P4
[1.5.2] - 2021-10-27
Added
- New version endpoint to get version of backend ERP system
- Ability to set
invoiceaddresswhen creating a new order in P4
Updated
- clear cache key for recently added customer
Fixed
- truncate
conoto 26 characters when raising an order
[1.5.1] - 2021-10-05
Added
- Fetch a range of orders using POST method
Updated
- Return 200 response when no orders found
optinoptions default to falsesupersededfield added to product details- Reduced customer cache time
Fixed
- Fix if
skulength too long on request - Fix clearing cache keys
[1.5.0] - 2021-08-20
Added
- New delivery route endpoint added for P+
Updated
linkmanflag added to deliverymethods endpoint- Updated POST data requirements in docs
- Various documentation updates
Fixed
- Fixed pricing issue with mixed case skus
[1.4.1] - 2021-07-29
Updated
- Point add order endpoint to new P4 mutation
- set orderOrigin to WEB by default
[1.4.0] - 2021-07-19
Added
- Ability to set invoice prefix when adding an order in P+
- Ability to set order type when adding an order in P+
[1.3.1] - 2021-07-08
Updated
- Add
productclassto product detail endpoints
Fixed
- Improved error reporting when connection to ERP is not available
[1.3.0] - 2021-07-06
Added
- Added support for PHP8
- Add new optional param, when creating new customer/order:
showprompts - Add a new endpoint to allow a payment to be added to an existing Profit4 order.
- Add support for sales order custom attributes
Updated
- Updated Lumen framework
- Add concurrencyVersion field to order details endpoint
- Add priceband information to P+ product endpoint
- Updated documentation
Fixed
- Fixed orders endpoint for customers with no default address
- Fixed image and attachment endpoint body and filenames
[1.2.0] - 2021-06-18
Added
- New endpoint - return all quotations similar to get all order endpoint
- Docker dev multiplatform environment
- New endpoint - return quotation details
- Add param "vat inclusive" for new order endpoint
- Add new error responses for 5xx codes
- Add
quotestatusfield to quotation and quotedetails endpoint - Added ordval field to customer detail response
Fixed
- Fixed pricecode value in product price array
[1.1.0] - 2021-04-05
Added
- New endpoint to return all prices where customer has a discount
Updated
- Currency code now included in product price array
Fixed
- Fixed issue with contact name not being imported to prof.ITplus via the 'Add a customer' endpoint
- Fixed issue where customer retailprc indicator did not show correctly for P4 integrations.
- Fixed issue where decimal stock levels were getting rounded to the nearest integer.
- Fixed issue where order item quantities were getting rounded to the nearest integer.
[1.0.3] - 2021-03-19
Updated
- Order import now supports posting of contact name and telephone number
Fixed
- P4 image requests will 404 correctly when not found, instead of a fatal error
- P4 products with no sale pricing will not longer cause a fatal error
- Inc VAT pricing now correctly including VAT value
- Customer currency code now correctly outputs on customer endpoint
[1.0.2] - 2021-03-09
Added
- Cache clear CLI command
connector:cacheclear
Updated
- Improved validation for new customer accounts under P4
- Updated documentation
Fixed
- Correctly seperate stats and cache data in-memory stores
[1.0.1] - 2021-03-03
Updated
- Better error message for orders missing headers
Fixed
- P4 ping endpoint now queries the correct URI
- P4 customer endpoint no longer fails on missing retail flag
- Missing delivery address lines on P+ new orders no longer cause fatal error
- Delivery contact details are no longer required fields.
[1.0.0] - 2021-02-26
Added
- Support for trade, cost and custom band pricing in P4
- Improved cross-platform unit testing
Updated
- Customer and address caches will clear when deleting or otherwise modifying the relevant record
- Broken statements reports disabled in P4. These will be re-enabled after a compatible Profit4 release is made.
Fixed
delcodedefault delivery method added to customer records.- Fixed issue with
is_retailvalue mapping from P+.
[0.14.1] - 2021-02-05
Updated
- Optimisations for large product requests in P4
Fixed
- Better validation on P+ depot/warehouse codes
[0.14.0] - 2021-01-25
Added
- P4 Support for email on users accounts
Updated
- Heavily reworked caching logic
- Optimisations to several slow queries
- Improved error messages
- Support for 409 error messages (duplicate record)
[0.13.12] - 2021-01-11
Updated
- Reduce memory requirements for debugging
Fixed
makeablenow available for P4, no longer causes memory issues when in debug- Issue with undefined warehouses causing errors in P+ fixed
[0.13.11] - 2021-01-08
Updated
contactemailandcontactnamesupport on order details for P+
Fixed
- Documentation for order details now shows correct fields for different back office systems
- Fatal error on order details with P4 v0.36+ fixed
[0.13.10] - 2021-01-05
Added
- P4 new
paid,paymentvalue,paymentbankid,paymentrefvalues supported on new orders
Updated
- P4 better support for new order line statuses such as 'Returned' and 'Direct Delivery'
Fixed
- P4 Invoiced status not appears as complete in order detail
- P4 Dispatched items appears on order lines
- P4 Order data/dispatch date should now be displayed
- P4 Warehouse support on new orders fixed
- P4 ping no longer counts a 'warn' status as being an unavailable site
[0.13.9] - 2020-12-18
Updated
- Better handling for 409 Conflict responses from Unity (P+)
[0.13.8] - 2020-12-17
Updated
- Documentation updated
- Added invalid character filtering for P+. Non-CP1252 characters will now appear as '?' in P+ instead of causing 500 errors to be reported. Any front-end system attached to a P+ connector should attempt to filter and validate these characters before submitting to the connector.
[0.13.7] - 2020-12-17
Updated
orddateanddeldatesupport for new order P4/P+- Changed authentication to apply key checks before route checks
contactnamesupport for P+contactname,contactemailandcontacttelno1support for P4 versions greater than 0.36.6- Strict filtering on new orders endpoint is now active. Previously arbritary values could be sent through to new orders, however this was causing some issues with P+.
- Makeable quantity support for P+ stock endpoint
lineNosupport for multiple lines containing the same SKU in P+.
Fixed
- Fix validation for warehouse in P4
- Minimum prices are now respected in P4
- Zero pricing a product now works correctly in P4
- Cash/Proforma status passed correctly in P4
- Order profit now calculated in P4
- Fix issues with recently changed stock endpoints
[0.13.6] - 2020-12-09
Fixed
- Editing and deleting addresses now functions as expected
- Fix further scalar cref issues on customers endpoint
[0.13.5] - 2020-12-07
Updated
- Better error message when no new stock records available
- Updated to Clockwork debug framework 5.0 and add specific
- Tidy unused code
Fixed
- Fix issue with scalar crefs under P4
[0.13.4] - 2020-12-04
Fixed
- Fatal error if warehouse not provided on new order P4
- Syntax error in customer controller
[0.13.3] - 2020-12-03
Updated
- Configuration setting to allow choice of price formats (either pence as an integer, or pounds as a decimal)
- Reworked local caching in cache engine to prevent situations where data could be modified while in cache
Fixed
- Changed URL encoding on P+ requests to RFC-3986 to handle plus character correctly
[0.13.2] - 2020-12-02
Updated
- Better error reporting when no stock levels found for a specific warehouse
Fixed
- P4 - the all stock endpoint correctly uses the default warehouse
[0.13.1] - 2020-12-01
Updated
- Default timeout for back-office requests increased to 7 seconds
Fixed
- Bulk fetching all stock levels caused 500 error
- Cache key was not unique for customer custom pricing endpoint
[0.13.0] - 2020-11-27
Added
- P+ : Customer custom pricing endpoint; lists any products with custom pricing for this customer.
- Support for fetching depot/warehouse specific stock levels
- Depot endpoint listing all depots/warehouses
Updated
- New orders; Item 'desc' field is now optional under P4
- Improved handling of errors with P4
- Updated Framework version
Fixed
- Promotional pricing should now be calculated correctly on bulk pricing requests
- Fixed the method argument naming on several endpoints
[0.12.0] - 2020-10-15
Updated
- Attributes field is no longer sent if there is no data beyond a key value (/products and /customers endpoints).
- Documentation improvements.
[0.11.2] - 2020-10-12
Fixed
- Handle empty responses as product not found
- Remove some redundant code
[0.11.1] - 2020-10-01
Updated
- Packing added to customer response (should carriage be charged to customer)
- Improved handling of P4 product channels
Fixed
- P+ SKUs are truncated to 24 characters
- Some customer fields in P4 now correctly come out as booleans
[0.11.0] - 2020-09-25
Added
- P4 customer attribute endpoints
- P4 product attribute endpoints
[0.10.0] - 2020-09-22
Added
- P+ contact endpoint
- P+ multi-depot support on new orders
- New warehouse/depot endpoints
- Support for overriding configuration via query - opening up support for multiple companies in a single Connector, multiple stationery sets in P4 etc.
- Manual support for multiple P4 versions (will be automated in a future release)
Fixed
- Stock endpoint handles missing products on partially cached queries better
- Compatibility updates for PHP 7.4
[0.9.3] - 2020-09-14
Updated
- New fields on customer records;
telno,faxno,cash_with_orderandproforma
[0.9.2] - 2020-09-08
Fixed
- URL encoding for product SKUs containing invalid characters
- Fatal error in P+ attribute and category endpoints
[0.9.1] - 2020-09-08
Fixed
- P+ compatibility fixes
- Currency correctly handled for P+ journal entries in statements
[0.9.0] - 2020-09-07
Added
- Profit4 recent customers, recent stock endpoints
- Profit4 security checks for customer endpoints
- Profit4 support for notes and delivery instructions
- Profit4 support for quotes
- Profit4 product categories endpoint
Updated
- Documentation tweaks
- Format for note lines tweaked (order line note field is now text not boolean)
Fixed
- Profit4 compatibility fix for requesting email copies
- Profit4 missing payment methods on orders no longer cause fatal error
- Profit4 minimum pricing now appears on products
[0.8.0] - 2020-08-17
Added
- Updated customers endpoint
- Support for note lines in orders
- Support for delivery notes
[0.7.6] - 2020-08-10
Fixed
- Check for empty/missing ACL file
- Fix possible information leak route
[0.7.5] - 2020-08-05
Updated
- Support for logging request data via Clockwork
Fixed
- Invalid validation for line discounts
[0.7.4] - 2020-08-04
Added
- Support for line-level percentage discounts
Updated
- Better error reporting for auth issues
Fixed
- ACL no longer requires both deny and accept fields. One or the other is fine.
Deprecated
- Machine keys no longer used
[0.7.3] - 2020-07-14
Fixed
- Issue where boolean values in customer records could get incorrectly mapped.
[0.7.2] - 2020-07-03
Updated
- Product order line 'sellunit' is always 1, to support sellunit sales.
[0.7.1] - 2020-06-24
Updated
- Product truncation for P+ addresses fixed and expanded. Should prevent excessive exception messages.
[0.7.0] - 2020-05-13
Added
- Product due date endpoint for P+
[0.6.2] - Unreleased
Release candidate 4
Updated
- Rollbar functionality updated for Lumen
[0.6.1] - Unreleased
Release candidate 3
Fixed
- Remove temp image files after use
[0.6.0] - 2020-03-26
Release candidate 2
Added
- Architectural support for multiple output methods other than json
- 'full' mode that outputs way too much data on products
- Support for automatic resizing of images. Requires ImageMagick 7 to be installed.
Updated
- Tweaked documentation
- Update framework to Lumen 6
- Update internal comments
- Improved VAT caching
- Improved caching of stock levels
- Change in name from eShop 3 API to Web Connector to better reflect variety of uses
Fixed
webfilenoadded to order header whitelist- Quantity break pricing logic updated
[0.5.4] - 2020-03-21
Release candidate 1
Updated
- Payment method now displays properly on order detail
- All customers endpoint now follows same format as all products endpoint
Fixed
- Uncaught exception with address ownership removed
- Cache clear URLs are decoded
[0.5.3] - 2020-03-16
Added
- Rollbar integration
Updated
- Updated documentation
- expose 'sonormord', 'soincr' and 'barcode' attributes on products
[0.5.2] - 2020-03-12
Updated
- Magento monitoring is no longer enabled as default
[0.5.1] - 2020-03-11
Fixed
- Backend exception on null response from backend
[0.5.0] - 2020-02-26
Added
- GET products/stock/recent endpoint containing recently updated stock levels
- POST products/stock/recent endpoint to reset what is considered recent
[0.4.5] - 2020-02-18
Fixed
- Better exception handling on caching errors
[0.4.4] - 2020-01-06
Added
- Stats endpoint now attempts ping of remote server
[0.4.3] - 2020-01-03
Fixed
- URL decoding on cache clear
[0.4.2] - 2019-08-29
Updated
- Transactions always have a trdate field
[0.4.1] - 2019-08-28
Updated
- Support for Web File Number in orders
[0.4.0] - 2019-07-03
Added
- P4 endpoint - request copy invoice
- P4 and P+ endpoint - purchase history
- P4 and P+ endpoints - order attachments
- P4 and P+ endpoints - delete customer
- P4 and P+ endpoints - delete address
- Unit tests for address edits and request copy invoice/statement
Updated
- Refactor handling of images and attachments to handle binaries and unknown mimetypes
- Match refactored Sales Order objects for P4
- Rework order statuses to be more consistent across all endpoints
- Improved exception handling for P4 endpoints
- Proper country handling for P4
- Documentation updated
- Statement and invoice copy endpoints now return more consistent data
- P+ head office/invref addresses both return the same format
- P+ address fields are now truncated
Fixed
- P4 add customer endpoint now returns both id and reference
- P+ address case sensitivity fix on getOrders
[0.3.0] - 2019-03-21
- Initial internal alpha release
[0.2.0] - 2018-08-06
Added
- Multiple endpoints now updated to API v1 and formats updated
- new README, NOTICE and CHANGELOG markdown files
Summary of Terms of Use
Last updated 2020-03-11
Access to the Web Connector ('the Software') is provided "As Is" with no warranty, no statement of merchantability or fitness for purpose. We provide no Service Level Agreement (SLA) unless otherwise agreed.
You agree that where you request an API key as a Developer on a project for a third party that you shall inform them of these terms of use and your acceptance of these terms and conditions shall be considered to bind the third party. Your failure to inform them is a breach of these terms of use.
You are responsible for limiting access to the Software; and agree to ensure that your API key and other details required to access the Software are kept in a secure manner and not communicated to any third party. In cases where you believe that the Software has been accessed by an unauthorised third party, you shall inform OGL Software Ltd immediately.
You are responsible for the secure storage and transmission of data provided by the Software, and ensuring that this data is handled in accordance with data protection law. You must take all appropriate actions to ensure that personal data is protected against accidental loss or destruction.
We may modify the terms of use, for example, to reflect changes to the law, our commercial terms or changes to our APIs. We will generally contact you as provided under this agreement to advise you of changes which will not apply retroactively and will become effective no sooner than 30 days after they are posted or communicated to you. Changes addressing new functions of the Software, urgent security and operational issues, or changes made for legal reasons may be effective immediately. In the event of more substantial changes you may be asked to explicitly accept the new terms, and failure to do so may result in your key being revoked, otherwise your continued use of the Software constitutes your acceptance of the modified terms.
OGL Software Ltd. reserve the right to revoke or suspend your API key with immediate notice if we reasonably believe that you are in violation of these terms of use or in the event of a material service issue.
We shall not be liable to You for any damage to software, damage to or loss of data, loss of profit, anticipated profits, revenues, anticipated savings, goodwill or business opportunity, or for any indirect or consequential loss or damage arising out of the use of the Software.
Any notice required or permitted under the terms of this Agreement or required by statute, law or regulation may be sent Head of Legal, OGL Software Ltd, Worcester Rd, Stourport-on-Severn DY13 9AT. We will contact you using the details you provide.
This agreement is governed by English law and the parties agree to submit to the exclusive jurisdiction of the English courts.
A full and up-to-date copy of our terms and conditions is always available via https://www.ogl.co.uk/oglterms