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 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": 1879, "projects": [{ "createdByName": "createdByName", "cost": 1536.789552500255, "created": 7000, "description": "description", "customerName": "customerName", "stockValue": 4112.789566475132, "name": "name", "customerId": 7170, "state": "0", "projectId": 2039, "responsibleUserId": 2775, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7319.652129568542, "batchSnBestBefore": 3193, "accountName": "accountName", "articleId": "articleId", "priceListId": 6615, "purchasePrice": 4187.3014836661005, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 1916, "checkoutDate": 9386, "price": 690.0484781619454, "comment": "comment", "id": 4812, "projectId": 8506, "checkoutAmount": 4711.028802795285, "events": [{ "date": 1751044452690, "amount": 3178.2013062656565, "type": "type" }], "checkinConsumeDate": 1751044452690, "checkinAmount": 4916.377849427636, "consumedAmount": 2032.693276364942 }], "createdById": 3391, "responsibleUserName": "responsibleUserName" }], "pageSize": 343, "page": 7788, "projectsCount": 7888 }
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": 2543, "projects": [{ "createdByName": "createdByName", "cost": 1537.7098811447343, "created": 337, "description": "description", "customerName": "customerName", "stockValue": 4644.934501001726, "name": "name", "customerId": 1294, "state": "0", "projectId": 8365, "responsibleUserId": 8207, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3129.7341544475, "batchSnBestBefore": 551, "accountName": "accountName", "articleId": "articleId", "priceListId": 8038, "purchasePrice": 2788.6065104194513, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8589, "checkoutDate": 6170, "price": 7434.873857879483, "comment": "comment", "id": 6897, "projectId": 6181, "checkoutAmount": 7663.730373015791, "events": [{ "date": 1751044452690, "amount": 3462.3774259921934, "type": "type" }], "checkinConsumeDate": 1751044452690, "checkinAmount": 5855.120073946534, "consumedAmount": 3053.9942839334954 }], "createdById": 2952, "responsibleUserName": "responsibleUserName" }], "pageSize": 8421, "page": 892, "projectsCount": 5746 }
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": 1333, "pageSize": 8725, "page": 7151, "projectsCount": 9481, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4827.144824162091, "batchSnBestBefore": 4213, "accountName": "accountName", "articleId": "articleId", "priceListId": 5723, "purchasePrice": 5038.752858380384, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 7651, "checkoutDate": 1139, "price": 2408.6070813132287, "comment": "comment", "id": 1544, "projectId": 6599, "checkoutAmount": 7466.966996560992, "events": [{ "date": 1751044452690, "amount": 5159.303993509397, "type": "type" }], "checkinConsumeDate": 1751044452690, "checkinAmount": 9298.283562620818, "consumedAmount": 3791.7773125476483 }] }
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": 358.5277317399349, "articleName": "articleName", "pricelistId": 3960, "endDate": 1751044452691, "rentalAmount": 8612.779429634591, "created": 1751044452691, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 2690, "price": 3876.4117121581744, "isProcessed": false, "dataArticleId": 7167, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 7961, "startDate": 1751044452691, "createdById": 1483 }], "pages": 7223, "pageSize": 812, "draftsCount": 544, "page": 2797 }
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": 2102.9414256242253, "articleName": "articleName", "pricelistId": 9690, "endDate": 1751044452691, "rentalAmount": 7524.62116425078, "created": 1751044452691, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 20, "price": 2592.891524496088, "isProcessed": false, "dataArticleId": 3296, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9162, "startDate": 1751044452691, "createdById": 7719 }], "pages": 8915, "pageSize": 8195, "draftsCount": 3068, "page": 5189 }
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": 2537.8653234589233, "created": 2228, "description": "description", "customerName": "customerName", "stockValue": 2403.776393198732, "name": "name", "customerId": 9385, "state": "0", "projectId": 2187, "responsibleUserId": 3372, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8356.707326857979, "batchSnBestBefore": 1670, "accountName": "accountName", "articleId": "articleId", "priceListId": 5742, "purchasePrice": 5920.690282000714, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3986, "checkoutDate": 7468, "price": 8912.620689885569, "comment": "comment", "id": 3616, "projectId": 9276, "checkoutAmount": 3369.2742505851647, "events": [{ "date": 1751044452691, "amount": 7721.4329157192915, "type": "type" }], "checkinConsumeDate": 1751044452691, "checkinAmount": 2378.545955520782, "consumedAmount": 2890.7669051847674 }], "createdById": 9021, "responsibleUserName": "responsibleUserName" }
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": 7933.3699234461665, "created": 4462, "description": "description", "customerName": "customerName", "stockValue": 2911.362812285577, "name": "name", "customerId": 1567, "state": "0", "responsibleUserId": 1924, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1781.1618650591777, "batchSnBestBefore": 211, "accountName": "accountName", "articleId": "articleId", "priceListId": 6008, "purchasePrice": 4381.1440422693195, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1966, "checkoutDate": 6768, "price": 2892.429287497509, "comment": "comment", "id": 7697, "projectId": 513, "checkoutAmount": 6948.059201682511, "events": [{ "date": 1751044452691, "amount": 6492.9925778768375, "type": "type" }], "checkinConsumeDate": 1751044452691, "checkinAmount": 7144.852930643091, "consumedAmount": 1605.0985428207143 }], "createdById": 1082, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 5440.907352597429, "created": 1072, "description": "description", "customerName": "customerName", "stockValue": 1205.8147048253309, "name": "name", "customerId": 7726, "state": "0", "projectId": 9786, "responsibleUserId": 3608, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9360.703406852452, "batchSnBestBefore": 8463, "accountName": "accountName", "articleId": "articleId", "priceListId": 8011, "purchasePrice": 5021.475471104989, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2414, "checkoutDate": 7564, "price": 3811.347309101315, "comment": "comment", "id": 2745, "projectId": 6622, "checkoutAmount": 2910.6226801652256, "events": [{ "date": 1751044452691, "amount": 3785.6380957044157, "type": "type" }], "checkinConsumeDate": 1751044452691, "checkinAmount": 2321.3545198936845, "consumedAmount": 6868.101696703591 }], "createdById": 8332, "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": 8091}
Successfull response:
{ "createdByName": "createdByName", "cost": 3332.4829970252144, "created": 4724, "description": "description", "customerName": "customerName", "stockValue": 6541.197870197708, "name": "name", "customerId": 6628, "state": "0", "projectId": 7668, "responsibleUserId": 9415, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 20.245764611398485, "batchSnBestBefore": 98, "accountName": "accountName", "articleId": "articleId", "priceListId": 1863, "purchasePrice": 5330.204106355018, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8477, "checkoutDate": 6601, "price": 9154.457610648251, "comment": "comment", "id": 1550, "projectId": 1447, "checkoutAmount": 7748.870130349642, "events": [{ "date": 1751044452691, "amount": 6799.30018309435, "type": "type" }], "checkinConsumeDate": 1751044452691, "checkinAmount": 5004.412011532612, "consumedAmount": 4927.229843959263 }], "createdById": 6441, "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": 6620.873103920459, "batchSnBestBefore": 7886, "accountName": "accountName", "articleId": "articleId", "priceListId": 6110, "purchasePrice": 1346.8662721504786, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 240, "checkoutDate": 383, "price": 154.82672493968508, "comment": "comment", "id": 4626, "projectId": 2514, "checkoutAmount": 4441.634727555961, "events": [{ "date": 1751044452692, "amount": 4490.630839227818, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 5914.721094130648, "consumedAmount": 1043.7315911087564 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8597.16574471332, "batchSnBestBefore": 8279, "accountName": "accountName", "articleId": "articleId", "priceListId": 5890, "purchasePrice": 2286.7655144407804, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 1864, "checkoutDate": 3956, "price": 2725.006784078293, "comment": "comment", "id": 1477, "projectId": 7669, "checkoutAmount": 4474.005252783514, "events": [{ "date": 1751044452692, "amount": 4255.1676901748515, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 7251.506693304352, "consumedAmount": 166.1222575483978 }
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": 600.3448402701206, "created": 4177, "description": "description", "customerName": "customerName", "stockValue": 1590.7680964498604, "name": "name", "customerId": 4878, "state": "0", "projectId": 8726, "responsibleUserId": 1414, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8889.334706337104, "batchSnBestBefore": 1391, "accountName": "accountName", "articleId": "articleId", "priceListId": 8599, "purchasePrice": 483.7089328601119, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8839, "checkoutDate": 1013, "price": 8473.42512372695, "comment": "comment", "id": 7709, "projectId": 158, "checkoutAmount": 3641.3753195581367, "events": [{ "date": 1751044452692, "amount": 9155.705056912324, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 8289.73515170184, "consumedAmount": 637.767477829062 }], "createdById": 9569, "responsibleUserName": "responsibleUserName" }
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": 4680.528296920486, "created": 2097, "description": "description", "customerName": "customerName", "stockValue": 1986.0123254819018, "name": "name", "customerId": 9785, "state": "0", "projectId": 8386, "responsibleUserId": 1089, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3503.269008286677, "batchSnBestBefore": 7064, "accountName": "accountName", "articleId": "articleId", "priceListId": 5404, "purchasePrice": 9761.884410332059, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 501, "checkoutDate": 7733, "price": 3252.150332743895, "comment": "comment", "id": 6881, "projectId": 2431, "checkoutAmount": 2614.3194819093974, "events": [{ "date": 1751044452692, "amount": 6692.780462988428, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 8043.360913865937, "consumedAmount": 961.4972884276185 }], "createdById": 1344, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 1339.614108637188, "created": 9515, "description": "description", "customerName": "customerName", "stockValue": 3077.62645408979, "name": "name", "customerId": 6659, "state": "0", "projectId": 3851, "responsibleUserId": 3000, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9643.715041939846, "batchSnBestBefore": 167, "accountName": "accountName", "articleId": "articleId", "priceListId": 7722, "purchasePrice": 52.158061293626766, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9142, "checkoutDate": 6368, "price": 280.29238208296283, "comment": "comment", "id": 8607, "projectId": 4347, "checkoutAmount": 4451.995480518654, "events": [{ "date": 1751044452692, "amount": 6525.032980086111, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 2830.34165843704, "consumedAmount": 2039.0829083125338 }], "createdById": 684, "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": 3459.31996622447, "batchSnBestBefore": 2567, "accountName": "accountName", "articleId": "articleId", "priceListId": 2659, "purchasePrice": 8241.11406893666, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9428, "checkoutDate": 5417, "price": 2415.452323992785, "comment": "comment", "id": 7890, "projectId": 9225, "checkoutAmount": 9073.235292986332, "events": [{ "date": 1751044452692, "amount": 2737.6522762822187, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 2579.9734548535234, "consumedAmount": 6766.6445798334 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 5209.865041215157, "articleName": "articleName", "pricelistId": 5737, "endDate": 1751044452692, "rentalAmount": 8858.062116588088, "created": 1751044452692, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 4585, "price": 6375.551034689864, "isProcessed": false, "dataArticleId": 8221, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 719, "startDate": 1751044452692, "createdById": 4575 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 257.4117430841094, "batchSnBestBefore": 4642, "accountName": "accountName", "articleId": "articleId", "priceListId": 9932, "purchasePrice": 1172.7596635395887, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1593, "checkoutDate": 4186, "price": 6940.111210359458, "comment": "comment", "id": 3933, "projectId": 6727, "checkoutAmount": 502.546503078789, "events": [{ "date": 1751044452692, "amount": 4993.167256533653, "type": "type" }], "checkinConsumeDate": 1751044452692, "checkinAmount": 5602.910253624032, "consumedAmount": 910.5908170840227 }] }
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": 5843, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1659.6484039272375, "batchSnBestBefore": 6557, "accountName": "accountName", "articleId": "articleId", "priceListId": 5037, "purchasePrice": 3570.924105830342, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5055, "checkoutDate": 2523, "price": 7783.380733729805, "comment": "comment", "id": 2117, "projectId": 6462, "checkoutAmount": 7311.730467055896, "events": [{ "date": 1751044452693, "amount": 9858.582430132603, "type": "type" }], "checkinConsumeDate": 1751044452693, "checkinAmount": 8563.2017741059, "consumedAmount": 482.2675388062658 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 957.453128455682, "articleName": "articleName", "pricelistId": 5492, "endDate": 1751044452693, "rentalAmount": 5069.584380432583, "created": 1751044452693, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 4556, "price": 2241.2160931567714, "isProcessed": true, "dataArticleId": 9431, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5736, "startDate": 1751044452693, "createdById": 2926 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7825.32061716788, "batchSnBestBefore": 9063, "accountName": "accountName", "articleId": "articleId", "priceListId": 5010, "purchasePrice": 9732.888672010347, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 106, "checkoutDate": 8741, "price": 4046.70728996417, "comment": "comment", "id": 1946, "projectId": 8253, "checkoutAmount": 7402.962691188951, "events": [{ "date": 1751044452693, "amount": 6447.926292393818, "type": "type" }], "checkinConsumeDate": 1751044452693, "checkinAmount": 3298.406771913537, "consumedAmount": 4646.618950935627 }] }
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": 1249.7715885211792, "articleName": "articleName", "pricelistId": 2670, "endDate": 1751044452693, "rentalAmount": 231.73149722407248, "created": 1751044452693, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 3734, "price": 5430.815099690663, "isProcessed": false, "dataArticleId": 812, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2847, "startDate": 1751044452693, "createdById": 6221 }], "freeTexts": [{}], "customerId": 3557, "type": "type", "projectId": 5190 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 178.6886917642949, "articleName": "articleName", "pricelistId": 8712, "endDate": 1751044452693, "rentalAmount": 613.5314367919365, "created": 1751044452693, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 9641, "price": 3799.703921480552, "isProcessed": true, "dataArticleId": 8590, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2922, "startDate": 1751044452693, "createdById": 308 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9507.144032997745, "batchSnBestBefore": 2690, "accountName": "accountName", "articleId": "articleId", "priceListId": 5885, "purchasePrice": 11.527879367609906, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 9798, "checkoutDate": 3133, "price": 5040.673452092144, "comment": "comment", "id": 9412, "projectId": 6475, "checkoutAmount": 2633.6437467087535, "events": [{ "date": 1751044452693, "amount": 6332.011658628801, "type": "type" }], "checkinConsumeDate": 1751044452693, "checkinAmount": 8017.205037118227, "consumedAmount": 7414.5387593726355 }] }
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 |