Customers API
General:
Basics:
Base-URL: https://capi.lagerkoll.com/v1/customers/
Parameters in the url should all be encoded and all data sent should be UTF-8
MAX number of requests per minute is set to 200.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.
When the limit is hit an error with code 429 is returned, with the header "Retry-After" containing the number of seconds you have to wait for your next request.
Headers:
There are 2 ways to be authenticated when using this API. in both ways you add headers to the request.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
1) Use an API-key together with store-id. This would be used when communicating machine to machine and no real person is involved. The API-key is available from where you activated the API. The store-id is also available in the same place.
2) Use a user_id and user_token together with a store-id. You get these values from the login-request. The values are connected to a person and are gained when an actual login to the system has been made.
store: <<STORE>> user_id: <<USER_ID>> user_token: <<USER_TOKEN>> api_key: <<API_KEY>> Accept: application/json Content-Type: application/json
Errors:
Code | Description |
---|---|
900001 | Credentials don't match |
900101 | Common error |
900429 | Too many requests |
900501 | Error when getting a single customer |
900502 | Error when creating a customer |
900503 | Error when updating a customer |
900504 | Error when deleting a customer |
900512 | Error when importing customers |
900513 | Error when updating import customer template |
900514 | Error when adding import customer template |
900515 | Error when deleting import customer template |
900521 | Error when exporting customers |
{ "errorCode" : 900101, "errorMessage" : "Something went wrong on the server", "errorField" : null, "errorData" : null }
Customers API:
Customers
Get customer tags
GETUrl: /tags
Headers:
Accept: application/json or application/xml
Get customer tags for store group
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
query | |||
page | 0 | ||
limit | 50 |
Body:
Successfull response:
{ "pages": 6585, "pageSize": 6825, "page": 9792, "projectsCount": 9200, "tags": [{ "name": "name", "externalId": "externalId", "id": 7190, "desc": "desc" }] }
Get customer for user
GETUrl: /user
Headers:
Accept: application/json or application/xml
Get customer for currently logged in user
Body:
Successfull response:
{ "pages": 110, "customersCount": 3076, "pageSize": 9057, "page": 6121, "customers": [{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 5021, "desc": "desc" }, "discount": 5094.832634462379 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 5243, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": true, "customerId": 9827, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }], "since": 3211 }
Get customer (ext-id)
GETUrl: /external/{customer_id}
Headers:
Accept: application/json or application/xml
Get a single customer based on customer external id
Body:
Successfull response:
{ "pages": 7169, "customersCount": 8864, "pageSize": 2074, "page": 8152, "customers": [{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 4820, "desc": "desc" }, "discount": 6821.086828079239 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 9858, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": true, "customerId": 5120, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }], "since": 8252 }
Get customer
GETUrl: /{customer_id}
Headers:
Accept: application/json or application/xml
Get a single customer based on customer id
Body:
Successfull response:
{ "pages": 151, "customersCount": 6803, "pageSize": 6662, "page": 7510, "customers": [{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 9461, "desc": "desc" }, "discount": 2347.647180097928 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 4630, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": false, "customerId": 8071, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }], "since": 9997 }
Get customers
GETUrl:
Headers:
Accept: application/json or application/xml
Get a list of customers based on query
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
query | |||
type | UNDEFINED | ||
since | 0 | ||
page | 0 | ||
limit | 100 | ||
order | asc | ||
sort_column | name |
Body:
Successfull response:
{ "pages": 6097, "customersCount": 7514, "pageSize": 7111, "page": 5580, "customers": [{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 5707, "desc": "desc" }, "discount": 6772.24177728997 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 2450, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": true, "customerId": 4277, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }], "since": 7999 }
Add customer
POSTUrl:
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new customer
Body:
{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "city": "city", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "ourReference": "ourReference", "emailOffer": "emailOffer", "customerType": "PRIVATE", "showVAT": false, "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 6884, "desc": "desc" }, "discount": 7919.312264821146 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "orgNumber": "orgNumber", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "yourReference": "yourReference", "pricelistId": "-1", "address2": "address2", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "tags": [{ "name": "name", "externalId": "externalId", "id": 3644, "desc": "desc" }], "visitingCity": "visitingCity", "webUrl": "webUrl", "deliveryCountry": "deliveryCountry", "name": "name", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber" }
Successfull response:
{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 9859, "desc": "desc" }, "discount": 9563.609563990689 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 5083, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": false, "customerId": 9626, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }
Add customer tags
POSTUrl: /tag
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add customer tags for store group
Body:
{ "name": "name", "externalId": "externalId", "id": 9537, "desc": "desc" }
Successfull response:
{ "name": "name", "externalId": "externalId", "id": 9797, "desc": "desc" }
Import customers
POSTUrl: /import/{template_id}
Headers:
Accept: application/json or application/xml
Content-type: multipart/form-data
Content-type: multipart/form-data
Import customers from excel
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
update_only | |||
file | |||
file |
Body:
Successfull response:
Test import customers
POSTUrl: /import/test/{template_id}
Headers:
Accept: application/json or application/xml
Content-type: multipart/form-data
Content-type: multipart/form-data
Test import customers from excel. This will read the first data-row from the uploaded file and return the result. Can be used to verify that the template being used is mapped correctly
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
file | |||
file |
Body:
Successfull response:
Invite customer
POSTUrl: /{customer_id}/invite
Headers:
Accept: application/json or application/xml
Other headers: user_id, user_token
Other headers: user_id, user_token
Invite customer to customer portal. Customer can then login to the customer and place orders
Body:
{ "notes": "notes", "role": { "paths": [{ "path": "path", "action": "action" }], "name": "name", "fields": {}, "portal": "portal" }, "phone": "phone", "name": "name", "email": "email" }
Successfull response:
{ "systemAdmin": true, "bankID": false, "notes": "notes", "role": { "storeGroupId": 5686, "paths": [{ "path": "path", "action": "action" }], "name": "name", "id": 804, "fields": {}, "portal": "portal", "users": 3974 }, "phone": "phone", "name": "name", "emailInvalid": true, "admin": true, "lastLoggedIn": 6976, "id": 4340, "email": "email", "customer": false }
Update customer
PUTUrl: /{id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Update an existing customer
Body:
{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 5557, "desc": "desc" }, "discount": 5626.790186333456 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 4797, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": true, "customerId": 5645, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }
Successfull response:
{ "zipCode": "zipCode", "country": "country", "externalCustomerId": "externalCustomerId", "invoiceDiscount": "0", "visitingCountryName": "visitingCountryName", "phone2": "phone2", "language": "store´s language", "visitingZipCode": "visitingZipCode", "invoiceRemark": "invoiceRemark", "phone1": "phone1", "emailOffer": "emailOffer", "customerType": "PRIVATE", "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 5295, "desc": "desc" }, "discount": 9294.94490501349 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 2975, "desc": "desc" }], "emailStatus": {}, "webUrl": "webUrl", "name": "name", "countryName": "countryName", "visitingCountry": "visitingCountry", "deliveryName": "deliveryName", "paymentTerm": "If null, the first payment term is set", "vatNumber": "vatNumber", "city": "city", "pricelistName": "pricelistName", "ourReference": "ourReference", "showVAT": false, "customerId": 1972, "visitingAddress": "visitingAddress", "priceIncludeVAT": "false", "currency": "Sek", "deliveryCountryName": "deliveryCountryName", "email": "email", "deliveryCity": "deliveryCity", "deliveryPhone1": "deliveryPhone1", "comments": "comments", "pricelistId": "-1", "address2": "address2", "address1": "address1", "deliveryAddress2": "deliveryAddress2", "externalId": "externalId", "deliveryAddress1": "deliveryAddress1", "deliveryPhone2": "deliveryPhone2", "visitingCity": "visitingCity", "deliveryCountry": "deliveryCountry" }
Delete customer
DELETEUrl: /{id}
Headers:
Accept: application/json or application/xml
Delete an existing customer
Body:
Successfull response:
Export
Create export
POSTUrl: /export/{template_id}
Headers:
Accept: application/json or application/xml
Create export file for today´s date for specific template
Body:
Successfull response:
Templates
Get customer import templates
GETUrl: /import/templates
Headers:
Accept: application/json or application/xml
Get customer import templates
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
query | |||
page | 0 | ||
limit | 50 |
Body:
Successfull response:
{ "importTemplates": [{ "data": { "rowFirst": 9627, "zipCode": { "defaultValue": "defaultValue", "column": 3362 }, "country": { "defaultValue": "defaultValue", "column": 1908 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 4482 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 2515 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 5263 }, "city": { "defaultValue": "defaultValue", "column": 1087 }, "language": { "defaultValue": "defaultValue", "column": 5300 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 6463 }, "type": { "defaultValue": "defaultValue", "column": 986 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 2852 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 7850 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 8963 }, "ourReference": { "defaultValue": "defaultValue", "column": 5162 }, "emailOffer": { "defaultValue": "defaultValue", "column": 8670 }, "showVat": { "defaultValue": "defaultValue", "column": 4351 }, "addressTwo": { "defaultValue": "defaultValue", "column": 449 }, "www": { "defaultValue": "defaultValue", "column": 8979 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 489 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 4964 }, "customerId": 3268, "emailInvoice": { "defaultValue": "defaultValue", "column": 2081 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 3633 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 525 }, "currency": { "defaultValue": "defaultValue", "column": 5269 }, "orgNumber": { "defaultValue": "defaultValue", "column": 2007 }, "email": { "defaultValue": "defaultValue", "column": 7474 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 3283 }, "yourReference": { "defaultValue": "defaultValue", "column": 1356 }, "rowTitle": 4492, "emailOrder": { "defaultValue": "defaultValue", "column": 9653 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 9740 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 1813 }, "vat": { "defaultValue": "defaultValue", "column": 2327 }, "externalId": { "defaultValue": "defaultValue", "column": 1155 }, "priceListId": { "defaultValue": "defaultValue", "column": 282 }, "phoneOne": { "defaultValue": "defaultValue", "column": 8355 }, "customerName": 6596, "tags": { "defaultValue": "defaultValue", "column": 9570 }, "visitingCity": { "defaultValue": "defaultValue", "column": 5208 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 6608 }, "comment": { "defaultValue": "defaultValue", "column": 6886 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 6181 }, "addressOne": { "defaultValue": "defaultValue", "column": 3373 }, "deliveryName": { "defaultValue": "defaultValue", "column": 9638 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 8338 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 9881 } }, "name": "name", "storegroupId": 6363, "id": 344, "type": "type" }], "pages": 6245, "pageSize": 5877, "page": 3256, "importTemplateCount": 9478 }
Get customer import template
GETUrl: /import/template/{id}
Headers:
Accept: application/json or application/xml
Get customer import template
Body:
Successfull response:
{ "data": { "rowFirst": 1907, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 3734 }, "description": { "defaultValue": "defaultValue", "column": 9388 }, "stockPlace": { "defaultValue": "defaultValue", "column": 6200 }, "isActive": { "defaultValue": "defaultValue", "column": 3476 }, "type": { "defaultValue": "defaultValue", "column": 2900 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 6688 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 2267 }, "manufacturer": { "defaultValue": "defaultValue", "column": 8198 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 4323 }, "rate": { "defaultValue": "defaultValue", "column": 3474 }, "orderLevel": { "defaultValue": "defaultValue", "column": 4613 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 7055 }, "supplier": { "defaultValue": "defaultValue", "column": 8422 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 8145 }, "vatAccount": { "defaultValue": "defaultValue", "column": 8926 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 5426 }, "barcode": { "defaultValue": "defaultValue", "column": 390 }, "height": { "defaultValue": "defaultValue", "column": 6423 }, "isBundled": { "defaultValue": "defaultValue", "column": 3978 }, "buyPrice": { "defaultValue": "defaultValue", "column": 6236 }, "amount": { "defaultValue": "defaultValue", "column": 8179 }, "articleName": 3889, "rowTitle": 1044, "articleId": 2950, "vat": { "defaultValue": "defaultValue", "column": 5859 }, "weight": { "defaultValue": "defaultValue", "column": 4746 }, "tags": { "defaultValue": "defaultValue", "column": 7593 }, "unit": { "defaultValue": "defaultValue", "column": 1389 }, "depth": { "defaultValue": "defaultValue", "column": 4443 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 7032 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 4831 }, "category": { "defaultValue": "defaultValue", "column": 6775 }, "isStock": { "defaultValue": "defaultValue", "column": 5177 }, "stockWarning": { "defaultValue": "defaultValue", "column": 5316 } }, "name": "name", "storegroupId": 7556, "id": 3403, "type": "type" }
Add customer import template
POSTUrl: /import/template
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a customer import template
Body:
{ "data": { "rowFirst": 9803, "zipCode": { "defaultValue": "defaultValue", "column": 6573 }, "country": { "defaultValue": "defaultValue", "column": 1653 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 4753 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 1111 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 9493 }, "city": { "defaultValue": "defaultValue", "column": 7420 }, "language": { "defaultValue": "defaultValue", "column": 4826 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 5521 }, "type": { "defaultValue": "defaultValue", "column": 2710 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 3951 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 6780 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 9723 }, "ourReference": { "defaultValue": "defaultValue", "column": 6106 }, "emailOffer": { "defaultValue": "defaultValue", "column": 1182 }, "showVat": { "defaultValue": "defaultValue", "column": 2504 }, "addressTwo": { "defaultValue": "defaultValue", "column": 8758 }, "www": { "defaultValue": "defaultValue", "column": 6664 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 8590 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 988 }, "customerId": 846, "emailInvoice": { "defaultValue": "defaultValue", "column": 2404 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 7978 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 312 }, "currency": { "defaultValue": "defaultValue", "column": 8540 }, "orgNumber": { "defaultValue": "defaultValue", "column": 820 }, "email": { "defaultValue": "defaultValue", "column": 7126 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 3432 }, "yourReference": { "defaultValue": "defaultValue", "column": 6668 }, "rowTitle": 9883, "emailOrder": { "defaultValue": "defaultValue", "column": 4307 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 3634 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 153 }, "vat": { "defaultValue": "defaultValue", "column": 1649 }, "externalId": { "defaultValue": "defaultValue", "column": 2560 }, "priceListId": { "defaultValue": "defaultValue", "column": 6591 }, "phoneOne": { "defaultValue": "defaultValue", "column": 6809 }, "customerName": 8404, "tags": { "defaultValue": "defaultValue", "column": 5894 }, "visitingCity": { "defaultValue": "defaultValue", "column": 8910 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 8740 }, "comment": { "defaultValue": "defaultValue", "column": 9928 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 7345 }, "addressOne": { "defaultValue": "defaultValue", "column": 3734 }, "deliveryName": { "defaultValue": "defaultValue", "column": 762 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 7498 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 6175 } }, "name": "name", "storegroupId": 1884, "type": "type" }
Successfull response:
{ "data": { "rowFirst": 2905, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 8875 }, "description": { "defaultValue": "defaultValue", "column": 989 }, "stockPlace": { "defaultValue": "defaultValue", "column": 2990 }, "isActive": { "defaultValue": "defaultValue", "column": 5029 }, "type": { "defaultValue": "defaultValue", "column": 657 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 2244 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 6624 }, "manufacturer": { "defaultValue": "defaultValue", "column": 9734 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 6578 }, "rate": { "defaultValue": "defaultValue", "column": 2161 }, "orderLevel": { "defaultValue": "defaultValue", "column": 951 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 3572 }, "supplier": { "defaultValue": "defaultValue", "column": 2144 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 4389 }, "vatAccount": { "defaultValue": "defaultValue", "column": 4132 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 6259 }, "barcode": { "defaultValue": "defaultValue", "column": 3376 }, "height": { "defaultValue": "defaultValue", "column": 802 }, "isBundled": { "defaultValue": "defaultValue", "column": 2004 }, "buyPrice": { "defaultValue": "defaultValue", "column": 1369 }, "amount": { "defaultValue": "defaultValue", "column": 508 }, "articleName": 6823, "rowTitle": 3049, "articleId": 9491, "vat": { "defaultValue": "defaultValue", "column": 4454 }, "weight": { "defaultValue": "defaultValue", "column": 5447 }, "tags": { "defaultValue": "defaultValue", "column": 6020 }, "unit": { "defaultValue": "defaultValue", "column": 277 }, "depth": { "defaultValue": "defaultValue", "column": 170 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 2530 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 4768 }, "category": { "defaultValue": "defaultValue", "column": 5551 }, "isStock": { "defaultValue": "defaultValue", "column": 5617 }, "stockWarning": { "defaultValue": "defaultValue", "column": 5204 } }, "name": "name", "storegroupId": 38, "id": 272, "type": "type" }
Update customer import template
PUTUrl: /import/template/{id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Update a customer import template
Body:
{ "data": { "rowFirst": 1316, "zipCode": { "defaultValue": "defaultValue", "column": 2466 }, "country": { "defaultValue": "defaultValue", "column": 4649 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 9922 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 2312 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 6983 }, "city": { "defaultValue": "defaultValue", "column": 1359 }, "language": { "defaultValue": "defaultValue", "column": 7385 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 5683 }, "type": { "defaultValue": "defaultValue", "column": 916 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 4041 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 2429 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 5622 }, "ourReference": { "defaultValue": "defaultValue", "column": 532 }, "emailOffer": { "defaultValue": "defaultValue", "column": 5938 }, "showVat": { "defaultValue": "defaultValue", "column": 4664 }, "addressTwo": { "defaultValue": "defaultValue", "column": 3699 }, "www": { "defaultValue": "defaultValue", "column": 9547 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 3939 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 8162 }, "customerId": 779, "emailInvoice": { "defaultValue": "defaultValue", "column": 5809 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 3565 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 3998 }, "currency": { "defaultValue": "defaultValue", "column": 3284 }, "orgNumber": { "defaultValue": "defaultValue", "column": 4023 }, "email": { "defaultValue": "defaultValue", "column": 3114 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 600 }, "yourReference": { "defaultValue": "defaultValue", "column": 7260 }, "rowTitle": 8698, "emailOrder": { "defaultValue": "defaultValue", "column": 1364 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 6705 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 7493 }, "vat": { "defaultValue": "defaultValue", "column": 8082 }, "externalId": { "defaultValue": "defaultValue", "column": 2214 }, "priceListId": { "defaultValue": "defaultValue", "column": 2008 }, "phoneOne": { "defaultValue": "defaultValue", "column": 4433 }, "customerName": 9818, "tags": { "defaultValue": "defaultValue", "column": 6859 }, "visitingCity": { "defaultValue": "defaultValue", "column": 4899 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 7649 }, "comment": { "defaultValue": "defaultValue", "column": 6749 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 6016 }, "addressOne": { "defaultValue": "defaultValue", "column": 3495 }, "deliveryName": { "defaultValue": "defaultValue", "column": 1409 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 1317 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 781 } }, "name": "name", "storegroupId": 2468, "id": 3404, "type": "type" }
Successfull response:
Delete import template
DELETEUrl: import/template/{id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Delete a customer import template
Body:
Successfull response:
Classes:
ArticleImportTemplate
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R | |||||
storegroupId | long | R,W | |||||
name | String | R,W | |||||
type | String | R,W | |||||
data | ImportTemplate | R,W |
ArticleTag
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | Write only with POST | Post | R,W | |||
externalId | String | R,W | |||||
name | String | Post | R,W | ||||
desc | String | Post | R,W |
Customer
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
customerId | Long | Internal id created by Lagerkoll | R | ||||
externalCustomerId | String | Already existing customer id | R,W | ||||
externalId | String | This id belongs to any external system; Fortnox, Visma or other | R,W | ||||
name | String | Post | R,W | ||||
orgNumber | String | R,W | |||||
ourReference | String | R,W | |||||
phone1 | String | R,W | |||||
phone2 | String | R,W | |||||
address1 | String | R,W | |||||
address2 | String | R,W | |||||
zipCode | String | Post | R,W | ||||
city | String | Post | R,W | ||||
country | String | Post | must point to an existing country | R,W | |||
countryName | String | R | |||||
language | String | store´s language | sv, en | R,W | |||
comments | String | R,W | |||||
currency | String | Sek | if not null, must point to an existing currency | R,W | |||
deliveryAddress1 | String | R,W | |||||
deliveryAddress2 | String | R,W | |||||
deliveryCity | String | R,W | |||||
deliveryZipCode | String | R,W | |||||
deliveryCountry | String | if not null, must point to an existing country | R,W | ||||
deliveryCountryName | String | R | |||||
deliveryName | String | R,W | |||||
deliveryPhone1 | String | R,W | |||||
deliveryPhone2 | String | R,W | |||||
visitingAddress | String | R,W | |||||
visitingCity | String | R,W | |||||
visitingZipCode | String | R,W | |||||
visitingCountry | String | if not null, must point to an existing country | R,W | ||||
visitingCountryName | String | R | |||||
String | R,W | ||||||
emailInvoice | String | R,W | |||||
emailOffer | String | R,W | |||||
emailOrder | String | R,W | |||||
emailStatus | HashMap | R | |||||
invoiceDiscount | Float | 0 | R,W | ||||
invoiceRemark | String | R,W | |||||
priceIncludeVAT | Boolean | false | R,W | ||||
showVAT | Boolean | If VAT should be shown in customer order confirmation and preview | R,W | ||||
deliveryTerm | String | If not null, must point to an existing delivery term | R,W | ||||
paymentTerm | String | If null, the first payment term is set | If not null, must point to an existing payment term | R,W | |||
customerType | String | PRIVATE | PRIVATE, COMPANY, UNDEFINED | R,W | |||
vatNumber | String | R,W | |||||
webUrl | String | R,W | |||||
wayOfDelivery | String | If not null, must point to an existing way of delivery term | R,W | ||||
yourReference | String | R,W | |||||
pricelistId | Long | -1 | If not -1, must point to an existing pricelist | R,W | |||
pricelistName | String | R | |||||
tags | List | Make sure you provide tagId for existing tags, otherwise new ones will be created | R,W | ||||
discounts | List | R,W |
CustomerDiscount
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
articleTag | ArticleTag | Write only with POST | Post | R,W | |||
discount | double | Discount in percent | Post | 0 - 100 | R,W |
CustomerImportTemplate
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R | |||||
storegroupId | long | R,W | |||||
name | String | R,W | |||||
type | String | R,W | |||||
data | ImportTemplateCustomer | R,W |
CustomerImportTemplateResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
importTemplateCount | int | R | |||||
importTemplates | List | R |
CustomersResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
customersCount | int | R | |||||
since | long | R | |||||
customers | List | R |
CustomerTag
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | Long | Write only with POST | Post | R,W | |||
externalId | String | R,W | |||||
name | String | Post | R,W | ||||
desc | String | Post | R,W |
CustomerTagResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
projectsCount | int | R | |||||
tags | List | R |
ImportTemplate
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
rowTitle | Integer | R,W | |||||
rowFirst | Integer | R,W | |||||
articleName | Integer | R,W | |||||
articleId | Integer | R,W | |||||
description | ImportTemplateColumn | R,W | |||||
isActive | ImportTemplateColumn | R,W | |||||
isBundled | ImportTemplateColumn | R,W | |||||
category | ImportTemplateColumn | R,W | |||||
amount | ImportTemplateColumn | R,W | |||||
unit | ImportTemplateColumn | R,W | |||||
barcode | ImportTemplateColumn | R,W | |||||
barcodeType | ImportTemplateColumn | R,W | |||||
buyPrice | ImportTemplateColumn | R,W | |||||
buyPriceShipment | ImportTemplateColumn | R,W | |||||
buyPriceMisc | ImportTemplateColumn | R,W | |||||
rate | ImportTemplateColumn | R,W | |||||
buyPriceCurrency | ImportTemplateColumn | R,W | |||||
supplier | ImportTemplateColumn | R,W | |||||
supplierArticleId | ImportTemplateColumn | R,W | |||||
vat | ImportTemplateColumn | R,W | |||||
vatAccount | ImportTemplateColumn | R,W | |||||
isStock | ImportTemplateColumn | R,W | |||||
type | ImportTemplateColumn | R,W | |||||
stockPlace | ImportTemplateColumn | R,W | |||||
stockWarning | ImportTemplateColumn | R,W | |||||
criticalLevel | ImportTemplateColumn | R,W | |||||
orderLevel | ImportTemplateColumn | R,W | |||||
isWebshopArticle | ImportTemplateColumn | R,W | |||||
manufacturer | ImportTemplateColumn | R,W | |||||
manufacturerArticleId | ImportTemplateColumn | R,W | |||||
width | ImportTemplateColumn | R,W | |||||
height | ImportTemplateColumn | R,W | |||||
depth | ImportTemplateColumn | R,W | |||||
weight | ImportTemplateColumn | R,W | |||||
tags | ImportTemplateColumn | R,W | |||||
priceLists | HashMap | R,W | |||||
customFields | HashMap | R,W |
ImportTemplateColumn
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
column | Integer | R,W | |||||
defaultValue | String | R,W |
ImportTemplateCustomer
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
rowTitle | Integer | R,W | |||||
rowFirst | Integer | R,W | |||||
customerName | Integer | R,W | |||||
customerId | Integer | R,W | |||||
externalId | ImportTemplateColumn | R,W | |||||
externalCustomerId | ImportTemplateColumn | R,W | |||||
type | ImportTemplateColumn | R,W | |||||
orgNumber | ImportTemplateColumn | R,W | |||||
vat | ImportTemplateColumn | R,W | |||||
ourReference | ImportTemplateColumn | R,W | |||||
yourReference | ImportTemplateColumn | R,W | |||||
comment | ImportTemplateColumn | R,W | |||||
phoneOne | ImportTemplateColumn | R,W | |||||
phoneTwo | ImportTemplateColumn | R,W | |||||
addressOne | ImportTemplateColumn | R,W | |||||
addressTwo | ImportTemplateColumn | R,W | |||||
zipCode | ImportTemplateColumn | R,W | |||||
city | ImportTemplateColumn | R,W | |||||
country | ImportTemplateColumn | R,W | |||||
language | ImportTemplateColumn | R,W | |||||
currency | ImportTemplateColumn | R,W | |||||
deliveryAddressOne | ImportTemplateColumn | R,W | |||||
deliveryAddressTwo | ImportTemplateColumn | R,W | |||||
deliveryCity | ImportTemplateColumn | R,W | |||||
deliveryZipCode | ImportTemplateColumn | R,W | |||||
deliveryCountry | ImportTemplateColumn | R,W | |||||
deliveryName | ImportTemplateColumn | R,W | |||||
deliveryPhoneOne | ImportTemplateColumn | R,W | |||||
deliveryPhoneTwo | ImportTemplateColumn | R,W | |||||
visitingAddress | ImportTemplateColumn | R,W | |||||
visitingCity | ImportTemplateColumn | R,W | |||||
visitingZipCode | ImportTemplateColumn | R,W | |||||
visitingCountry | ImportTemplateColumn | R,W | |||||
ImportTemplateColumn | R,W | ||||||
emailInvoice | ImportTemplateColumn | R,W | |||||
emailOffer | ImportTemplateColumn | R,W | |||||
emailOrder | ImportTemplateColumn | R,W | |||||
invoiceDiscount | ImportTemplateColumn | R,W | |||||
invoiceRemark | ImportTemplateColumn | R,W | |||||
priceIncludeVat | ImportTemplateColumn | R,W | |||||
showVat | ImportTemplateColumn | R,W | |||||
deliveryTerm | ImportTemplateColumn | R,W | |||||
paymentTerm | ImportTemplateColumn | R,W | |||||
wayOfDelivery | ImportTemplateColumn | R,W | |||||
www | ImportTemplateColumn | R,W | |||||
priceListId | ImportTemplateColumn | R,W | |||||
tags | ImportTemplateColumn | R,W |
Path
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
path | String | Path of allowed api request | R,W | ||||
action | String | Method/action of the request | get, post, put, delete, * | R,W |
Role
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | Long | R | |||||
storeGroupId | Long | R | |||||
name | String | R,W | |||||
paths | List | List of paths role has access to | R,W | ||||
fields | HashMap | List of objects and fields that is filtered out when sending data to api and request data from api | R,W | ||||
portal | String | What part of Lagerkoll is the role used | ADMIN, SHOP | R,W | |||
users | int | Number of users connected to role | R |
User
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | Long | R | |||||
customer | boolean | flag to indicate if user has customer privileges | R | ||||
admin | boolean | flag to indicate if user has admin privileges | R | ||||
systemAdmin | boolean | flag to indicate if user has system admin privileges | R | ||||
name | String | R,W | |||||
String | R,W | ||||||
phone | String | R,W | |||||
notes | String | R,W | |||||
emailInvalid | boolean | If this flag is set to true, Lagerkoll has detected on multiple occassions that it cannot send emails to this address | R | ||||
role | Role | Role of the current user. Admins can update permissions on other users, but a user cannot update his own permissions | R,W | ||||
lastLoggedIn | Long | Timestamp when this user was last logged in | R | ||||
bankID | Boolean | If user has activated login with BankID | R |