The LodDepot REST API lets your own software read and update your LodDepot data: items, customers, sales orders and price levels. You send ordinary HTTPS requests with JSON and get JSON back. This page explains how to get API access, how to sign in and send requests, every available endpoint with its parameters and examples, the webhooks that notify your system about sales order changes, and the separate Customer Access API that you can offer to your own customers.
Every request is limited to the data of your own company. To see what changed in the API and when, open the API changelog.
| API | Base address | Used for |
|---|---|---|
| LodDepot API (V1) | https://ws.loddepot.com/api/v1/ | Your own systems: read and update items, customers and sales orders. |
| Customer Access API (C1) | https://ws.loddepot.com/api/c1/ | Your customers: read your items with their own prices, and their sales orders. |
Do not share these credentials with your customers or with unauthorized users. Anyone who has them can read and change your data.
Send a POST request with your credentials in the body to the token endpoint:
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/getAccessToken |
Request body. accountId is needed only when the access was created with an Account Id:
{
"companyCode": "COMPANYCODE",
"clientId": "<clientId>",
"clientSecret": "<clientSecret>",
"accountId": "<accountId>" // optional
}
The response contains the access token. The token is valid for one hour and can be used for many requests. Request a new one when it expires.
{
"companyName": "Demo INC.",
"companyLogoUrl": "http://loddepotstorage.blob.core.windows.net/company-files/de3d16c0-7f89-4955-8d28-459f0b2543ba.png",
"companyEmail": "support@company.com",
"companyPhone": "+1 (800) 000 0000",
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW5...",
"accessTokenExpired": "2023-01-22T22:13:09.8415903Z",
"tokenType": "Bearer"
}
Send the access token in every request as an Authorization header with the Bearer type:
Authorization: Bearer <accessToken>
For example, this GET request returns the first page of your items:
GET https://ws.loddepot.com/api/v1/ItemList?page=1
Authorization: Bearer <accessToken>
List endpoints return their records in pages. The page parameter selects the page, and a page holds up to 200 records. The response looks like this:
{
"data": [],
"totalRecords": 370,
"page": 1,
"records": 200
}
| Field | Meaning |
|---|---|
| data | The records of the page. |
| totalRecords | How many records match in total. |
| page | The page that was returned. |
| records | How many records the page holds. |
| Resource | Endpoint | Method | What it does |
|---|---|---|---|
| Items | ItemList | GET | List of active items |
| ItemAllList | GET | List of all items | |
| Item | GET | One item | |
| Item | POST | Create or update one item | |
| ItemBulk | POST | Update many items | |
| ItemImage | POST | Add or replace an item image | |
| ItemImageDelete | POST | Delete an item image | |
| ItemCategoryList | GET | List of categories | |
| ItemCategoryTree | GET | Categories as a tree | |
| ItemBrandList | GET | List of brands | |
| UnitOfMeasureList | GET | List of units of measure | |
| Customers | CustomerList | GET | List of customers |
| Customer | GET | One customer | |
| Customer | POST | Create or update one customer | |
| Sales Orders | SalesOrderList | GET | List of sales orders |
| SalesOrder | GET | One sales order | |
| SalesOrder | POST | Create or update one sales order | |
| SalesOrderPdf | GET | Sales order as a PDF | |
| InvoicePdf | GET | Invoice as a PDF | |
| Price Levels | PriceLevelList | GET | List of price levels |
| ItemPriceLevelRateList | GET | Price level rates of items | |
| ItemPriceLevelVolumeList | GET | Volume discounts of items | |
| ItemPriceLevelFreeList | GET | Free item rules of items |
All addresses start with https://ws.loddepot.com/api/v1/. Parameters are added to the address as a query string, for example ?page=1&size=50.
Returns the list of active items.
| Method | URL |
|---|---|
| GET | https://ws.loddepot.com/api/v1/ItemList |
| Parameter | Description |
|---|---|
| page | The page to return, for example ?page=1. |
| size | The number of rows in a page, for example ?size=50. The maximum is 200. |
| filter | A JSON string that filters the records, for example ?filter={"refNumber": "LD12345"}. To filter by a custom field use {"customFieldName": "customfieldCode_x", "customFieldValue": "true"}. |
Returns the list of all items, active and inactive.
| Method | URL |
|---|---|
| GET | https://ws.loddepot.com/api/v1/ItemAllList |
| Parameter | Description |
|---|---|
| page | The page to return, for example ?page=1. |
Returns one item. Identify it by any of these values:
GET https://ws.loddepot.com/api/v1/Item/{itemId}
GET https://ws.loddepot.com/api/v1/Item/{itemName}
GET https://ws.loddepot.com/api/v1/Item/{productCode}
GET https://ws.loddepot.com/api/v1/Item/{refNumber}
Creates an item or updates an existing one. The existing item is found with itemId or, when it is not sent, with itemName. Send the data as the request body:
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/Item |
{
"itemId": 1, // optional, value will be used to search for the existing item to update
"itemName": "ItemName", // value will be used to search for the existing item to update
"itemDescription": "Item Description",
"itemCustomDescription": "Item Custom Description",
"refNumber": "LD12345", // used as identifier
"itemPrice": 100.00,
"itemCost": 50.00,
"itemBrand": "Item Brand", // optional
"unitQuantity": 10, // optional
"quantityOnHand": 100, // optional
"quantityOnSO": null, // optional
"quantityOnOrder": null, // optional
"enablePriceReduction": true, // optional
"itemHot": false, // optional
"isActiveInCatalog": true, // optional
"pricePerUnit": null, // optional
"itemWeight": null, // optional
"itemCountry": "USA", // optional
"itemWeightUnit": "LB", // optional
"invLocation": "LOC001", // optional
"invSubLocation": "01-1",
"itemType": "INVENTORY", // optional
"itemTag": null, // optional
"customTags": null, // optional
"invoiceCategory": null, // optional
"orderGroup": null, // optional
"minOrderQuantity": null, // optional
"maxOrderQuantity": null, // optional
"partNo": null, // optional
"flavors": null, // optional
"blackListMode": "BLACK", // optional, BLACK or WHITE
"itemVariants": [
{
"variantCode": "BGL",
"quantityOnHand": 25
}
], // optional, updates variant stock only
"imageUrl": "http://url", // optional
"imageUrl1": null,
"imageUrl2": null,
"imageUrl3": null,
"imageUrl4": null,
"ItemCategories": [
{
"categoryCode": "MainCategoryCode",
"isMainCategory": true
},
{
"categoryCode": "AdditionalCategoryCode",
"isMainCategory": false
}
], // optional
"unitCodes": [
{
"unitCode": "EA",
"isBaseUnit": true,
"unitName": "Each",
"unitCodeHide": true,
"productCode": null,
"productCode1": "096619088041",
"productCode2": null
},
{
"unitCode": "BOX",
"isBaseUnit": false,
"unitName": "Box",
"unitCodeBaseCount": 12,
"unitCodeHide": false, // optional
"unitPrice": null, // optional
"isPercent": false, // optional
"productCode": "096619088042",
"productCode1": null,
"productCode2": null
}
], // optional
"customFields": [
{
"fieldCode": "fieldCode1_x",
"fieldValue": "value1"
},
{
"fieldCode": "fieldCode2_x",
"fieldValue": "value2"
}
] // optional
}
When you send imageUrl values, the addresses must be reachable from the public internet and must not point to a loddepotstorage location.
Items that have variants include an itemVariants array in the responses of ItemList, ItemAllList and Item. Each entry contains variantCode, variantDescription, quantityOnHand, productCode and refNumber. The field is left out when the item has no variants.
Each unit of measure in the unitCodes array of ItemList, ItemAllList and Item includes a packaging object with the shipping packaging of that unit. It is used for the weight and volume totals on invoices, picking tickets and delivery documents. packaging is left out for units without packaging data.
packaging contains:
length, width, height and dimensionUnit: IN, FT, CM or M
volume and volumeUnit: CUFT, CUIN or CBM. Leave volume empty to calculate it from the dimensions
weight and weightUnit: LB, KG, OZ or G (gross shipping weight of one unit)
isStackable and maxStackCount
"unitCodes": [
{ "unitCode": "EA", "isBaseUnit": true, "unitCodeBaseCount": 1 },
{ "unitCode": "CS", "isBaseUnit": false, "unitCodeBaseCount": 12,
"packaging": { "length": 12, "width": 10, "height": 8, "dimensionUnit": "IN", "weight": 25, "weightUnit": "LB", "isStackable": true, "maxStackCount": 4 } }
]
The responses of ItemList, ItemAllList and Item include a blackListMode field. It controls how the item's customer and user list is applied:
| Value | Meaning |
|---|---|
| BLACK | The default. The item is hidden from the customers and users on the list. |
| WHITE | The item is visible only to the customers and users on the list. With an empty list a WHITE item stays visible to everyone. WHITE items are always hidden on public catalog links. |
POST Item accepts blackListMode to set the mode. ItemBulk accepts it with blackListModeSpecified set to true. The list itself is managed with the customerBlackListIdsAdd, customerBlackListIdsRemove and customerBlackListClear fields of ItemBulk.
Adds or replaces an item image. Send the image as a multipart form file with the content type multipart/form-data.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/ItemImage?itemId=123&index=0 |
Deletes an item image.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/ItemImageDelete?itemId=123&index=0 |
Updates many items in one request. Send an array of items as the request body. Each item is found with itemId, itemName, refNumber or productCode.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/ItemBulk |
All the properties that can be sent:
[
{
"itemId": 12344, // optional, value will be used to search for the existing item to update
"itemName": "itemName", // optional, value will be used to search for the existing item to update ,
"refNumber": "refNumber", // optional, value will be used to search for the existing item to update
"productCode": null, // optional, value will be used to search for the existing item to update
"isActiveInCatalog": true,
"isActiveInCatalogSpecified": true,
"isActive": null,
"isActiveSpecified": null,
"itemDescription": "Description",
"itemDescriptionSpecified": null,
"itemCustomDescription": null,
"itemCustomDescriptionSpecified": null,
"itemCategoryMain": {
"categoryCode": "CATEG111"
},
"itemCategoryMainSpecified": true,
"itemCategoriesAdd": null,
"itemCategoriesAddSpecified": null,
"itemCategoriesRemove": null,
"itemCategoriesRemoveSpecified": null,
"itemCategories": [
{
"categoryCode": "CATEG2",
"isMainCategory": true
},
{
"categoryCode": "CATEG5",
"isMainCategory": false
}
],
"itemCategoriesSpecified": true,
"itemPrice": null,
"itemPriceSpecified": null,
"itemCost": null,
"itemCostSpecified": null,
"quantityOnHand": null,
"quantityOnHandSpecified": null,
"itemVariants": [
{
"variantCode": "BGL",
"quantityOnHand": 25
}
], // optional, full variant list: updates stock, variants missing from the list are deactivated
"itemVariantsSpecified": true,
"itemBrand": null,
"itemBrandSpecified": null,
"unitCodeBase": {
"unitCode": "EA",
"unitCodeHide": true,
"productCode": "1234567890123",
"productCode1": "096619088041",
"productCode2": null
},
"unitCodeBaseSpecified": true,
"unitCode1": {
"unitCode": "BOX",
"isBaseUnit": false,
"unitCodeBaseCount": 12,
"unitCodeHide": null,
"unitPrice": null,
"isPercent": null,
"productCode": null,
"productCode1": null,
"productCode2": null
},
"unitCode1Specified": true,
"unitCode2": null,
"unitCode2Specified": null,
"unitCode3": null,
"unitCode3Specified": null,
"trackByWeight": null,
"trackByWeightSpecified": null,
"unitCodes": [
{
"unitCode": "EA",
"unitCodeHide": true,
"productCode": "1234567890123",
"productCode1": "096619088041",
"productCode2": null
},
{
"unitCode": "BOX",
"isBaseUnit": false,
"unitCodeBaseCount": 12,
"unitCodeHide": null,
"unitPrice": null,
"isPercent": null,
"productCode": null,
"productCode1": null,
"productCode2": null
}
],
"unitCodesSpecified": null,
"unitQuantity": null,
"unitQuantitySpecified": null,
"itemWeight": null,
"itemWeightSpecified": null,
"itemHot": null,
"itemHotSpecified": null,
"frontPage": null,
"frontPageSpecified": null,
"enablePriceReduction": null,
"enablePriceReductionSpecified": null,
"priceReductionMaxPercent": null,
"priceReductionMaxPercentSpecified": null,
"invLocation": null,
"invLocationSpecified": null,
"invSubLocation": null,
"invSubLocationSpecified": null,
"itemCountry": null,
"itemCountrySpecified": null,
"shippingWeight": null,
"shippingWeightSpecified": null,
"shippingWeightUnit": null,
"shippingWeightUnitSpecified": null,
"itemWeightUnit": null,
"itemWeightUnitSpecified": null,
"enableCustomPrice": null,
"enableCustomPriceSpecified": null,
"enableCustomQuantityFree": null,
"enableCustomQuantityFreeSpecified": null,
"showNegativeQuantity": null,
"showNegativeQuantitySpecified": null,
"itemTaxable": null,
"itemTaxableSpecified": null,
"itemTag": null,
"itemTagSpecified": null,
"invoiceCategory": null,
"invoiceCategorySpecified": null,
"customTagAdd": null,
"customTagAddSpecified": null,
"customTagRemove": null,
"customTagRemoveSpecified": null,
"orderGroup": null,
"orderGroupSpecified": null,
"minOrderQuantity": null,
"minOrderQuantitySpecified": null,
"maxOrderQuantity": null,
"maxOrderQuantitySpecified": null,
"blackListMode": null,
"blackListModeSpecified": null,
"customerBlackListIdsAdd": null,
"customerBlackListIdsAddSpecified": null,
"customerBlackListIdsRemove": null,
"customerBlackListIdsRemoveSpecified": null,
"customerBlackListClear": null,
"customerBlackListClearSpecified": null,
"itemWarningText": null,
"itemWarningTextSpecified": null,
"hideCatalog": null,
"hideCatalogSpecified": null,
"hideWebStore": null,
"hideWebStoreSpecified": null,
"hideMobile": null,
"hideMobileSpecified": null,
"hidePortal": null,
"hidePortalSpecified": null,
"customFields": [
{
"fieldCode": "fieldCode1_x",
"fieldValue": "value1"
},
{
"fieldCode": "fieldCode2_x",
"fieldValue": "value2"
}
],
"customFieldsSpecified": null
}
]
Example that changes the catalog visibility and the main category of one item and the catalog visibility of two others:
[
{
"itemName": "itemName1" ,
"isActiveInCatalog": true,
"isActiveInCatalogSpecified": true,
"itemCategoryMain": {
"categoryCode": "CATEG111"
},
"itemCategoryMainSpecified": true
},
{
"itemName": "itemName2" ,
"isActiveInCatalog": false,
"isActiveInCatalogSpecified": true
},
{
"itemName": "itemName2" ,
"isActiveInCatalog": false,
"isActiveInCatalogSpecified": true
}
]
Return the lists you use when you create or update items.
| Method | URL | Returns |
|---|---|---|
| GET | https://ws.loddepot.com/api/v1/ItemCategoryList | List of categories |
| GET | https://ws.loddepot.com/api/v1/ItemCategoryTree | Categories in a tree structure |
| GET | https://ws.loddepot.com/api/v1/ItemBrandList | List of brands |
| GET | https://ws.loddepot.com/api/v1/UnitOfMeasureList | List of units of measure |
Returns the list of customers.
| Method | URL |
|---|---|
| GET | https://ws.loddepot.com/api/v1/CustomerList |
| Parameter | Description |
|---|---|
| page | The page to return, for example ?page=1. |
| size | The number of rows in a page, for example ?size=50. The maximum is 200. |
| filter | A JSON string that filters the records, for example ?filter={"accountNumber": "DD-2342344423"}. The fields you can filter by are shown below. |
| expand | A comma separated list of additional data, for example ?expand=ReceivingWindow. |
Filter fields:
{
"customerId":"",
"customerGuid": "",
"accountNumber": "DD-2342344423",
"name": "Customer Name",
"isActive": true,
"customerIds":"1234,1235,1236" // filter by customerId, comma separated list of customerId
}
Returns one customer. Identify it by any of these values:
GET https://ws.loddepot.com/api/v1/Customer/{customerId}
GET https://ws.loddepot.com/api/v1/Customer/{customerGuid}
GET https://ws.loddepot.com/api/v1/Customer/{accountNumber}
GET https://ws.loddepot.com/api/v1/Customer/{refNumber}
The expand parameter works as on CustomerList, for example ?expand=ReceivingWindow.
Creates a customer or updates an existing one. The existing customer is found with customerId, customerGuid, accountNumber or refNumber. To change the accountNumber or the refNumber of a customer you found with the old value, send the new value in accountNumberUpdate or refNumberUpdate together with the matching Specified property set to true.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/Customer |
{
"customerId": "", // optional , value will be used to search for the existing customer to update
"customerGuid": "", // optional , value will be used to search for the existing customer to update
"accountNumber": "DD-2342344423", // optional , value will be used to search for the existing customer to update
"accountNumberUpdate": "DD-2342344424", // use when you find the customer by accountNumber and change it to a different value
"accountNumberUpdateSpecified": true, // optional , accountNumber for update
"refNumber": "2342344423", // optional, value will be used to search for the existing customer to update
"refNumberUpdate": "2342344424", // use when you find the customer by refNumber and change it to a different value
"refNumberUpdateSpecified": true, // optional , for refNumber update
"customerName": "Customer Name",
"contactName": "Name",
"contactNameAlt": null,
"phone": "+1 123 123 4567",
"phoneAlt": null,
"email": "customer@gmail.com",
"fax": null,
"salesRepName": null,
"creditLimit": 1000.00,
"notes": "Customer Note",
"term": "Net 60",
"deliveryRoute": "Route 1",
"region": "Tri-State",
"callFreq": "W02",
"callWeekDay": "MON",
"isActiveInCatalog": true,
"addresses": [
{
"addr1": "370 Easy St.",
"addr2": "",
"addr3": "",
"addr4": "",
"city": "Middlefield",
"state": "CA",
"postalCode": "94482",
"country": "USA",
"addressType": "BILLING"
},
{
"addr1": "370 Easy St.",
"addr2": "",
"addr3": "",
"addr4": "",
"city": "Middlefield",
"state": "CA",
"postalCode": "94482",
"country": "USA",
"addressType": "SHIPPING"
}
],
"priceLevelRate": [
{
"pricelId": 150,
"priceCode": "SUPERSALE_FOR_EVERYONE",
"priceName": "SUPERSALE for EVERYONE",
"startDate": null,
"endDate": "2999-12-31T00:00:00",
"applyAllCustomer": false,
"priorityOrder": 1,
"isPromotion": false
}
],
"priceLevelFree": null,
"priceLevelVolume": [
{
"pricelId": 115,
"priceCode": "CHEESE_CLUB_",
"priceName": "CHEESE CLUB + BREST LITOVSK",
"startDate": null,
"endDate": "2999-12-31T00:00:00",
"applyAllCustomer": false,
"priorityOrder": 1,
"isPromotion": true
}
]
}
Returns the list of sales orders.
| Method | URL |
|---|---|
| GET | https://ws.loddepot.com/api/v1/SalesOrderList |
| Parameter | Description |
|---|---|
| page | The page to return, for example ?page=1. |
| size | The number of rows in a page, for example ?size=50. The maximum is 200. |
| filter | A JSON string that filters the records, for example ?filter={"accountNumber": "DD-2342344423"}. The fields you can filter by are shown below. |
| expand | A comma separated list of additional data, for example ?expand=ReceivingWindow,PaymentBalance. The options are ReceivingWindow, PaymentBalance, ItemsUnitCount and ItemsWeight. |
Filter fields:
{
"orderId":"123",
"refNumber":"",
"salesOrderGuid":"",
"dateFrom":"2024-01-01", // filter by orderDate
"dateTo":"2026-01-01", // filter by orderDate
"customerId":"",
"customerGuid": "",
"accountNumber": "DD-2342344423",
"name": "Customer Name",
"statusCodes":"NEW,CUSTOMER", // filter by statusCode, comma separated list of codes ex: DRAFT,NEW,CUSTOMER,PREORDER,APPROVED,PICKING,POSTED,ARCHIVED
"orderIds":"1234,1235,1236" // filter by orderId, comma separated list of orderId
}
Returns one sales order. Identify it by its number or its GUID.
GET https://ws.loddepot.com/api/v1/SalesOrder/{orderId}
GET https://ws.loddepot.com/api/v1/SalesOrder/{salesOrderGuid}
The expand parameter works as on SalesOrderList, for example ?expand=ReceivingWindow,PaymentBalance.
Creates a sales order or updates an existing one.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/SalesOrder |
{
"orderId": 123456, // optional, value will be used to search for the existing sales order to update
"salesOrderGuid": "eab5f360-ac71-47f7-aba3-3ed00ff703c8", // optional, value will be used to search for the existing sales order to update
"orderDate": "2024-08-21", // optional
"shipDate": "2024-08-22", // optional
"shipType": "DELIVERY", // optional
"statusCode": "NEW", // optional
"orderSource": "STORE", // optional
"memo": null, // optional
"customerNote": null, // optional
"deliveryNote": null, // optional
"term": "Net 60", // optional
"deliveryRoute": null, // optional
"deliveryStop": null, // optional
"orderTag": null, // optional
"poNumber": null, // optional
"orderManager": null, // optional
"items": [
{
"itemId": 1234, // optional, item will be found by itemName when not provided
"itemName": "L0001234", // optional, itemId or itemName must be provided
"quantityUnit": 3.0000,
"quantityFreeUnit": null, // optional
"unitCode": "BOX",
"rate": 45.00,
"comments": null
}
],
"customer": { // required when creating, ignored when updating
"customerId": 955600, // optional, one of the values below must be presented
"customerGuid": "eab5f360-ac71-47f7-aba3-3ed00ff703c8", // optional
"accountNumber": "DD-2342344423" // optional
},
"address": { // optional, ship-to address
"addr1": "370 Easy St.",
"addr2": "",
"city": "Middlefield",
"state": "CA",
"postalCode": "94482",
"country": "USA",
"contactName": "Name",
"phone": "+1 123 123 4567",
"email": "customer@gmail.com"
}
}
Create or update. When orderId or salesOrderGuid matches an existing sales order, the request updates that order. When both are sent, orderId is used. A request without an identifier creates a new order. An unknown orderId returns an error. An unknown salesOrderGuid creates a new order with that salesOrderGuid.
Update rules
Return the sales order or its invoice as a PDF. Identify the order by its number or its GUID.
GET https://ws.loddepot.com/api/v1/SalesOrderPdf/{orderId}
GET https://ws.loddepot.com/api/v1/SalesOrderPdf/{salesOrderGuid}
GET https://ws.loddepot.com/api/v1/InvoicePdf/{orderId}
GET https://ws.loddepot.com/api/v1/InvoicePdf/{salesOrderGuid}
| Method | URL | Returns |
|---|---|---|
| GET | https://ws.loddepot.com/api/v1/PriceLevelList | List of price levels |
| GET | https://ws.loddepot.com/api/v1/ItemPriceLevelRateList | Price level rates related to items |
| GET | https://ws.loddepot.com/api/v1/ItemPriceLevelVolumeList | Price level volume discounts related to items |
| GET | https://ws.loddepot.com/api/v1/ItemPriceLevelFreeList | Price level free items related to items |
OrderSense reads an order written in free text (the way a customer would text or email it), finds the customer and the items with AI, and places the result in the OrderSense Inbox of the Portal, where a person reviews it and turns it into a sales order. Use this when your system receives orders as text (a form on your website, a chat, a transcribed call) and you want them handled like the orders that arrive by text message, WhatsApp or email. OrderSense must be switched on for the company (Portal, Settings, Features, Other, "Use OrderSense"); otherwise the call answers with updateStatus ERROR.
Posts one order. Name the customer with any of customerId, accountNumber, phone, email or customerName (at least one is required). The first of them, in that order, that matches exactly one active customer is set on the message; what does not match is shown to the reviewer as a hint, so the order is never refused for a customer that is not recognised. externalId is your own id of the order (a PO number, a ticket id): the same id posted again is stored once and answered with status duplicate.
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/v1/OrderSenseMessage |
{
"text": "Please send 10 cases tomato sauce and 5 boxes spaghetti for Friday", // required: the order as the customer wrote it
"subject": "Weekly order", // optional, shown as the heading in the Inbox
"externalId": "PO-7781", // optional, your id of the order; the same id again is a duplicate
"senderName": "Maria (purchasing)", // optional, who sent the order; defaults to the customer name
"customerId": 912600, // name the customer with any of these five
"accountNumber": "DD-2342344423",
"phone": "+1 347 555 0100",
"email": "orders@customer.com",
"customerName": "Customer Name" // the exact customer or company name
}
Response:
{
"data": {
"messageId": 1045, // the message in the OrderSense Inbox
"status": "queued", // queued (being read) or duplicate (externalId seen before; messageId is that message)
"customerId": 912600, // the customer set on the message, null when the reviewer has to pick one
"customerName": "Customer Name",
"customerMatchedBy": "ID" // ID, ACCOUNT, PHONE, EMAIL or NAME
},
"updateStatus": "OK", // ERROR with updateMessage when the request is incomplete or OrderSense is not switched on
"updateMessage": null
}
The order appears in the Inbox within about a minute with the status Needs review. Items, units and quantities are read by AI and matched to the catalog; the reviewer confirms or corrects them, and every correction is remembered for that customer. A webhook SALESORDER.NEW is sent when the reviewer creates the order, like for any other order.
Sales order webhooks send a notification to an address you specify, in real time, when sales orders are created, updated or deleted. This way your system does not have to ask for changes again and again.
The x-client-id header is added to every webhook request automatically with the Client ID of your API configuration. The same clientId value is also in the JSON payload, so your system can check where a notification came from.
| Event type | Sent when |
|---|---|
| SALESORDER.NEW | A sales order is created. |
| SALESORDER.UPDATE | A sales order is updated, including updates made through the API. |
A notification can hold several events. Example of a webhook payload:
{
"events": [
{
"eventType": "SALESORDER.NEW",
"objectType": "SALESORDER",
"objectId": 2108830,
"eventDate": "2026-01-11T19:06:09.4",
"payload": {
"orderId": 2108830,
"customerId": 912600,
"customerName": "0969 Ocean View Road",
"accountNumber": "DD-2342344423",
"orderDate": "2026-01-05T12:08:40.293",
"shipDate": "2026-01-05",
"shipTypeCode": "DELIVERY",
"statusCode": "NEW",
"orderSource": "MOBILE",
"itemCount": 3,
"itemAmount": 370.55,
"itemAmountWithTax": 370.55
}
},
{
"eventType": "SALESORDER.UPDATE",
"objectType": "SALESORDER",
"objectId": 2108829,
"eventDate": "2026-01-11T19:06:29.83",
"payload": {
"orderId": 2108829,
"customerId": 912600,
"customerName": "0969 Ocean View Road",
"accountNumber": "DD-2342344423",
"orderDate": "2026-01-05T12:08:40.293",
"shipDate": "2026-01-05",
"shipTypeCode": "DELIVERY",
"statusCode": "NEW",
"orderSource": "MOBILE",
"itemCount": 3,
"itemAmount": 370.55,
"itemAmountWithTax": 370.55
}
}
],
"clientId": "Ger45rJE2h**************************"
}
You can give your customers their own API access to your item data with their customer prices. It works like the LodDepot API above, but it is limited to the items, prices and sales orders of the customer. Its address is https://ws.loddepot.com/api/c1/.
Send a POST request with the customer's credentials in the body to the token endpoint:
| Method | URL |
|---|---|
| POST | https://ws.loddepot.com/api/c1/getAccessToken |
{
"companyCode": "COMPANYCODE",
"clientId": "<clientId>",
"clientSecret": "<clientSecret>",
"accountId": "<accountId>" // optional
}
The response contains the access token. It is valid for one hour and can be used for many requests.
{
"companyName": "Demo INC.",
"companyLogoUrl": "http://loddepotstorage.blob.core.windows.net/company-files/de3d16c0-7f89-4955-8d28-459f0b2543ba.png",
"companyEmail": "support@company.com",
"companyPhone": "+1 (800) 000 0000",
"accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb21wYW5...",
"accessTokenExpired": "2023-01-22T22:13:09.8415903Z",
"tokenType": "Bearer"
}
Send the access token in every request as an Authorization header with the Bearer type:
Authorization: Bearer <accessToken>
For example, this GET request returns the first page of items. The page parameter selects the page, and a page holds up to 200 records:
GET https://ws.loddepot.com/api/c1/ItemList?page=1
Authorization: Bearer <accessToken>
{
"data": [],
"totalRecords": 370,
"page": 1,
"records": 200
}
| Method | URL | Returns |
|---|---|---|
| GET | https://ws.loddepot.com/api/c1/ItemList | List of active items. Parameter: page, for example ?page=1. |
| GET | https://ws.loddepot.com/api/c1/ItemCategoryList | List of categories |
| GET | https://ws.loddepot.com/api/c1/ItemBrandList | List of brands |
| GET | https://ws.loddepot.com/api/c1/UnitOfMeasureList | List of units of measure |
| GET | https://ws.loddepot.com/api/c1/SalesOrder/{orderId} https://ws.loddepot.com/api/c1/SalesOrder/{salesOrderGuid} | One sales order |
| POST | https://ws.loddepot.com/api/c1/OrderSenseMessage | Posts an order written as text (text, optional subject, externalId, senderName) into the supplier's OrderSense Inbox on behalf of the customer the token belongs to. Same body and answer as the company endpoint above, without the customer fields (customerMatchedBy is TOKEN). OrderSense must be switched on for the supplier. |