Projects API
General:
Basics:
Base-URL: https://capi.lagerkoll.com/v1/projects/
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 |
906001 | Error when getting project |
906002 | Error when getting customer |
906003 | Error when getting user |
906004 | Error when getting article |
906005 | Error when getting invoice draft |
906011 | Error when creating a project |
906012 | Error when creating a project article |
906013 | Error when creating invoice draft from articles |
906014 | Error when creating invoice from invoice drafts |
906021 | Error when updating a project |
906022 | Error when updating a project article |
906023 | Error when updating an invoice draft |
906031 | To large amount for the artcile |
906032 | Project still has articles with amount in them |
{ "errorCode" : 900101, "errorMessage" : "Something went wrong on the server", "errorField" : null, "errorData" : null }
Projects API:
Export
Create export
POSTUrl: /export
Headers:
Accept: application/json or application/xml
Create export file for articles in open projects
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
save_document | If true, the document will be saved in the feature extension. If false, a mail will be sent to all admins of the store | false |
Body:
Successfull response:
Projects
Get invoice drafts
GETUrl: /{project_id}/articles/invoice
Headers:
Accept: application/json or application/xml
Get a list of invoice drafts for a project
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
state | 0-invoice drafts that are not invoiced or in processed, 1-invoice drafts that are in process but not yet invoiced 2-invoice drafts which are invoiced and processed | 0 | 0, 1, 2 |
page | 0 | ||
limit | 50 | ||
sort_column | created | article_id, article_name, user, created | |
sort_order | desc | asc,desc |
Body:
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 4943.972900809466, "articleName": "articleName", "pricelistId": 522, "endDate": 1746805964665, "rentalAmount": 3441.0212546624166, "created": 1746805964665, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 3732, "price": 2688.7268737359227, "isProcessed": true, "dataArticleId": 7658, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 7741, "startDate": 1746805964665, "createdById": 7586 }], "pages": 8759, "pageSize": 1831, "draftsCount": 6855, "page": 9452 }
Get project for id
GETUrl: /{project_id}
Headers:
Accept: application/json or application/xml
Get project based on id
Body:
Successfull response:
{ "createdByName": "createdByName", "cost": 4036.259047846892, "created": 7194, "description": "description", "customerName": "customerName", "stockValue": 8581.597530594408, "name": "name", "customerId": 1153, "state": "0", "projectId": 3417, "responsibleUserId": 5141, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7771.777692147192, "batchSnBestBefore": 3704, "accountName": "accountName", "articleId": "articleId", "priceListId": 7155, "purchasePrice": 3423.9189843619456, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9147, "checkoutDate": 2985, "price": 1286.2771478549994, "comment": "comment", "id": 2873, "projectId": 3243, "checkoutAmount": 5163.163645239085, "events": [{ "date": 1746805964665, "amount": 7819.659993075748, "type": "type" }], "checkinConsumeDate": 1746805964665, "checkinAmount": 4562.731195134737, "consumedAmount": 9626.53985198481 }], "createdById": 7703, "responsibleUserName": "responsibleUserName" }
Get projects
GETUrl:
Headers:
Accept: application/json or application/xml
Get a list of projects
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
state | -1 | 0,1 | |
from | 0 | ||
to | 0 | ||
page | 0 | ||
limit | 50 | ||
query | |||
cost | false | ||
sort_column | start_date | start_date,end_date | |
order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 5911, "projects": [{ "createdByName": "createdByName", "cost": 4384.190075997972, "created": 8432, "description": "description", "customerName": "customerName", "stockValue": 8628.629341207421, "name": "name", "customerId": 6161, "state": "0", "projectId": 6387, "responsibleUserId": 6998, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5437.273399240743, "batchSnBestBefore": 2429, "accountName": "accountName", "articleId": "articleId", "priceListId": 6457, "purchasePrice": 8159.914782646056, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5897, "checkoutDate": 4478, "price": 3868.3015171609004, "comment": "comment", "id": 5661, "projectId": 1093, "checkoutAmount": 5184.410358942725, "events": [{ "date": 1746805964666, "amount": 5412.029649410084, "type": "type" }], "checkinConsumeDate": 1746805964666, "checkinAmount": 8126.913345070837, "consumedAmount": 7359.999858199742 }], "createdById": 2869, "responsibleUserName": "responsibleUserName" }], "pageSize": 6875, "page": 5555, "projectsCount": 5316 }
Get changed projects
GETUrl: /events
Headers:
Accept: application/json or application/xml
Get a list of open projects where articles have been checked out, checked in, consumed or invoiced between a start date and end date
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
start_date | Start date of when events can occur. Format is yyyy-MM-dd and defaults to previous month | ||
end_date | End date of when events can occur. Format is yyyy-MM-dd and defaults to end of start date's month | ||
page | 0 | ||
limit | 50 | ||
sort_column | created | name, customer, created_by, created | |
order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 8376, "projects": [{ "createdByName": "createdByName", "cost": 874.0356835767316, "created": 1953, "description": "description", "customerName": "customerName", "stockValue": 6419.371357411052, "name": "name", "customerId": 6551, "state": "0", "projectId": 5360, "responsibleUserId": 284, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6077.688511331394, "batchSnBestBefore": 9126, "accountName": "accountName", "articleId": "articleId", "priceListId": 7910, "purchasePrice": 927.6671971215134, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8646, "checkoutDate": 9630, "price": 4883.791319632589, "comment": "comment", "id": 6122, "projectId": 9026, "checkoutAmount": 134.14123210352403, "events": [{ "date": 1746805964666, "amount": 8198.909155753357, "type": "type" }], "checkinConsumeDate": 1746805964666, "checkinAmount": 1332.1284160229386, "consumedAmount": 9966.95865492743 }], "createdById": 6549, "responsibleUserName": "responsibleUserName" }], "pageSize": 9764, "page": 7702, "projectsCount": 774 }
Get project articles
GETUrl: /{project_id}/articles
Headers:
Accept: application/json or application/xml
Get a list of project articles
Valid parameters:
Parameter | Description | Default value | Allowed values |
---|---|---|---|
query | |||
state | 0-all articles, 1-only checked out articles with available value, 2-checked out and rental articles with available value | 0 | 0,1,2 |
page | 0 | ||
limit | 50 | ||
sort_column | checkout_date | article_id, article_name, user, checkout_date | |
sort_order | desc | asc,desc |
Body:
Successfull response:
{ "pages": 5927, "pageSize": 1808, "page": 9624, "projectsCount": 8027, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6638.73015886665, "batchSnBestBefore": 3093, "accountName": "accountName", "articleId": "articleId", "priceListId": 932, "purchasePrice": 3741.022461441448, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3359, "checkoutDate": 7954, "price": 5271.956107661433, "comment": "comment", "id": 1489, "projectId": 8621, "checkoutAmount": 3484.2210866715404, "events": [{ "date": 1746805964667, "amount": 7340.237502932601, "type": "type" }], "checkinConsumeDate": 1746805964667, "checkinAmount": 9509.931816221691, "consumedAmount": 5067.822904950356 }] }
Get cost for project
GETUrl: /{project_id}/cost
Headers:
Accept: application/json or application/xml
Get total cost for a project
Body:
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 5186.4166619421, "articleName": "articleName", "pricelistId": 5831, "endDate": 1746805964667, "rentalAmount": 485.33681117801984, "created": 1746805964667, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 9631, "price": 7342.268944115815, "isProcessed": false, "dataArticleId": 3733, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8912, "startDate": 1746805964667, "createdById": 2488 }], "pages": 9534, "pageSize": 7920, "draftsCount": 204, "page": 5169 }
Add project
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 project
Body:
{ "createdByName": "createdByName", "cost": 3282.504859225651, "created": 5673, "description": "description", "customerName": "customerName", "stockValue": 4501.654194232821, "name": "name", "customerId": 4815, "state": "0", "responsibleUserId": 3719, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5595.001885531742, "batchSnBestBefore": 1666, "accountName": "accountName", "articleId": "articleId", "priceListId": 5595, "purchasePrice": 5960.3214834601795, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1495, "checkoutDate": 8342, "price": 5362.886678701606, "comment": "comment", "id": 7272, "projectId": 9420, "checkoutAmount": 5642.690671931047, "events": [{ "date": 1746805964667, "amount": 6889.872296303791, "type": "type" }], "checkinConsumeDate": 1746805964667, "checkinAmount": 63.237716927807554, "consumedAmount": 6732.460618655592 }], "createdById": 3590, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 3056.4172734967797, "created": 7509, "description": "description", "customerName": "customerName", "stockValue": 3301.44945355169, "name": "name", "customerId": 8840, "state": "0", "projectId": 9483, "responsibleUserId": 9085, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3276.574239088522, "batchSnBestBefore": 1827, "accountName": "accountName", "articleId": "articleId", "priceListId": 8658, "purchasePrice": 6257.370040933686, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1844, "checkoutDate": 8362, "price": 5163.299368944755, "comment": "comment", "id": 9158, "projectId": 5608, "checkoutAmount": 9367.068422117158, "events": [{ "date": 1746805964667, "amount": 6923.777198790516, "type": "type" }], "checkinConsumeDate": 1746805964667, "checkinAmount": 7596.165403593405, "consumedAmount": 6322.413510307312 }], "createdById": 2907, "responsibleUserName": "responsibleUserName" }
Add project
POSTUrl: /customer_order/{customer_order_id}
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new project
Body:
{"projectId": 2727}
Successfull response:
{ "createdByName": "createdByName", "cost": 2898.0588882638026, "created": 2197, "description": "description", "customerName": "customerName", "stockValue": 5323.749327762273, "name": "name", "customerId": 1622, "state": "0", "projectId": 9146, "responsibleUserId": 3641, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7577.600566627786, "batchSnBestBefore": 7763, "accountName": "accountName", "articleId": "articleId", "priceListId": 4361, "purchasePrice": 4112.761451136149, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 7041, "checkoutDate": 3209, "price": 6269.2931855802535, "comment": "comment", "id": 1769, "projectId": 7523, "checkoutAmount": 1734.3336793076803, "events": [{ "date": 1746805964667, "amount": 5396.6924193178165, "type": "type" }], "checkinConsumeDate": 1746805964667, "checkinAmount": 9058.557231098688, "consumedAmount": 7528.303899507542 }], "createdById": 4457, "responsibleUserName": "responsibleUserName" }
Add project article
POSTUrl: /{id}/article
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Add a new article to a project
Body:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5331.914575240528, "batchSnBestBefore": 522, "accountName": "accountName", "articleId": "articleId", "priceListId": 6318, "purchasePrice": 2661.2591128810705, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5866, "checkoutDate": 6588, "price": 4321.62940616083, "comment": "comment", "id": 450, "projectId": 5072, "checkoutAmount": 1188.5240469683877, "events": [{ "date": 1746805964668, "amount": 563.2479303667226, "type": "type" }], "checkinConsumeDate": 1746805964668, "checkinAmount": 3393.3700436834247, "consumedAmount": 783.181757483471 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 399.26489083141894, "batchSnBestBefore": 8480, "accountName": "accountName", "articleId": "articleId", "priceListId": 1564, "purchasePrice": 772.8760731479167, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2317, "checkoutDate": 2188, "price": 8014.419922717027, "comment": "comment", "id": 2295, "projectId": 2400, "checkoutAmount": 457.92432664697344, "events": [{ "date": 1746805964668, "amount": 1029.5471982289905, "type": "type" }], "checkinConsumeDate": 1746805964668, "checkinAmount": 1831.5527518308006, "consumedAmount": 3743.419912704007 }
Update project
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 project
Body:
{ "createdByName": "createdByName", "cost": 2914.6387160401655, "created": 6310, "description": "description", "customerName": "customerName", "stockValue": 6212.132729383267, "name": "name", "customerId": 6969, "state": "0", "projectId": 6828, "responsibleUserId": 6415, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1054.7212587727051, "batchSnBestBefore": 7068, "accountName": "accountName", "articleId": "articleId", "priceListId": 6855, "purchasePrice": 6418.756985030955, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1363, "checkoutDate": 3803, "price": 2734.5129688864313, "comment": "comment", "id": 4216, "projectId": 3203, "checkoutAmount": 4153.825772266665, "events": [{ "date": 1746805964668, "amount": 150.93985324589832, "type": "type" }], "checkinConsumeDate": 1746805964668, "checkinAmount": 2774.216236144884, "consumedAmount": 3679.8267204483527 }], "createdById": 690, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 2519.9861588504914, "created": 9123, "description": "description", "customerName": "customerName", "stockValue": 593.5188864526119, "name": "name", "customerId": 5017, "state": "0", "projectId": 5185, "responsibleUserId": 7900, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2042.6190115017685, "batchSnBestBefore": 1659, "accountName": "accountName", "articleId": "articleId", "priceListId": 3068, "purchasePrice": 2540.1712292527777, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5041, "checkoutDate": 1880, "price": 7029.053431231281, "comment": "comment", "id": 3456, "projectId": 8375, "checkoutAmount": 6802.574026729416, "events": [{ "date": 1746805964668, "amount": 2703.792566377846, "type": "type" }], "checkinConsumeDate": 1746805964668, "checkinAmount": 5419.404314346038, "consumedAmount": 4426.923352605948 }], "createdById": 8512, "responsibleUserName": "responsibleUserName" }
Update project article
PUTUrl: /{id}/article/{article_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 project article
Body:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2831.877386642322, "batchSnBestBefore": 1098, "accountName": "accountName", "articleId": "articleId", "priceListId": 4440, "purchasePrice": 1349.4066154628438, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5487, "checkoutDate": 8625, "price": 7576.368282156222, "comment": "comment", "id": 5303, "projectId": 1617, "checkoutAmount": 6353.254028572891, "events": [{ "date": 1746805964669, "amount": 180.94498505764167, "type": "type" }], "checkinConsumeDate": 1746805964669, "checkinAmount": 6699.734837801992, "consumedAmount": 1509.9320150132944 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 6330.261517183538, "articleName": "articleName", "pricelistId": 1731, "endDate": 1746805964669, "rentalAmount": 1843.4815408051875, "created": 1746805964669, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 6969, "price": 3347.4713045144044, "isProcessed": false, "dataArticleId": 6236, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8603, "startDate": 1746805964669, "createdById": 4010 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8543.293751991125, "batchSnBestBefore": 9054, "accountName": "accountName", "articleId": "articleId", "priceListId": 902, "purchasePrice": 2114.9682428585747, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9392, "checkoutDate": 1622, "price": 2058.326857810926, "comment": "comment", "id": 6425, "projectId": 9412, "checkoutAmount": 7647.233353750627, "events": [{ "date": 1746805964669, "amount": 719.4030623255987, "type": "type" }], "checkinConsumeDate": 1746805964669, "checkinAmount": 7855.81910451602, "consumedAmount": 1673.4505945546184 }] }
Create invoice drafts
PUTUrl: /{id}/invoice/draft
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Create invoice drafts for articles in a project
Body:
{ "projectId": 6530, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5257.031000303238, "batchSnBestBefore": 1772, "accountName": "accountName", "articleId": "articleId", "priceListId": 8919, "purchasePrice": 6116.707661205368, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3675, "checkoutDate": 7938, "price": 6250.690418443162, "comment": "comment", "id": 7285, "projectId": 6828, "checkoutAmount": 4618.927456835637, "events": [{ "date": 1746805964669, "amount": 6540.156835249867, "type": "type" }], "checkinConsumeDate": 1746805964669, "checkinAmount": 4834.8771800474, "consumedAmount": 5944.04908348524 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 5549.433896997543, "articleName": "articleName", "pricelistId": 1474, "endDate": 1746805964670, "rentalAmount": 146.66673610988056, "created": 1746805964670, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 8732, "price": 889.0005435005044, "isProcessed": true, "dataArticleId": 3102, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 4621, "startDate": 1746805964670, "createdById": 5832 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8104.011357989749, "batchSnBestBefore": 9410, "accountName": "accountName", "articleId": "articleId", "priceListId": 4238, "purchasePrice": 5128.967948102513, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 8398, "checkoutDate": 9737, "price": 7387.142007973669, "comment": "comment", "id": 1921, "projectId": 1154, "checkoutAmount": 5399.556194609443, "events": [{ "date": 1746805964670, "amount": 1972.8809980295703, "type": "type" }], "checkinConsumeDate": 1746805964670, "checkinAmount": 9098.97520123079, "consumedAmount": 1665.25102161305 }] }
Send invoice drafts to external integrations
PUTUrl: /{id}/invoice
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Send existing invoice drafts to external integrations and sets the draft to invoiced
Body:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 7690.9681817812325, "articleName": "articleName", "pricelistId": 2642, "endDate": 1746805964670, "rentalAmount": 6637.434731794079, "created": 1746805964670, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 2628, "price": 9251.601714934659, "isProcessed": false, "dataArticleId": 943, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2388, "startDate": 1746805964670, "createdById": 927 }], "freeTexts": [{}], "customerId": 5494, "type": "type", "projectId": 9436 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 2919.7159678429994, "articleName": "articleName", "pricelistId": 989, "endDate": 1746805964670, "rentalAmount": 8886.726836334747, "created": 1746805964670, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 9254, "price": 92.86160321294368, "isProcessed": true, "dataArticleId": 4846, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3466, "startDate": 1746805964670, "createdById": 1246 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6864.323001580792, "batchSnBestBefore": 2242, "accountName": "accountName", "articleId": "articleId", "priceListId": 9488, "purchasePrice": 2245.4413591517996, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1117, "checkoutDate": 4534, "price": 2759.58538835364, "comment": "comment", "id": 142, "projectId": 4076, "checkoutAmount": 8978.156644202805, "events": [{ "date": 1746805964670, "amount": 4503.301946755351, "type": "type" }], "checkinConsumeDate": 1746805964670, "checkinAmount": 4853.380261309703, "consumedAmount": 1239.1497148107023 }] }
Close project
PUTUrl: /{id}/close
Headers:
Accept: application/json or application/xml
Content-type: application/json or application/xml
Content-type: application/json or application/xml
Close an existing project
Body:
{"closeArticles": {}}
Successfull response:
{ "createdByName": "createdByName", "cost": 6463.131878876681, "created": 3635, "description": "description", "customerName": "customerName", "stockValue": 6689.368595797625, "name": "name", "customerId": 8588, "state": "0", "projectId": 6962, "responsibleUserId": 9681, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5107.13097060326, "batchSnBestBefore": 753, "accountName": "accountName", "articleId": "articleId", "priceListId": 9668, "purchasePrice": 5732.767782388158, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9461, "checkoutDate": 5753, "price": 317.66754813520424, "comment": "comment", "id": 3367, "projectId": 7869, "checkoutAmount": 4667.020501116417, "events": [{ "date": 1746805964670, "amount": 5709.897340458784, "type": "type" }], "checkinConsumeDate": 1746805964670, "checkinAmount": 3886.1598168343503, "consumedAmount": 2556.5560972948765 }], "createdById": 3103, "responsibleUserName": "responsibleUserName" }
Classes:
CloseProjectRequest
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
closeArticles | HashMap | Map containing articles that should be handled when closing a project. Key in map is project-article id and value is from enum set | Value in map can be either checkin, consume, end_rent | R,W |
InvoiceDraft
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R | |||||
dataType | String | R | |||||
dataId | Long | R | |||||
dataArticleId | Long | R | |||||
articleId | String | R | |||||
articleName | String | R | |||||
amount | Double | R | |||||
price | Double | R | |||||
pricelistId | long | R | |||||
currency | String | R | |||||
rentalCurrency | String | R | |||||
startDate | Date | R | |||||
endDate | Date | R | |||||
rentalAmount | Double | R | |||||
comment | String | R | |||||
isInvoiced | boolean | Indicates if row has been marked as invoiced | R | ||||
isProcessed | boolean | Indicates if row has been completely processed as invoiced | R | ||||
invoiceId | String | If row has been invoiced, this is id of the created invoice | R | ||||
createdById | Long | R | |||||
createdByName | String | R | |||||
created | Date | R |
InvoiceDraftProjectArticlesRequest
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
articles | List | R |
InvoiceProjectArticlesRequest
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
customerId | Long | R | |||||
type | String | invoice, cash, card, ag | R | ||||
invoiceDrafts | List | R | |||||
freeTexts | List | R,W |
InvoiceProjectArticlesResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
articles | List | R | |||||
invoiceDrafts | List | R |
Project
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
name | String | R,W | |||||
customerId | Long | R,W | |||||
customerName | String | R,W | |||||
description | String | R,W | |||||
state | Integer | Write only with POST | 0 | NEW = 0, DEVELOPING = 1, FINISHED = 2, CANCELLED = 3 |
R,W | ||
responsibleUserId | Long | R,W | |||||
responsibleUserName | String | R,W | |||||
createdById | Long | R,W | |||||
createdByName | String | R,W | |||||
created | long | R,W | |||||
articles | List | R,W | |||||
cost | Double | R,W | |||||
stockValue | Double | R,W |
ProjectArticle
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
id | long | R,W | |||||
projectId | long | R,W | |||||
articleId | String | R,W | |||||
articleName | String | R,W | |||||
batchId | String | R,W | |||||
snId | String | R,W | |||||
batchSnBestBefore | Long | R,W | |||||
checkoutAmount | Double | R,W | |||||
checkinAmount | Double | R,W | |||||
consumedAmount | Double | R,W | |||||
invoicedAmount | Double | R,W | |||||
priceListId | long | R,W | |||||
rental | boolean | R,W | |||||
price | double | R,W | |||||
rentalCurrency | String | R,W | |||||
comment | String | R,W | |||||
purchasePrice | Double | R,W | |||||
events | List | R,W | |||||
accountId | long | R,W | |||||
accountName | String | R,W | |||||
checkoutDate | Long | R,W | |||||
checkinConsumeDate | Date | R,W |
ProjectArticleEvent
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
type | String | R,W | |||||
amount | double | R,W | |||||
date | Date | R,W |
ProjectArticlesResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
projectsCount | int | R | |||||
articles | List | R |
ProjectCustomerOrderRequest
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | Long | A new project will be created if the id is null or -1 | R,W |
ProjectInvoiceDraftsResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
draftsCount | int | R | |||||
invoiceDrafts | List | R |
ProjectsResponse
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
page | int | R | |||||
pages | int | R | |||||
pageSize | int | R | |||||
projectsCount | int | R | |||||
projects | List | R |