The application sends a POST request to the token endpoint.
The request must include client credentials in the request body.
Request clientId and clientSecret from LodDepot support.
When you need to use API from two ore more different subscribers request accountId as well
The format of the endpoint URL is:
https://ws.loddepot.com/api/v1/getAccessToken
Client credentials request JSON format :
{
"companyCode":"COMPANYCODE",
"clientId":"<clientID>",
"clientSecret":"<clientSecret>",
‘’accoutId':"<accountId>" [optional]
}
HTTP Response Request returns an Access token Access token is valid for one hour and can be used multiple times.
{
"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"}
The Access Token must be included in every request as an Authorization Header Bearer Token.
The structure of the authorization header is:
Authorization: Bearer <accessToken>
You can send a GET request to get list of items:
https://ws.loddepot.com/api/v1/ItemList?page=1
The page parameter used for selecting a specific page of results,
request will return 200 records per page.
The structure of the response:
{
"data": [],
"totalRecords": 370,
"page": 1,
"records": 200
}
ItemList returns list of active items
GET
https://ws.loddepot.com/api/v1/ItemList
Parameters:
page: To utilize paging, append a page parameter to the URL e.g. ?page=1
ItemAllList returns list of all items
GET
https://ws.loddepot.com/api/v1/ItemAllList
Parameters:
page: To utilize paging, append a page parameter to the URL e.g. ?page=1
Item returns an item
GET
https://ws.loddepot.com/api/v1/Item/itemId
https://ws.loddepot.com/api/v1/Item/itemName
https://ws.loddepot.com/api/v1/Item/productCode
https://ws.loddepot.com/api/v1/Item/refNumber
ItemCategoryList returns list of Categories
GET
https://ws.loddepot.com/api/v1/ItemCategoryList
ItemBrandList returns list of Brands
GET
https://ws.loddepot.com/api/v1/ItemBrandList
UnitOfMeasureList returns list of UnitOfMeasures
GET
https://ws.loddepot.com/api/v1/UnitOfMeasureList
CustomerList returns list of Customers
GET
https://ws.loddepot.com/api/v1/CustomerList
Parameters:
page: To utilize paging, append a page parameter to the URL e.g. ?page=1
size: The number of rows to return in a page. e.g. ?size=50 (max 200)
filter: JSON string to filter the records. e.g. ?filter={"accountNumber": "DD-2342344423"}
{
“customerId”:"",
"customerGuid": "",
"accountNumber": "DD-2342344423",
"name": "Customer Name",
“isActive”: true
}
Customer returns a customer
GET
https://ws.loddepot.com/api/v1/Customer/customerId
https://ws.loddepot.com/api/v1/Customer/customerGuid
https://ws.loddepot.com/api/v1/Customer/accountNumber
Customer inserts or update customer
POST
https://ws.loddepot.com/api/v1/Customer
Post as a body
{
"customerId": “” , [optional , for update]
"customerGuid": "", [optional , for update]
"accountNumber": "DD-2342344423", [optional , for 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”
}
],
}
SalesOrderList returns list of Sales Orders
GET
https://ws.loddepot.com/api/v1/SalesOrderList
Parameters:
page: To utilize paging, append a page parameter to the URL e.g. ?page=1
size: The number of rows to return in a page. e.g. ?size=50 (max 200)
filter: JSON string to filter the records. e.g. ?filter={"accountNumber": "DD-2342344423"}
{
“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",
}
SalesOrder returns a Sales order
GET
https://ws.loddepot.com/api/v1/SalesOrder/orderId
https://ws.loddepot.com/api/v1/SalesOrder/salesOrderGuid
SalesOrder inserts sales order
POST
https://ws.loddepot.com/api/v1/SalesOrder
Post as a body
{
"orderDate": "2024-08-21", [optional ]
"shipDate": "2024-08-22", [optional ]
"shipType": "DELIVERY", [optional ]
"orderSource": "STORE", [optional ]
"memo": null, [optional ]
"customerNote": null, [optional ]
"term": "Net 60", [optional ]
"deliveryStop": null, [optional ]
"orderTag": null, [optional ]
"poNumber": null, [optional ]
"orderManager": null, [optional ]
"items": [
{
"itemId": 1234,
"itemName": "L0001234", [optional ]
"quantityUnit": 3.0000,
"quantityFreeUnit": null, [optional ]
"unitCode": "BOX",
"rate": 45.00
"comments": null,
},
],"customer": {
"customerId": 955600, [optional, one of the values below must be presented ]
"customerGuid": "eab5f360-ac71-47f7-aba3-3ed00ff703c8", [optional ]
"accountNumber": "DD-2342344423", [optional ]
}
}