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": 5360, "projects": [{ "createdByName": "createdByName", "cost": 7218.428474556019, "created": 6280, "description": "description", "customerName": "customerName", "stockValue": 7010.066487920841, "name": "name", "customerId": 4391, "state": "0", "projectId": 8196, "responsibleUserId": 8217, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 674.1079717047827, "batchSnBestBefore": 5452, "accountName": "accountName", "articleId": "articleId", "priceListId": 7660, "purchasePrice": 2384.3188631688904, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3982, "checkoutDate": 748, "price": 8485.188052694188, "comment": "comment", "id": 8083, "projectId": 5187, "checkoutAmount": 8807.8247357565, "events": [{ "date": 1752293342486, "amount": 5480.994485379767, "type": "type" }], "checkinConsumeDate": 1752293342486, "checkinAmount": 6405.196882518943, "consumedAmount": 3827.2725648785367 }], "createdById": 2699, "responsibleUserName": "responsibleUserName" }], "pageSize": 759, "page": 6418, "projectsCount": 4321 }
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": 8107, "projects": [{ "createdByName": "createdByName", "cost": 9739.651089303397, "created": 3905, "description": "description", "customerName": "customerName", "stockValue": 2644.7502625994225, "name": "name", "customerId": 8474, "state": "0", "projectId": 5116, "responsibleUserId": 9755, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8027.084493667093, "batchSnBestBefore": 7952, "accountName": "accountName", "articleId": "articleId", "priceListId": 8210, "purchasePrice": 3289.108946533694, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1072, "checkoutDate": 1401, "price": 4695.559501223311, "comment": "comment", "id": 4558, "projectId": 1581, "checkoutAmount": 3815.3007661400675, "events": [{ "date": 1752293342486, "amount": 8059.131904700113, "type": "type" }], "checkinConsumeDate": 1752293342486, "checkinAmount": 7930.180733423844, "consumedAmount": 424.52572204882966 }], "createdById": 5325, "responsibleUserName": "responsibleUserName" }], "pageSize": 2026, "page": 6352, "projectsCount": 9481 }
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": 4596, "pageSize": 5790, "page": 6761, "projectsCount": 4399, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5718.944754365084, "batchSnBestBefore": 3848, "accountName": "accountName", "articleId": "articleId", "priceListId": 3140, "purchasePrice": 9216.621339334028, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2053, "checkoutDate": 2302, "price": 485.81642457167897, "comment": "comment", "id": 2877, "projectId": 8554, "checkoutAmount": 2034.4120709469748, "events": [{ "date": 1752293342487, "amount": 6011.588220139848, "type": "type" }], "checkinConsumeDate": 1752293342487, "checkinAmount": 1389.9865781904875, "consumedAmount": 5027.932925654682 }] }
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": 4304.546021407388, "articleName": "articleName", "pricelistId": 7039, "endDate": 1752293342488, "rentalAmount": 9594.201845357791, "created": 1752293342488, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 9813, "price": 8475.578485688415, "isProcessed": true, "dataArticleId": 4986, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8948, "startDate": 1752293342488, "createdById": 7717 }], "pages": 548, "pageSize": 2649, "draftsCount": 2558, "page": 3395 }
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": 6803.148656679249, "articleName": "articleName", "pricelistId": 3509, "endDate": 1752293342489, "rentalAmount": 7519.711496569767, "created": 1752293342489, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 311, "price": 804.2567771492959, "isProcessed": true, "dataArticleId": 3566, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 6956, "startDate": 1752293342489, "createdById": 5134 }], "pages": 4745, "pageSize": 2020, "draftsCount": 2781, "page": 7890 }
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": 638.7024091741023, "created": 9471, "description": "description", "customerName": "customerName", "stockValue": 1878.9247026312394, "name": "name", "customerId": 1242, "state": "0", "projectId": 8494, "responsibleUserId": 7488, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 79.18465916324058, "batchSnBestBefore": 9328, "accountName": "accountName", "articleId": "articleId", "priceListId": 679, "purchasePrice": 1143.9412034054997, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1810, "checkoutDate": 4033, "price": 5987.135459458879, "comment": "comment", "id": 1109, "projectId": 7069, "checkoutAmount": 2827.6531010669228, "events": [{ "date": 1752293342490, "amount": 642.8113381003342, "type": "type" }], "checkinConsumeDate": 1752293342490, "checkinAmount": 9809.95756191024, "consumedAmount": 292.91397427651077 }], "createdById": 6393, "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": 9258.402369260568, "created": 4191, "description": "description", "customerName": "customerName", "stockValue": 8216.717387850746, "name": "name", "customerId": 6205, "state": "0", "responsibleUserId": 9917, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8176.176379529475, "batchSnBestBefore": 6411, "accountName": "accountName", "articleId": "articleId", "priceListId": 3690, "purchasePrice": 8558.465882173123, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2953, "checkoutDate": 2388, "price": 8830.100465294763, "comment": "comment", "id": 9115, "projectId": 6892, "checkoutAmount": 9833.800573202814, "events": [{ "date": 1752293342490, "amount": 2540.1664142855975, "type": "type" }], "checkinConsumeDate": 1752293342490, "checkinAmount": 7993.125476315888, "consumedAmount": 1673.384864426839 }], "createdById": 4985, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 8964.917611478806, "created": 8294, "description": "description", "customerName": "customerName", "stockValue": 9670.089673526149, "name": "name", "customerId": 533, "state": "0", "projectId": 9027, "responsibleUserId": 5127, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2831.704203458839, "batchSnBestBefore": 5093, "accountName": "accountName", "articleId": "articleId", "priceListId": 1383, "purchasePrice": 7646.739732940354, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3580, "checkoutDate": 6099, "price": 4955.935789562056, "comment": "comment", "id": 768, "projectId": 9897, "checkoutAmount": 3519.2879739855675, "events": [{ "date": 1752293342491, "amount": 2066.3620134176685, "type": "type" }], "checkinConsumeDate": 1752293342491, "checkinAmount": 8402.46324287686, "consumedAmount": 6935.407008927006 }], "createdById": 2661, "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": 2284}
Successfull response:
{ "createdByName": "createdByName", "cost": 9283.776530954154, "created": 533, "description": "description", "customerName": "customerName", "stockValue": 3633.4376811021752, "name": "name", "customerId": 3718, "state": "0", "projectId": 7808, "responsibleUserId": 7515, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3227.6582478978953, "batchSnBestBefore": 658, "accountName": "accountName", "articleId": "articleId", "priceListId": 227, "purchasePrice": 5845.608350373709, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8285, "checkoutDate": 6154, "price": 6169.5224608048975, "comment": "comment", "id": 191, "projectId": 9988, "checkoutAmount": 471.29480554026105, "events": [{ "date": 1752293342491, "amount": 617.0090142003581, "type": "type" }], "checkinConsumeDate": 1752293342491, "checkinAmount": 9816.5679530878, "consumedAmount": 1785.5204402921654 }], "createdById": 5539, "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": 5332.969648278209, "batchSnBestBefore": 1405, "accountName": "accountName", "articleId": "articleId", "priceListId": 4979, "purchasePrice": 8544.220179640344, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6625, "checkoutDate": 2731, "price": 4435.862725916797, "comment": "comment", "id": 8170, "projectId": 6425, "checkoutAmount": 36.258754338167606, "events": [{ "date": 1752293342492, "amount": 1628.5516728589532, "type": "type" }], "checkinConsumeDate": 1752293342492, "checkinAmount": 7379.162005333647, "consumedAmount": 9220.881969494736 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2352.422264823819, "batchSnBestBefore": 3558, "accountName": "accountName", "articleId": "articleId", "priceListId": 7976, "purchasePrice": 9362.387819046202, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4488, "checkoutDate": 9133, "price": 6687.10105329552, "comment": "comment", "id": 8864, "projectId": 5824, "checkoutAmount": 595.468492693605, "events": [{ "date": 1752293342492, "amount": 2355.0472118150865, "type": "type" }], "checkinConsumeDate": 1752293342492, "checkinAmount": 1628.1438773955726, "consumedAmount": 4484.620166563207 }
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": 6940.817773983747, "created": 5574, "description": "description", "customerName": "customerName", "stockValue": 2133.7732507352857, "name": "name", "customerId": 7947, "state": "0", "projectId": 769, "responsibleUserId": 6578, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4602.677386862265, "batchSnBestBefore": 7523, "accountName": "accountName", "articleId": "articleId", "priceListId": 7299, "purchasePrice": 4808.59441139145, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9828, "checkoutDate": 4615, "price": 2049.2983864975754, "comment": "comment", "id": 5111, "projectId": 9264, "checkoutAmount": 8486.439872302317, "events": [{ "date": 1752293342493, "amount": 2844.2802339473474, "type": "type" }], "checkinConsumeDate": 1752293342493, "checkinAmount": 2942.861227856852, "consumedAmount": 6813.951793958572 }], "createdById": 7054, "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": 343.7351157256896, "created": 7644, "description": "description", "customerName": "customerName", "stockValue": 5225.670343452318, "name": "name", "customerId": 2088, "state": "0", "projectId": 8145, "responsibleUserId": 2510, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6798.194293101182, "batchSnBestBefore": 789, "accountName": "accountName", "articleId": "articleId", "priceListId": 4754, "purchasePrice": 8177.771633969105, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3365, "checkoutDate": 4745, "price": 3331.946458826617, "comment": "comment", "id": 5997, "projectId": 1707, "checkoutAmount": 983.2223301277144, "events": [{ "date": 1752293342493, "amount": 3658.004868294743, "type": "type" }], "checkinConsumeDate": 1752293342493, "checkinAmount": 3799.517693270984, "consumedAmount": 5125.744841970651 }], "createdById": 6951, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 6275.893423393247, "created": 4150, "description": "description", "customerName": "customerName", "stockValue": 9683.952152774154, "name": "name", "customerId": 7284, "state": "0", "projectId": 5044, "responsibleUserId": 1085, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4015.263170227388, "batchSnBestBefore": 4645, "accountName": "accountName", "articleId": "articleId", "priceListId": 7718, "purchasePrice": 8064.486799532177, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 6243, "checkoutDate": 3787, "price": 17.75399306468861, "comment": "comment", "id": 766, "projectId": 944, "checkoutAmount": 8456.675803255943, "events": [{ "date": 1752293342494, "amount": 1278.0405147603735, "type": "type" }], "checkinConsumeDate": 1752293342494, "checkinAmount": 5134.75683514985, "consumedAmount": 1082.13111232641 }], "createdById": 9878, "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": 9983.09570443026, "batchSnBestBefore": 5260, "accountName": "accountName", "articleId": "articleId", "priceListId": 2178, "purchasePrice": 1022.1607049769688, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 208, "checkoutDate": 1731, "price": 1730.6971470102194, "comment": "comment", "id": 9044, "projectId": 6322, "checkoutAmount": 4766.545314671404, "events": [{ "date": 1752293342494, "amount": 4059.3117727970384, "type": "type" }], "checkinConsumeDate": 1752293342494, "checkinAmount": 4394.679218647719, "consumedAmount": 8129.635153473034 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 4321.4203678266995, "articleName": "articleName", "pricelistId": 9497, "endDate": 1752293342494, "rentalAmount": 8687.371865760771, "created": 1752293342494, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 7440, "price": 1535.3700936012083, "isProcessed": true, "dataArticleId": 6187, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5362, "startDate": 1752293342494, "createdById": 2662 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2635.362480604515, "batchSnBestBefore": 4340, "accountName": "accountName", "articleId": "articleId", "priceListId": 1055, "purchasePrice": 9219.187801741124, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3324, "checkoutDate": 8741, "price": 7434.169861386012, "comment": "comment", "id": 4909, "projectId": 7176, "checkoutAmount": 5884.526211503526, "events": [{ "date": 1752293342494, "amount": 4613.268462737121, "type": "type" }], "checkinConsumeDate": 1752293342494, "checkinAmount": 642.3705694179093, "consumedAmount": 3681.3198764693057 }] }
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": 5476, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 153.2514059790302, "batchSnBestBefore": 8458, "accountName": "accountName", "articleId": "articleId", "priceListId": 9022, "purchasePrice": 9765.903557164793, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 1500, "checkoutDate": 7385, "price": 7463.583237516525, "comment": "comment", "id": 4274, "projectId": 657, "checkoutAmount": 4074.7413259001064, "events": [{ "date": 1752293342495, "amount": 2853.1171655704147, "type": "type" }], "checkinConsumeDate": 1752293342495, "checkinAmount": 2068.1468838165106, "consumedAmount": 2044.9407670630071 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 9267.333746172606, "articleName": "articleName", "pricelistId": 2101, "endDate": 1752293342495, "rentalAmount": 3496.375230212537, "created": 1752293342495, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 998, "price": 1408.8271077196368, "isProcessed": false, "dataArticleId": 2655, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 174, "startDate": 1752293342495, "createdById": 2055 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4022.0331386735074, "batchSnBestBefore": 229, "accountName": "accountName", "articleId": "articleId", "priceListId": 1112, "purchasePrice": 6136.153833486758, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3681, "checkoutDate": 4995, "price": 8545.609329011091, "comment": "comment", "id": 507, "projectId": 1866, "checkoutAmount": 489.24066088437803, "events": [{ "date": 1752293342495, "amount": 5362.789692572504, "type": "type" }], "checkinConsumeDate": 1752293342495, "checkinAmount": 4330.7664790694735, "consumedAmount": 6403.439851054591 }] }
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": 4342.3371587612955, "articleName": "articleName", "pricelistId": 279, "endDate": 1752293342496, "rentalAmount": 508.551115994067, "created": 1752293342496, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 7338, "price": 3822.641255117686, "isProcessed": false, "dataArticleId": 5082, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5012, "startDate": 1752293342496, "createdById": 1046 }], "freeTexts": [{}], "customerId": 3694, "type": "type", "projectId": 1256 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 3346.07328276186, "articleName": "articleName", "pricelistId": 1708, "endDate": 1752293342496, "rentalAmount": 8127.749637305797, "created": 1752293342496, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 1386, "price": 9217.221751935438, "isProcessed": true, "dataArticleId": 9599, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 4127, "startDate": 1752293342496, "createdById": 7109 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2267.784930925594, "batchSnBestBefore": 6104, "accountName": "accountName", "articleId": "articleId", "priceListId": 9834, "purchasePrice": 6785.668684761193, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3698, "checkoutDate": 4989, "price": 7593.071947804223, "comment": "comment", "id": 9672, "projectId": 3754, "checkoutAmount": 7874.078608337448, "events": [{ "date": 1752293342496, "amount": 8260.307144897864, "type": "type" }], "checkinConsumeDate": 1752293342496, "checkinAmount": 8908.2537726121, "consumedAmount": 9697.584527635545 }] }
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 |