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": 7531.442405190096, "articleName": "articleName", "pricelistId": 8773, "endDate": 1752877668577, "rentalAmount": 8825.0615728526, "created": 1752877668577, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 6884, "price": 3022.769971971341, "isProcessed": true, "dataArticleId": 5209, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2885, "startDate": 1752877668577, "createdById": 3971 }], "pages": 744, "pageSize": 3369, "draftsCount": 4129, "page": 1649 }
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": 206.20583402886416, "created": 3938, "description": "description", "customerName": "customerName", "stockValue": 1928.8225227581445, "name": "name", "customerId": 9543, "state": "0", "projectId": 6677, "responsibleUserId": 8935, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7216.384014925683, "batchSnBestBefore": 6576, "accountName": "accountName", "articleId": "articleId", "priceListId": 1952, "purchasePrice": 9857.97362479573, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3873, "checkoutDate": 6242, "price": 3498.138604342774, "comment": "comment", "id": 665, "projectId": 3209, "checkoutAmount": 9995.169099404622, "events": [{ "date": 1752877668578, "amount": 3056.334762405877, "type": "type" }], "checkinConsumeDate": 1752877668578, "checkinAmount": 228.97767936673196, "consumedAmount": 3870.163602731409 }], "createdById": 9332, "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": 1630, "projects": [{ "createdByName": "createdByName", "cost": 1090.0977210448104, "created": 1031, "description": "description", "customerName": "customerName", "stockValue": 3767.2121325027774, "name": "name", "customerId": 1291, "state": "0", "projectId": 599, "responsibleUserId": 5352, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4157.7017886835365, "batchSnBestBefore": 1416, "accountName": "accountName", "articleId": "articleId", "priceListId": 8262, "purchasePrice": 9404.710450597131, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3414, "checkoutDate": 9354, "price": 8270.628356764897, "comment": "comment", "id": 6703, "projectId": 3663, "checkoutAmount": 1284.497232155849, "events": [{ "date": 1752877668578, "amount": 896.8048253533257, "type": "type" }], "checkinConsumeDate": 1752877668578, "checkinAmount": 2069.2087501551414, "consumedAmount": 8444.809096576944 }], "createdById": 690, "responsibleUserName": "responsibleUserName" }], "pageSize": 2975, "page": 7448, "projectsCount": 5632 }
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": 6207, "projects": [{ "createdByName": "createdByName", "cost": 3360.751081338049, "created": 7478, "description": "description", "customerName": "customerName", "stockValue": 2487.2915895366987, "name": "name", "customerId": 8452, "state": "0", "projectId": 6287, "responsibleUserId": 4741, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5468.47572409876, "batchSnBestBefore": 5097, "accountName": "accountName", "articleId": "articleId", "priceListId": 4294, "purchasePrice": 6625.421358824783, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5273, "checkoutDate": 9574, "price": 2419.709849565517, "comment": "comment", "id": 255, "projectId": 4729, "checkoutAmount": 2355.8234967169224, "events": [{ "date": 1752877668578, "amount": 1204.6307864197759, "type": "type" }], "checkinConsumeDate": 1752877668578, "checkinAmount": 1795.9933061420763, "consumedAmount": 436.1980168032431 }], "createdById": 9496, "responsibleUserName": "responsibleUserName" }], "pageSize": 3877, "page": 9674, "projectsCount": 2298 }
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": 4283, "pageSize": 4586, "page": 1580, "projectsCount": 5065, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3480.2806433545607, "batchSnBestBefore": 8753, "accountName": "accountName", "articleId": "articleId", "priceListId": 8438, "purchasePrice": 360.1771591482683, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6389, "checkoutDate": 8317, "price": 9758.03574112951, "comment": "comment", "id": 413, "projectId": 3074, "checkoutAmount": 6564.113670307185, "events": [{ "date": 1752877668578, "amount": 5672.704644399933, "type": "type" }], "checkinConsumeDate": 1752877668578, "checkinAmount": 2457.0365513501124, "consumedAmount": 1478.4094882616293 }] }
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": 8236.62503312038, "articleName": "articleName", "pricelistId": 6621, "endDate": 1752877668579, "rentalAmount": 3558.2446416161874, "created": 1752877668579, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 5502, "price": 9900.556333636916, "isProcessed": true, "dataArticleId": 8815, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 7054, "startDate": 1752877668579, "createdById": 8226 }], "pages": 2491, "pageSize": 491, "draftsCount": 7688, "page": 9345 }
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": 3321.211166420387, "created": 2062, "description": "description", "customerName": "customerName", "stockValue": 8492.744758396944, "name": "name", "customerId": 9340, "state": "0", "responsibleUserId": 3176, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2078.25646316405, "batchSnBestBefore": 7849, "accountName": "accountName", "articleId": "articleId", "priceListId": 4915, "purchasePrice": 6883.2768087424965, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2010, "checkoutDate": 5008, "price": 9783.40290483358, "comment": "comment", "id": 5887, "projectId": 1014, "checkoutAmount": 1617.3024899913391, "events": [{ "date": 1752877668579, "amount": 966.7030405322996, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 3509.2571024051877, "consumedAmount": 5612.618321594765 }], "createdById": 9659, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 2667.9633398501246, "created": 1241, "description": "description", "customerName": "customerName", "stockValue": 3018.2718414108635, "name": "name", "customerId": 3012, "state": "0", "projectId": 3683, "responsibleUserId": 7658, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9037.599149984113, "batchSnBestBefore": 7353, "accountName": "accountName", "articleId": "articleId", "priceListId": 1679, "purchasePrice": 7909.923395275038, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 8473, "checkoutDate": 3786, "price": 3350.9602489120825, "comment": "comment", "id": 2942, "projectId": 4696, "checkoutAmount": 2801.675933490494, "events": [{ "date": 1752877668579, "amount": 7475.338475438795, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 3930.8109398418733, "consumedAmount": 740.3614174614304 }], "createdById": 9946, "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": 9358}
Successfull response:
{ "createdByName": "createdByName", "cost": 4137.729257730803, "created": 6148, "description": "description", "customerName": "customerName", "stockValue": 6183.687203931629, "name": "name", "customerId": 3000, "state": "0", "projectId": 3276, "responsibleUserId": 6561, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 75.51531350628804, "batchSnBestBefore": 1814, "accountName": "accountName", "articleId": "articleId", "priceListId": 7838, "purchasePrice": 4860.449828002303, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6936, "checkoutDate": 7227, "price": 5382.79583736079, "comment": "comment", "id": 8682, "projectId": 7497, "checkoutAmount": 1217.3391773424091, "events": [{ "date": 1752877668579, "amount": 4528.086910645379, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 297.3183864286477, "consumedAmount": 4295.650241289839 }], "createdById": 1509, "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": 7883.670971378924, "batchSnBestBefore": 4216, "accountName": "accountName", "articleId": "articleId", "priceListId": 5978, "purchasePrice": 4088.3204458947853, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 7049, "checkoutDate": 6302, "price": 4532.555844156954, "comment": "comment", "id": 1082, "projectId": 9038, "checkoutAmount": 571.2465918843135, "events": [{ "date": 1752877668579, "amount": 9711.758040261855, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 5260.97836964271, "consumedAmount": 163.0304223116852 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6115.460676192759, "batchSnBestBefore": 8275, "accountName": "accountName", "articleId": "articleId", "priceListId": 9270, "purchasePrice": 8903.457989476472, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 7782, "checkoutDate": 6008, "price": 955.4015384192016, "comment": "comment", "id": 7050, "projectId": 1464, "checkoutAmount": 2232.589455043259, "events": [{ "date": 1752877668579, "amount": 320.33033033712076, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 2235.8117587170777, "consumedAmount": 6485.2356750383115 }
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": 854.4295387738777, "created": 6129, "description": "description", "customerName": "customerName", "stockValue": 9402.846117252826, "name": "name", "customerId": 7233, "state": "0", "projectId": 1665, "responsibleUserId": 5145, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 883.8596809039501, "batchSnBestBefore": 5201, "accountName": "accountName", "articleId": "articleId", "priceListId": 1144, "purchasePrice": 893.9632551490961, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6917, "checkoutDate": 7971, "price": 6943.04925594664, "comment": "comment", "id": 7685, "projectId": 8515, "checkoutAmount": 7290.141038034311, "events": [{ "date": 1752877668579, "amount": 2983.329276753509, "type": "type" }], "checkinConsumeDate": 1752877668579, "checkinAmount": 1803.3434482692744, "consumedAmount": 1448.0024459086983 }], "createdById": 7425, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 1571.7496166012002, "created": 5392, "description": "description", "customerName": "customerName", "stockValue": 5195.789729812721, "name": "name", "customerId": 6861, "state": "0", "projectId": 6376, "responsibleUserId": 9385, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1341.8292084993188, "batchSnBestBefore": 7109, "accountName": "accountName", "articleId": "articleId", "priceListId": 3347, "purchasePrice": 3863.4575636935765, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2323, "checkoutDate": 3892, "price": 683.4631644958932, "comment": "comment", "id": 20, "projectId": 9781, "checkoutAmount": 2680.007670520651, "events": [{ "date": 1752877668580, "amount": 7739.502423094271, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 4687.95076583673, "consumedAmount": 4525.748874057072 }], "createdById": 55, "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": 5297.568196220523, "batchSnBestBefore": 2603, "accountName": "accountName", "articleId": "articleId", "priceListId": 4388, "purchasePrice": 483.7281411104066, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6462, "checkoutDate": 7036, "price": 8040.100523464914, "comment": "comment", "id": 4553, "projectId": 4867, "checkoutAmount": 1597.774350740906, "events": [{ "date": 1752877668580, "amount": 5131.884917187276, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 798.8593589831484, "consumedAmount": 5132.895052617618 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 2666.743649414902, "articleName": "articleName", "pricelistId": 9562, "endDate": 1752877668580, "rentalAmount": 1505.598917697679, "created": 1752877668580, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 2367, "price": 1675.2022582868565, "isProcessed": true, "dataArticleId": 6456, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2821, "startDate": 1752877668580, "createdById": 3960 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3968.3369647538057, "batchSnBestBefore": 152, "accountName": "accountName", "articleId": "articleId", "priceListId": 2417, "purchasePrice": 5352.308577627664, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6703, "checkoutDate": 3680, "price": 2683.13371345577, "comment": "comment", "id": 2252, "projectId": 7619, "checkoutAmount": 5614.704558733941, "events": [{ "date": 1752877668580, "amount": 555.196838946721, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 6816.402888265918, "consumedAmount": 9026.069107735317 }] }
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": 6560, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5963.050062866281, "batchSnBestBefore": 5928, "accountName": "accountName", "articleId": "articleId", "priceListId": 1492, "purchasePrice": 9886.225098228266, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 753, "checkoutDate": 8143, "price": 8338.414114520367, "comment": "comment", "id": 1697, "projectId": 1193, "checkoutAmount": 9765.692650994659, "events": [{ "date": 1752877668580, "amount": 4734.286900884399, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 5512.805119945342, "consumedAmount": 7588.178253345373 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 9418.020974829433, "articleName": "articleName", "pricelistId": 5196, "endDate": 1752877668580, "rentalAmount": 2600.5135429349225, "created": 1752877668580, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 9028, "price": 4032.872921962617, "isProcessed": true, "dataArticleId": 9055, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 1896, "startDate": 1752877668580, "createdById": 662 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7371.776694994224, "batchSnBestBefore": 7892, "accountName": "accountName", "articleId": "articleId", "priceListId": 452, "purchasePrice": 3149.5213618876273, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9727, "checkoutDate": 4188, "price": 9949.402258368538, "comment": "comment", "id": 9640, "projectId": 4303, "checkoutAmount": 84.35421651369457, "events": [{ "date": 1752877668580, "amount": 4789.1093177450175, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 9754.698615195977, "consumedAmount": 7117.657657559643 }] }
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": 5060.904301064482, "articleName": "articleName", "pricelistId": 5086, "endDate": 1752877668580, "rentalAmount": 6951.501499762325, "created": 1752877668580, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 3610, "price": 1480.978226121792, "isProcessed": true, "dataArticleId": 8275, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8583, "startDate": 1752877668580, "createdById": 9747 }], "freeTexts": [{}], "customerId": 342, "type": "type", "projectId": 7145 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 8950.303425277614, "articleName": "articleName", "pricelistId": 577, "endDate": 1752877668580, "rentalAmount": 3569.4625613692765, "created": 1752877668580, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 3551, "price": 6365.811907196266, "isProcessed": true, "dataArticleId": 9792, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 6491, "startDate": 1752877668580, "createdById": 3550 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1764.458609862395, "batchSnBestBefore": 3576, "accountName": "accountName", "articleId": "articleId", "priceListId": 4276, "purchasePrice": 7945.117570375012, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1666, "checkoutDate": 1091, "price": 7507.123943448857, "comment": "comment", "id": 1348, "projectId": 7434, "checkoutAmount": 3269.4690252399237, "events": [{ "date": 1752877668580, "amount": 2576.7565838165697, "type": "type" }], "checkinConsumeDate": 1752877668580, "checkinAmount": 2197.594593081685, "consumedAmount": 1084.7250851520262 }] }
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": 2915.1396863943637, "created": 1572, "description": "description", "customerName": "customerName", "stockValue": 4535.166336051515, "name": "name", "customerId": 8670, "state": "0", "projectId": 7319, "responsibleUserId": 6942, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3779.8844200637973, "batchSnBestBefore": 3517, "accountName": "accountName", "articleId": "articleId", "priceListId": 2033, "purchasePrice": 2332.0495128631655, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4275, "checkoutDate": 4054, "price": 1898.9876824543894, "comment": "comment", "id": 483, "projectId": 5477, "checkoutAmount": 3492.6335125992514, "events": [{ "date": 1752877668581, "amount": 5822.726578832084, "type": "type" }], "checkinConsumeDate": 1752877668581, "checkinAmount": 2159.8063231969522, "consumedAmount": 7975.2954747928825 }], "createdById": 1740, "responsibleUserName": "responsibleUserName" }
Classes:
CloseProjectRequestDto
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 |
InvoiceDraftDto
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 |
InvoiceDraftProjectArticlesRequestDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
projectId | long | R | |||||
articles | List | R |
InvoiceProjectArticlesRequestDto
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 |
InvoiceProjectArticlesResponseDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
articles | List | R | |||||
invoiceDrafts | List | R |
ProjectArticleDto
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 |
ProjectArticleEventDto
Field | Type | Description | Default | Mandatory | Accepted values | Example values | Access |
---|---|---|---|---|---|---|---|
type | String | R,W | |||||
amount | double | R,W | |||||
date | Date | R,W |
ProjectArticlesResponseDto
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 |
ProjectCustomerOrderRequestDto
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 |
ProjectDto
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 |
ProjectInvoiceDraftsResponseDto
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 |
ProjectsResponseDto
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 |