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": 9935, "customersCount": 6009, "pageSize": 8433, "page": 5479, "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": 8089, "desc": "desc" }, "discount": 8682.7269783676 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 3999, "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": 6515, "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": 6568 }
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": 9102, "customersCount": 1727, "pageSize": 474, "page": 3308, "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": 3887, "desc": "desc" }, "discount": 4062.437725799983 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 5305, "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": 9599, "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": 6026 }
Get customer for user
GETUrl: /user
Headers:
Accept: application/json or application/xml
Get customer for currently logged in user
Body:
Successfull response:
{ "pages": 7566, "customersCount": 2320, "pageSize": 4448, "page": 4781, "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": 5812, "desc": "desc" }, "discount": 5273.115049326446 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 2993, "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": 8055, "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": 6263 }
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": 829, "pageSize": 9488, "page": 8197, "projectsCount": 1133, "tags": [{ "name": "name", "externalId": "externalId", "id": 7256, "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": 7710, "customersCount": 5362, "pageSize": 2526, "page": 3003, "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": 3687, "desc": "desc" }, "discount": 5567.750015236766 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 472, "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": 1810, "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": 5992 }
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": 1992, "desc": "desc" }
Successfull response:
{ "name": "name", "externalId": "externalId", "id": 4394, "desc": "desc" }
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": 5000, "desc": "desc" }, "discount": 5385.294186706332 }], "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": 2044, "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": 8556, "desc": "desc" }, "discount": 1222.5538476879683 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 5590, "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": 5355, "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" }
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": {}, "name": "name", "fields": {}, "portal": "portal" }, "phone": "phone", "name": "name", "email": "email" }
Successfull response:
{ "systemAdmin": false, "bankID": false, "notes": "notes", "role": { "storeGroupId": 1868, "paths": {}, "name": "name", "id": 9678, "fields": {}, "portal": "portal", "users": 96 }, "phone": "phone", "name": "name", "emailInvalid": false, "admin": true, "lastLoggedIn": 1304, "id": 6000, "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": 8849, "desc": "desc" }, "discount": 4572.712577597121 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 1675, "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": 8718, "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": 354, "desc": "desc" }, "discount": 942.1151991697296 }], "deliveryZipCode": "deliveryZipCode", "wayOfDelivery": "wayOfDelivery", "emailInvoice": "emailInvoice", "orgNumber": "orgNumber", "yourReference": "yourReference", "emailOrder": "emailOrder", "deliveryTerm": "deliveryTerm", "tags": [{ "name": "name", "externalId": "externalId", "id": 2824, "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": 1884, "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": 7896, "zipCode": { "defaultValue": "defaultValue", "column": 9237 }, "country": { "defaultValue": "defaultValue", "column": 4833 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 1029 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 9733 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 9286 }, "city": { "defaultValue": "defaultValue", "column": 1098 }, "language": { "defaultValue": "defaultValue", "column": 8266 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 5779 }, "type": { "defaultValue": "defaultValue", "column": 8820 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 1844 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 4167 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 7583 }, "ourReference": { "defaultValue": "defaultValue", "column": 9518 }, "emailOffer": { "defaultValue": "defaultValue", "column": 2488 }, "showVat": { "defaultValue": "defaultValue", "column": 2091 }, "addressTwo": { "defaultValue": "defaultValue", "column": 7177 }, "www": { "defaultValue": "defaultValue", "column": 8700 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 9075 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 3549 }, "customerId": 9098, "emailInvoice": { "defaultValue": "defaultValue", "column": 1908 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 8377 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 9588 }, "currency": { "defaultValue": "defaultValue", "column": 632 }, "orgNumber": { "defaultValue": "defaultValue", "column": 2131 }, "email": { "defaultValue": "defaultValue", "column": 5225 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 9814 }, "yourReference": { "defaultValue": "defaultValue", "column": 5248 }, "rowTitle": 1844, "emailOrder": { "defaultValue": "defaultValue", "column": 8194 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 3948 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 1985 }, "vat": { "defaultValue": "defaultValue", "column": 4378 }, "externalId": { "defaultValue": "defaultValue", "column": 6191 }, "priceListId": { "defaultValue": "defaultValue", "column": 9907 }, "phoneOne": { "defaultValue": "defaultValue", "column": 6746 }, "customerName": 8715, "tags": { "defaultValue": "defaultValue", "column": 2850 }, "visitingCity": { "defaultValue": "defaultValue", "column": 2323 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 6161 }, "comment": { "defaultValue": "defaultValue", "column": 6659 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 1197 }, "addressOne": { "defaultValue": "defaultValue", "column": 6961 }, "deliveryName": { "defaultValue": "defaultValue", "column": 2531 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 1690 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 1156 } }, "name": "name", "storegroupId": 7091, "id": 9902, "type": "type" }], "pages": 8533, "pageSize": 8620, "page": 8089, "importTemplateCount": 4615 }
Get customer import template
GETUrl: /import/template/{id}
Headers:
Accept: application/json or application/xml
Get customer import template
Body:
Successfull response:
{ "data": { "rowFirst": 4609, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 2577 }, "description": { "defaultValue": "defaultValue", "column": 8651 }, "stockPlace": { "defaultValue": "defaultValue", "column": 7116 }, "isActive": { "defaultValue": "defaultValue", "column": 3022 }, "type": { "defaultValue": "defaultValue", "column": 568 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 7186 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 2558 }, "manufacturer": { "defaultValue": "defaultValue", "column": 7725 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 5804 }, "rate": { "defaultValue": "defaultValue", "column": 6105 }, "orderLevel": { "defaultValue": "defaultValue", "column": 3380 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 5516 }, "supplier": { "defaultValue": "defaultValue", "column": 691 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 6509 }, "vatAccount": { "defaultValue": "defaultValue", "column": 7346 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 7242 }, "barcode": { "defaultValue": "defaultValue", "column": 3340 }, "height": { "defaultValue": "defaultValue", "column": 4928 }, "isBundled": { "defaultValue": "defaultValue", "column": 6248 }, "buyPrice": { "defaultValue": "defaultValue", "column": 3266 }, "amount": { "defaultValue": "defaultValue", "column": 2321 }, "articleName": 4808, "rowTitle": 5229, "articleId": 2344, "vat": { "defaultValue": "defaultValue", "column": 6246 }, "weight": { "defaultValue": "defaultValue", "column": 9610 }, "tags": { "defaultValue": "defaultValue", "column": 2086 }, "unit": { "defaultValue": "defaultValue", "column": 2051 }, "depth": { "defaultValue": "defaultValue", "column": 7675 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 9005 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 4281 }, "category": { "defaultValue": "defaultValue", "column": 4602 }, "isStock": { "defaultValue": "defaultValue", "column": 4508 }, "stockWarning": { "defaultValue": "defaultValue", "column": 3724 } }, "name": "name", "storegroupId": 4975, "id": 7428, "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": 7894, "zipCode": { "defaultValue": "defaultValue", "column": 5740 }, "country": { "defaultValue": "defaultValue", "column": 8751 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 1725 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 1888 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 4293 }, "city": { "defaultValue": "defaultValue", "column": 9110 }, "language": { "defaultValue": "defaultValue", "column": 4506 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 1252 }, "type": { "defaultValue": "defaultValue", "column": 3350 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 4464 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 1997 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 8534 }, "ourReference": { "defaultValue": "defaultValue", "column": 9733 }, "emailOffer": { "defaultValue": "defaultValue", "column": 6989 }, "showVat": { "defaultValue": "defaultValue", "column": 3525 }, "addressTwo": { "defaultValue": "defaultValue", "column": 8776 }, "www": { "defaultValue": "defaultValue", "column": 6786 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 1829 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 5452 }, "customerId": 2967, "emailInvoice": { "defaultValue": "defaultValue", "column": 6508 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 2250 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 1097 }, "currency": { "defaultValue": "defaultValue", "column": 1325 }, "orgNumber": { "defaultValue": "defaultValue", "column": 8591 }, "email": { "defaultValue": "defaultValue", "column": 9148 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 4562 }, "yourReference": { "defaultValue": "defaultValue", "column": 1528 }, "rowTitle": 3578, "emailOrder": { "defaultValue": "defaultValue", "column": 9321 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 3702 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 7593 }, "vat": { "defaultValue": "defaultValue", "column": 552 }, "externalId": { "defaultValue": "defaultValue", "column": 8255 }, "priceListId": { "defaultValue": "defaultValue", "column": 7440 }, "phoneOne": { "defaultValue": "defaultValue", "column": 3089 }, "customerName": 4082, "tags": { "defaultValue": "defaultValue", "column": 1186 }, "visitingCity": { "defaultValue": "defaultValue", "column": 4125 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 6547 }, "comment": { "defaultValue": "defaultValue", "column": 3305 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 1231 }, "addressOne": { "defaultValue": "defaultValue", "column": 2843 }, "deliveryName": { "defaultValue": "defaultValue", "column": 7868 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 6533 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 2826 } }, "name": "name", "storegroupId": 743, "type": "type" }
Successfull response:
{ "data": { "rowFirst": 3689, "customFields": {}, "barcodeType": { "defaultValue": "defaultValue", "column": 4677 }, "description": { "defaultValue": "defaultValue", "column": 9477 }, "stockPlace": { "defaultValue": "defaultValue", "column": 9735 }, "isActive": { "defaultValue": "defaultValue", "column": 1240 }, "type": { "defaultValue": "defaultValue", "column": 3081 }, "criticalLevel": { "defaultValue": "defaultValue", "column": 7728 }, "buyPriceCurrency": { "defaultValue": "defaultValue", "column": 6973 }, "manufacturer": { "defaultValue": "defaultValue", "column": 16 }, "buyPriceShipment": { "defaultValue": "defaultValue", "column": 8687 }, "rate": { "defaultValue": "defaultValue", "column": 2043 }, "orderLevel": { "defaultValue": "defaultValue", "column": 5468 }, "buyPriceMisc": { "defaultValue": "defaultValue", "column": 8339 }, "supplier": { "defaultValue": "defaultValue", "column": 5347 }, "supplierArticleId": { "defaultValue": "defaultValue", "column": 7495 }, "vatAccount": { "defaultValue": "defaultValue", "column": 8420 }, "isWebshopArticle": { "defaultValue": "defaultValue", "column": 1691 }, "barcode": { "defaultValue": "defaultValue", "column": 3752 }, "height": { "defaultValue": "defaultValue", "column": 1179 }, "isBundled": { "defaultValue": "defaultValue", "column": 7059 }, "buyPrice": { "defaultValue": "defaultValue", "column": 3882 }, "amount": { "defaultValue": "defaultValue", "column": 8491 }, "articleName": 5152, "rowTitle": 8638, "articleId": 8283, "vat": { "defaultValue": "defaultValue", "column": 582 }, "weight": { "defaultValue": "defaultValue", "column": 4447 }, "tags": { "defaultValue": "defaultValue", "column": 3247 }, "unit": { "defaultValue": "defaultValue", "column": 7461 }, "depth": { "defaultValue": "defaultValue", "column": 1020 }, "priceLists": {}, "width": { "defaultValue": "defaultValue", "column": 7654 }, "manufacturerArticleId": { "defaultValue": "defaultValue", "column": 8827 }, "category": { "defaultValue": "defaultValue", "column": 7828 }, "isStock": { "defaultValue": "defaultValue", "column": 4107 }, "stockWarning": { "defaultValue": "defaultValue", "column": 7320 } }, "name": "name", "storegroupId": 2031, "id": 9363, "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": 9375, "zipCode": { "defaultValue": "defaultValue", "column": 7640 }, "country": { "defaultValue": "defaultValue", "column": 5726 }, "externalCustomerId": { "defaultValue": "defaultValue", "column": 7676 }, "deliveryPhoneTwo": { "defaultValue": "defaultValue", "column": 5748 }, "invoiceDiscount": { "defaultValue": "defaultValue", "column": 9617 }, "city": { "defaultValue": "defaultValue", "column": 7474 }, "language": { "defaultValue": "defaultValue", "column": 2532 }, "visitingZipCode": { "defaultValue": "defaultValue", "column": 3684 }, "type": { "defaultValue": "defaultValue", "column": 3764 }, "phoneTwo": { "defaultValue": "defaultValue", "column": 7039 }, "deliveryAddressOne": { "defaultValue": "defaultValue", "column": 3385 }, "invoiceRemark": { "defaultValue": "defaultValue", "column": 7831 }, "ourReference": { "defaultValue": "defaultValue", "column": 2676 }, "emailOffer": { "defaultValue": "defaultValue", "column": 3417 }, "showVat": { "defaultValue": "defaultValue", "column": 2619 }, "addressTwo": { "defaultValue": "defaultValue", "column": 9442 }, "www": { "defaultValue": "defaultValue", "column": 4561 }, "deliveryZipCode": { "defaultValue": "defaultValue", "column": 2727 }, "wayOfDelivery": { "defaultValue": "defaultValue", "column": 8946 }, "customerId": 8570, "emailInvoice": { "defaultValue": "defaultValue", "column": 6759 }, "visitingAddress": { "defaultValue": "defaultValue", "column": 6262 }, "priceIncludeVat": { "defaultValue": "defaultValue", "column": 2461 }, "currency": { "defaultValue": "defaultValue", "column": 1877 }, "orgNumber": { "defaultValue": "defaultValue", "column": 2417 }, "email": { "defaultValue": "defaultValue", "column": 928 }, "deliveryCity": { "defaultValue": "defaultValue", "column": 2653 }, "yourReference": { "defaultValue": "defaultValue", "column": 1216 }, "rowTitle": 687, "emailOrder": { "defaultValue": "defaultValue", "column": 3145 }, "deliveryTerm": { "defaultValue": "defaultValue", "column": 799 }, "deliveryAddressTwo": { "defaultValue": "defaultValue", "column": 7717 }, "vat": { "defaultValue": "defaultValue", "column": 3106 }, "externalId": { "defaultValue": "defaultValue", "column": 481 }, "priceListId": { "defaultValue": "defaultValue", "column": 6125 }, "phoneOne": { "defaultValue": "defaultValue", "column": 945 }, "customerName": 8896, "tags": { "defaultValue": "defaultValue", "column": 8984 }, "visitingCity": { "defaultValue": "defaultValue", "column": 709 }, "deliveryCountry": { "defaultValue": "defaultValue", "column": 2762 }, "comment": { "defaultValue": "defaultValue", "column": 8391 }, "visitingCountry": { "defaultValue": "defaultValue", "column": 3824 }, "addressOne": { "defaultValue": "defaultValue", "column": 2473 }, "deliveryName": { "defaultValue": "defaultValue", "column": 8402 }, "deliveryPhoneOne": { "defaultValue": "defaultValue", "column": 295 }, "paymentTerm": { "defaultValue": "defaultValue", "column": 7825 } }, "name": "name", "storegroupId": 3253, "id": 4608, "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 |
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 |