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
GETUrl: /{customer_id}
Headers:
Accept: application/json or application/xml
Get a single customer based on customer id
Body:
Successfull response:
{ "pages": 738, "customersCount": 5729, "pageSize": 8771, "page": 5504, "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": 5175, "desc": "desc" }, "discount": 5721.934256658345 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 7705, "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": 701, "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": 8090 }
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": 2038, "customersCount": 8201, "pageSize": 8111, "page": 5863, "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": 175, "desc": "desc" }, "discount": 5273.632362457491 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 2739, "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": 1377, "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": 5353 }
Get customer for user
GETUrl: /user
Headers:
Accept: application/json or application/xml
Get customer for currently logged in user
Body:
Successfull response:
{ "pages": 4821, "customersCount": 9970, "pageSize": 5713, "page": 1778, "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": 1889, "desc": "desc" }, "discount": 5575.34259698927 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 5149, "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": 9458, "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": 9623 }
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": 9852, "pageSize": 9340, "page": 8419, "projectsCount": 6100, "tags": [{ "name": "name", "externalId": "externalId", "id": 7298, "desc": "desc" }] }
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": 7443, "customersCount": 5359, "pageSize": 8153, "page": 7828, "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": 8038, "desc": "desc" }, "discount": 364.0538243447966 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 3027, "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": 1227, "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": 5955 }
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": true, "discounts": [{ "articleTag": { "name": "name", "externalId": "externalId", "id": 293, "desc": "desc" }, "discount": 7683.069951857548 }], "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": 1143, "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": 6530, "desc": "desc" }, "discount": 4741.620621166824 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 4147, "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": 1346, "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": 6753, "desc": "desc" }
Successfull response:
{ "name": "name", "externalId": "externalId", "id": 6568, "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": { "loginServices": [{}], "paths": {}, "name": "name", "fields": {}, "portal": "portal" }, "phone": "phone", "name": "name", "email": "email" }
Successfull response:
{ "systemAdmin": true, "bankID": false, "notes": "notes", "role": { "loginServices": [{}], "storeGroupId": 5353, "paths": {}, "name": "name", "id": 8654, "fields": {}, "portal": "portal", "users": 4051 }, "phone": "phone", "name": "name", "emailInvalid": false, "admin": true, "lastLoggedIn": 9219, "id": 2401, "email": "email", "customer": true }
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": 8634, "desc": "desc" }, "discount": 9377.940380495598 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 8524, "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": 5998, "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": 1363, "desc": "desc" }, "discount": 6834.840323244999 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 289, "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": 6383, "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": 6842, "zipCode": { "defaultValue": "defaultValue", "column": 9438 }, "country": { "defaultValue": "defaultValue", "column": 9368 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 7134 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 5058 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 5046 }, "city": { "defaultValue": "defaultValue", "column": 8994 }, "language": { "defaultValue": "defaultValue", "column": 6407 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 2219 }, "type": { "defaultValue": "defaultValue", "column": 9217 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 3680 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 9051 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 5947 }, "ourReference": { "defaultValue": "defaultValue", "column": 4766 }, "emailOffer": { "defaultValue": "defaultValue", "column": 8988 }, "showVat": { "defaultValue": "defaultValue", "column": 4586 }, "addressTwo": { "defaultValue": "defaultValue", "column": 6075 }, "www": { "defaultValue": "defaultValue", "column": 2153 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 6929 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 9490 }, "customerId": 5489, "emailInvoice": { "defaultValue": "defaultValue", "column": 8455 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 4729 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 6678 }, "currency": { "defaultValue": "defaultValue", "column": 813 }, "orgNumber": { "defaultValue": "defaultValue", "column": 7139 }, "email": { "defaultValue": "defaultValue", "column": 5878 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 9524 }, "yourReference": { "defaultValue": "defaultValue", "column": 7563 }, "rowTitle": 4044, "emailOrder": { "defaultValue": "defaultValue", "column": 9279 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 4301 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 5828 }, "vat": { "defaultValue": "defaultValue", "column": 3859 }, "externalId": { "defaultValue": "defaultValue", "column": 6472 }, "priceListId": { "defaultValue": "defaultValue", "column": 9077 }, "phoneOne": { "defaultValue": "defaultValue", "column": 1816 }, "customerName": 8756, "tags": { "defaultValue": "defaultValue", "column": 996 }, "visitingCity": { "defaultValue": "defaultValue", "column": 8754 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 5584 }, "comment": { "defaultValue": "defaultValue", "column": 2320 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 9730 }, "addressOne": { "defaultValue": "defaultValue", "column": 8277 }, "deliveryName": { "defaultValue": "defaultValue", "column": 3433 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 3973 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 6307 } }, "name": "name", "storegroupId": 749, "id": 5612, "type": "type" }], "pages": 2780, "pageSize": 481, "page": 2476, "importTemplateCount": 3470 }
Get customer import template
GETUrl: /import/template/{id}
Headers:
Accept: application/json or application/xml
Get customer import template
Body:
Successfull response:
{ "data": { "rowFirst": 2352, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 3421 }, "description": { "defaultValue": "defaultValue", "column": 2761 }, "stockPlace": { "defaultValue": "defaultValue", "column": 7539 }, "isActive": { "defaultValue": "defaultValue", "column": 4119 }, "type": { "defaultValue": "defaultValue", "column": 852 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 3846 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 9136 }, "manufacturer": { "defaultValue": "defaultValue", "column": 1981 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 573 }, "rate": { "defaultValue": "defaultValue", "column": 593 }, "orderLevel": { "defaultValue": "defaultValue", "column": 1770 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 9424 }, "supplier": { "defaultValue": "defaultValue", "column": 6107 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 9013 }, "vatAccount": { "defaultValue": "defaultValue", "column": 9455 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 970 }, "barcode": { "defaultValue": "defaultValue", "column": 1951 }, "height": { "defaultValue": "defaultValue", "column": 8877 }, "isBundled": { "defaultValue": "defaultValue", "column": 5938 }, "buyPrice": { "defaultValue": "defaultValue", "column": 9440 }, "amount": { "defaultValue": "defaultValue", "column": 4539 }, "articleName": 626, "rowTitle": 759, "articleId": 1211, "vat": { "defaultValue": "defaultValue", "column": 5559 }, "weight": { "defaultValue": "defaultValue", "column": 7098 }, "tags": { "defaultValue": "defaultValue", "column": 4884 }, "unit": { "defaultValue": "defaultValue", "column": 8302 }, "depth": { "defaultValue": "defaultValue", "column": 9049 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 7895 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 5788 }, "category": { "defaultValue": "defaultValue", "column": 632 }, "isStock": { "defaultValue": "defaultValue", "column": 5265 }, "stockWarning": { "defaultValue": "defaultValue", "column": 9920 } }, "name": "name", "storegroupId": 1901, "id": 9600, "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": 8621, "zipCode": { "defaultValue": "defaultValue", "column": 6232 }, "country": { "defaultValue": "defaultValue", "column": 809 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 1763 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 6447 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 4128 }, "city": { "defaultValue": "defaultValue", "column": 1110 }, "language": { "defaultValue": "defaultValue", "column": 661 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 2864 }, "type": { "defaultValue": "defaultValue", "column": 7416 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 6826 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 8017 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 7823 }, "ourReference": { "defaultValue": "defaultValue", "column": 5702 }, "emailOffer": { "defaultValue": "defaultValue", "column": 5566 }, "showVat": { "defaultValue": "defaultValue", "column": 2910 }, "addressTwo": { "defaultValue": "defaultValue", "column": 9735 }, "www": { "defaultValue": "defaultValue", "column": 7966 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 2102 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 5724 }, "customerId": 354, "emailInvoice": { "defaultValue": "defaultValue", "column": 5564 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 5869 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 7059 }, "currency": { "defaultValue": "defaultValue", "column": 7626 }, "orgNumber": { "defaultValue": "defaultValue", "column": 8403 }, "email": { "defaultValue": "defaultValue", "column": 5110 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 1812 }, "yourReference": { "defaultValue": "defaultValue", "column": 6409 }, "rowTitle": 4751, "emailOrder": { "defaultValue": "defaultValue", "column": 7095 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 6272 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 5875 }, "vat": { "defaultValue": "defaultValue", "column": 9853 }, "externalId": { "defaultValue": "defaultValue", "column": 4553 }, "priceListId": { "defaultValue": "defaultValue", "column": 7003 }, "phoneOne": { "defaultValue": "defaultValue", "column": 2995 }, "customerName": 2752, "tags": { "defaultValue": "defaultValue", "column": 244 }, "visitingCity": { "defaultValue": "defaultValue", "column": 9247 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 86 }, "comment": { "defaultValue": "defaultValue", "column": 6567 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 2889 }, "addressOne": { "defaultValue": "defaultValue", "column": 1981 }, "deliveryName": { "defaultValue": "defaultValue", "column": 2717 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 1058 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 8073 } }, "name": "name", "storegroupId": 1813, "type": "type" }
Successfull response:
{ "data": { "rowFirst": 936, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 5924 }, "description": { "defaultValue": "defaultValue", "column": 6241 }, "stockPlace": { "defaultValue": "defaultValue", "column": 575 }, "isActive": { "defaultValue": "defaultValue", "column": 2541 }, "type": { "defaultValue": "defaultValue", "column": 3094 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 3149 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 2007 }, "manufacturer": { "defaultValue": "defaultValue", "column": 3465 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 4800 }, "rate": { "defaultValue": "defaultValue", "column": 372 }, "orderLevel": { "defaultValue": "defaultValue", "column": 2017 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 5414 }, "supplier": { "defaultValue": "defaultValue", "column": 9702 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 4451 }, "vatAccount": { "defaultValue": "defaultValue", "column": 9869 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 6825 }, "barcode": { "defaultValue": "defaultValue", "column": 832 }, "height": { "defaultValue": "defaultValue", "column": 7166 }, "isBundled": { "defaultValue": "defaultValue", "column": 8350 }, "buyPrice": { "defaultValue": "defaultValue", "column": 1477 }, "amount": { "defaultValue": "defaultValue", "column": 7931 }, "articleName": 6733, "rowTitle": 5649, "articleId": 7480, "vat": { "defaultValue": "defaultValue", "column": 6758 }, "weight": { "defaultValue": "defaultValue", "column": 7463 }, "tags": { "defaultValue": "defaultValue", "column": 1745 }, "unit": { "defaultValue": "defaultValue", "column": 5352 }, "depth": { "defaultValue": "defaultValue", "column": 8736 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 5490 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 7879 }, "category": { "defaultValue": "defaultValue", "column": 6198 }, "isStock": { "defaultValue": "defaultValue", "column": 7543 }, "stockWarning": { "defaultValue": "defaultValue", "column": 754 } }, "name": "name", "storegroupId": 1418, "id": 824, "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": 8056, "zipCode": { "defaultValue": "defaultValue", "column": 535 }, "country": { "defaultValue": "defaultValue", "column": 2654 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 1278 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 9569 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 7658 }, "city": { "defaultValue": "defaultValue", "column": 1795 }, "language": { "defaultValue": "defaultValue", "column": 5296 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 3607 }, "type": { "defaultValue": "defaultValue", "column": 223 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 3521 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 5524 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 3742 }, "ourReference": { "defaultValue": "defaultValue", "column": 5633 }, "emailOffer": { "defaultValue": "defaultValue", "column": 6488 }, "showVat": { "defaultValue": "defaultValue", "column": 3645 }, "addressTwo": { "defaultValue": "defaultValue", "column": 8647 }, "www": { "defaultValue": "defaultValue", "column": 3531 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 8981 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 712 }, "customerId": 58, "emailInvoice": { "defaultValue": "defaultValue", "column": 506 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 5760 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 2064 }, "currency": { "defaultValue": "defaultValue", "column": 9682 }, "orgNumber": { "defaultValue": "defaultValue", "column": 7675 }, "email": { "defaultValue": "defaultValue", "column": 8391 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 5121 }, "yourReference": { "defaultValue": "defaultValue", "column": 2926 }, "rowTitle": 7943, "emailOrder": { "defaultValue": "defaultValue", "column": 4744 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 1610 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 5251 }, "vat": { "defaultValue": "defaultValue", "column": 685 }, "externalId": { "defaultValue": "defaultValue", "column": 849 }, "priceListId": { "defaultValue": "defaultValue", "column": 9737 }, "phoneOne": { "defaultValue": "defaultValue", "column": 76 }, "customerName": 9644, "tags": { "defaultValue": "defaultValue", "column": 3992 }, "visitingCity": { "defaultValue": "defaultValue", "column": 9216 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 3607 }, "comment": { "defaultValue": "defaultValue", "column": 1091 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 7611 }, "addressOne": { "defaultValue": "defaultValue", "column": 6268 }, "deliveryName": { "defaultValue": "defaultValue", "column": 196 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 9878 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 8498 } }, "name": "name", "storegroupId": 5298, "id": 7360, "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 |
Role
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | Long | R | |||||
storeGroupId | Long | R | |||||
name | String | R,W | |||||
paths | ArrayList | 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 | ||||
loginServices | List | List of login services role has access to | R,W |
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 |