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": 2628.8454126579654, "articleName": "articleName", "pricelistId": 7343, "endDate": 1758204607639, "rentalAmount": 8134.88996249015, "created": 1758204607639, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 9597, "price": 2702.410253033938, "isProcessed": true, "dataArticleId": 3430, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 5061, "startDate": 1758204607639, "createdById": 8014 }], "pages": 7484, "pageSize": 7800, "draftsCount": 8147, "page": 469 }
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": 4325.852100063973, "created": 9028, "description": "description", "customerName": "customerName", "stockValue": 9922.077988263954, "name": "name", "customerId": 7047, "state": "0", "projectId": 5239, "responsibleUserId": 7864, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5458.179717515406, "batchSnBestBefore": 3987, "accountName": "accountName", "articleId": "articleId", "priceListId": 1333, "purchasePrice": 4750.754379050742, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1719, "checkoutDate": 7484, "price": 1975.5336334484753, "comment": "comment", "id": 1969, "projectId": 8771, "checkoutAmount": 5434.201453574593, "events": [{ "date": 1758204607642, "amount": 7963.470743905228, "type": "type" }], "checkinConsumeDate": 1758204607642, "checkinAmount": 3316.3146693050403, "consumedAmount": 8232.404713606578 }], "createdById": 6852, "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": 6474, "projects": [{ "createdByName": "createdByName", "cost": 3619.777791451615, "created": 9704, "description": "description", "customerName": "customerName", "stockValue": 4168.728238123521, "name": "name", "customerId": 3640, "state": "0", "projectId": 2662, "responsibleUserId": 4683, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 711.9309271844454, "batchSnBestBefore": 9976, "accountName": "accountName", "articleId": "articleId", "priceListId": 3845, "purchasePrice": 8627.718074067552, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9955, "checkoutDate": 9324, "price": 3270.3038634683166, "comment": "comment", "id": 4053, "projectId": 7080, "checkoutAmount": 4810.530613209415, "events": [{ "date": 1758204607643, "amount": 1437.2404704062503, "type": "type" }], "checkinConsumeDate": 1758204607643, "checkinAmount": 8648.73373036792, "consumedAmount": 5059.534026384926 }], "createdById": 1589, "responsibleUserName": "responsibleUserName" }], "pageSize": 4996, "page": 2277, "projectsCount": 4994 }
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": 3185, "projects": [{ "createdByName": "createdByName", "cost": 3469.8641280658803, "created": 6399, "description": "description", "customerName": "customerName", "stockValue": 9494.624793905852, "name": "name", "customerId": 9955, "state": "0", "projectId": 1929, "responsibleUserId": 5169, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8250.08201550106, "batchSnBestBefore": 2737, "accountName": "accountName", "articleId": "articleId", "priceListId": 2527, "purchasePrice": 2531.5357904801904, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 7187, "checkoutDate": 1380, "price": 2905.11660979349, "comment": "comment", "id": 2112, "projectId": 2811, "checkoutAmount": 7473.357926957777, "events": [{ "date": 1758204607646, "amount": 2689.7425885958105, "type": "type" }], "checkinConsumeDate": 1758204607646, "checkinAmount": 3433.1895767776523, "consumedAmount": 3489.23047488367 }], "createdById": 3505, "responsibleUserName": "responsibleUserName" }], "pageSize": 64, "page": 7671, "projectsCount": 8788 }
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": 3830, "pageSize": 2903, "page": 189, "projectsCount": 9942, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8358.63029449921, "batchSnBestBefore": 5475, "accountName": "accountName", "articleId": "articleId", "priceListId": 7167, "purchasePrice": 6886.806047054911, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2089, "checkoutDate": 2039, "price": 5685.192640322781, "comment": "comment", "id": 8, "projectId": 5338, "checkoutAmount": 2474.2724205783693, "events": [{ "date": 1758204607647, "amount": 7038.451492956566, "type": "type" }], "checkinConsumeDate": 1758204607647, "checkinAmount": 5911.801326645293, "consumedAmount": 502.7932058459117 }] }
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": 527.489366005407, "articleName": "articleName", "pricelistId": 6095, "endDate": 1758204607648, "rentalAmount": 8069.552397180305, "created": 1758204607648, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 536, "price": 5030.6160036069, "isProcessed": false, "dataArticleId": 8733, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 1730, "startDate": 1758204607648, "createdById": 293 }], "pages": 3790, "pageSize": 9297, "draftsCount": 3778, "page": 5904 }
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": 5128.709535951641, "created": 7393, "description": "description", "customerName": "customerName", "stockValue": 5375.415561401577, "name": "name", "customerId": 1729, "state": "0", "responsibleUserId": 5534, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1730.896445243676, "batchSnBestBefore": 8525, "accountName": "accountName", "articleId": "articleId", "priceListId": 861, "purchasePrice": 241.42770259867996, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3617, "checkoutDate": 8246, "price": 984.1176137971031, "comment": "comment", "id": 1196, "projectId": 6954, "checkoutAmount": 5219.369856211089, "events": [{ "date": 1758204607649, "amount": 9950.030781899186, "type": "type" }], "checkinConsumeDate": 1758204607649, "checkinAmount": 5796.596455042854, "consumedAmount": 6572.545992109787 }], "createdById": 6210, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 2715.4778118489285, "created": 9321, "description": "description", "customerName": "customerName", "stockValue": 7167.000614861035, "name": "name", "customerId": 5264, "state": "0", "projectId": 6758, "responsibleUserId": 988, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3742.4008653625774, "batchSnBestBefore": 7210, "accountName": "accountName", "articleId": "articleId", "priceListId": 6961, "purchasePrice": 2953.548625642681, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 747, "checkoutDate": 5587, "price": 5630.6099667373965, "comment": "comment", "id": 5325, "projectId": 8021, "checkoutAmount": 7332.65100469458, "events": [{ "date": 1758204607649, "amount": 3795.228481926065, "type": "type" }], "checkinConsumeDate": 1758204607649, "checkinAmount": 5667.979417974593, "consumedAmount": 2288.1843011183655 }], "createdById": 3099, "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": 5651}
Successfull response:
{ "createdByName": "createdByName", "cost": 8957.400847486415, "created": 8695, "description": "description", "customerName": "customerName", "stockValue": 8495.546173743978, "name": "name", "customerId": 1476, "state": "0", "projectId": 4776, "responsibleUserId": 1827, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2137.611645432119, "batchSnBestBefore": 5624, "accountName": "accountName", "articleId": "articleId", "priceListId": 2572, "purchasePrice": 4595.279810361697, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4363, "checkoutDate": 7535, "price": 5593.93834894736, "comment": "comment", "id": 7851, "projectId": 7631, "checkoutAmount": 642.7127901186835, "events": [{ "date": 1758204607651, "amount": 1090.8116078303754, "type": "type" }], "checkinConsumeDate": 1758204607651, "checkinAmount": 5322.1337800841875, "consumedAmount": 1587.2740668669926 }], "createdById": 5850, "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": 579.0500680109323, "batchSnBestBefore": 1903, "accountName": "accountName", "articleId": "articleId", "priceListId": 8156, "purchasePrice": 5290.245735107708, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 7264, "checkoutDate": 731, "price": 7381.967856092373, "comment": "comment", "id": 7098, "projectId": 2981, "checkoutAmount": 9821.481200652013, "events": [{ "date": 1758204607653, "amount": 2166.4127532717625, "type": "type" }], "checkinConsumeDate": 1758204607653, "checkinAmount": 7073.01077575998, "consumedAmount": 9691.402302556333 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6656.625616261429, "batchSnBestBefore": 8927, "accountName": "accountName", "articleId": "articleId", "priceListId": 5851, "purchasePrice": 4401.257566805075, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1788, "checkoutDate": 3175, "price": 1405.6812809311193, "comment": "comment", "id": 741, "projectId": 1723, "checkoutAmount": 4505.508286872221, "events": [{ "date": 1758204607653, "amount": 295.9332665557624, "type": "type" }], "checkinConsumeDate": 1758204607653, "checkinAmount": 7697.72837998871, "consumedAmount": 9802.312534911089 }
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": 2686.546502043711, "created": 6175, "description": "description", "customerName": "customerName", "stockValue": 3635.5699443266644, "name": "name", "customerId": 4803, "state": "0", "projectId": 6109, "responsibleUserId": 1372, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 873.3160496946757, "batchSnBestBefore": 2925, "accountName": "accountName", "articleId": "articleId", "priceListId": 3657, "purchasePrice": 4098.676046062187, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1198, "checkoutDate": 4684, "price": 5798.60328514337, "comment": "comment", "id": 3364, "projectId": 1919, "checkoutAmount": 881.8483418499524, "events": [{ "date": 1758204607654, "amount": 7766.971418213406, "type": "type" }], "checkinConsumeDate": 1758204607654, "checkinAmount": 8011.364746022746, "consumedAmount": 4177.2325431168665 }], "createdById": 558, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 9557.055288926636, "created": 5426, "description": "description", "customerName": "customerName", "stockValue": 3880.979737000766, "name": "name", "customerId": 538, "state": "0", "projectId": 3751, "responsibleUserId": 9438, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3972.8865828883477, "batchSnBestBefore": 2915, "accountName": "accountName", "articleId": "articleId", "priceListId": 1959, "purchasePrice": 3402.7578490853493, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5570, "checkoutDate": 8174, "price": 1892.2051420409657, "comment": "comment", "id": 4405, "projectId": 5948, "checkoutAmount": 8751.271334449462, "events": [{ "date": 1758204607654, "amount": 9110.611160775361, "type": "type" }], "checkinConsumeDate": 1758204607654, "checkinAmount": 345.4755619031691, "consumedAmount": 541.9684668605051 }], "createdById": 4454, "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": 7804.933881042611, "batchSnBestBefore": 6228, "accountName": "accountName", "articleId": "articleId", "priceListId": 8862, "purchasePrice": 4014.9551563547548, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 8479, "checkoutDate": 710, "price": 876.0913729977982, "comment": "comment", "id": 7905, "projectId": 7937, "checkoutAmount": 5874.800051577104, "events": [{ "date": 1758204607656, "amount": 6215.799711236537, "type": "type" }], "checkinConsumeDate": 1758204607656, "checkinAmount": 5334.87633768573, "consumedAmount": 5527.945633028858 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 9685.36544951628, "articleName": "articleName", "pricelistId": 2024, "endDate": 1758204607656, "rentalAmount": 1661.0182835250332, "created": 1758204607656, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 3995, "price": 4042.5055586828084, "isProcessed": true, "dataArticleId": 8192, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 2991, "startDate": 1758204607656, "createdById": 7893 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 38.95504133302086, "batchSnBestBefore": 6846, "accountName": "accountName", "articleId": "articleId", "priceListId": 7265, "purchasePrice": 6918.323203028534, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8379, "checkoutDate": 2089, "price": 4163.226603129242, "comment": "comment", "id": 462, "projectId": 3, "checkoutAmount": 5868.46897468925, "events": [{ "date": 1758204607656, "amount": 1299.1957027474698, "type": "type" }], "checkinConsumeDate": 1758204607656, "checkinAmount": 2896.2993352830504, "consumedAmount": 6683.71779705207 }] }
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": 3973, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6461.202104668783, "batchSnBestBefore": 6053, "accountName": "accountName", "articleId": "articleId", "priceListId": 212, "purchasePrice": 2202.9586928702306, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 539, "checkoutDate": 5807, "price": 3321.704140436309, "comment": "comment", "id": 7941, "projectId": 3600, "checkoutAmount": 5490.661870157558, "events": [{ "date": 1758204607657, "amount": 1191.7989304180298, "type": "type" }], "checkinConsumeDate": 1758204607657, "checkinAmount": 8779.775652404662, "consumedAmount": 2327.325158800784 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 3635.207667504715, "articleName": "articleName", "pricelistId": 592, "endDate": 1758204607657, "rentalAmount": 5492.194364747008, "created": 1758204607657, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 1390, "price": 632.5684930510445, "isProcessed": false, "dataArticleId": 3347, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8032, "startDate": 1758204607657, "createdById": 75 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 989.4407913170056, "batchSnBestBefore": 7043, "accountName": "accountName", "articleId": "articleId", "priceListId": 5839, "purchasePrice": 8828.660301709755, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5700, "checkoutDate": 1861, "price": 165.7924698992097, "comment": "comment", "id": 8206, "projectId": 2970, "checkoutAmount": 2395.9735680775607, "events": [{ "date": 1758204607657, "amount": 552.8857434816103, "type": "type" }], "checkinConsumeDate": 1758204607657, "checkinAmount": 8760.282225046205, "consumedAmount": 933.7744057725816 }] }
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": 3809.7995547820997, "articleName": "articleName", "pricelistId": 9093, "endDate": 1758204607658, "rentalAmount": 4490.695671293058, "created": 1758204607658, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 337, "price": 309.2075379169301, "isProcessed": true, "dataArticleId": 27, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9573, "startDate": 1758204607658, "createdById": 2491 }], "freeTexts": [{}], "customerId": 2646, "type": "type", "projectId": 1068 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 8706.506020161512, "articleName": "articleName", "pricelistId": 115, "endDate": 1758204607658, "rentalAmount": 2800.3113968233706, "created": 1758204607658, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 3974, "price": 7570.60058044799, "isProcessed": true, "dataArticleId": 3516, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 8990, "startDate": 1758204607658, "createdById": 9440 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1993.787944772034, "batchSnBestBefore": 9765, "accountName": "accountName", "articleId": "articleId", "priceListId": 3366, "purchasePrice": 4031.282265650048, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 1485, "checkoutDate": 6417, "price": 6298.220977328873, "comment": "comment", "id": 3725, "projectId": 6676, "checkoutAmount": 9247.101375055783, "events": [{ "date": 1758204607658, "amount": 4257.649760587657, "type": "type" }], "checkinConsumeDate": 1758204607658, "checkinAmount": 1138.4898932322174, "consumedAmount": 8011.972749414522 }] }
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": 6522.206235140972, "created": 1488, "description": "description", "customerName": "customerName", "stockValue": 8570.112805493669, "name": "name", "customerId": 3350, "state": "0", "projectId": 3619, "responsibleUserId": 4850, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6292.669840985732, "batchSnBestBefore": 5229, "accountName": "accountName", "articleId": "articleId", "priceListId": 5210, "purchasePrice": 1153.562156565351, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 686, "checkoutDate": 9746, "price": 5902.223779249137, "comment": "comment", "id": 4747, "projectId": 6007, "checkoutAmount": 5905.732369741312, "events": [{ "date": 1758204607659, "amount": 7544.793527574376, "type": "type" }], "checkinConsumeDate": 1758204607659, "checkinAmount": 5061.970905637378, "consumedAmount": 8586.160563847823 }], "createdById": 1685, "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 |