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": 4578.973380952648, "articleName": "articleName", "pricelistId": 3859, "endDate": 1761864698170, "rentalAmount": 778.9537881878572, "created": 1761864698170, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 5833, "price": 864.0149977686873, "isProcessed": false, "dataArticleId": 1025, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3658, "startDate": 1761864698170, "createdById": 4691 }], "pages": 6972, "pageSize": 9217, "draftsCount": 9614, "page": 7508 }
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": 9110.931058073382, "articleName": "articleName", "pricelistId": 333, "endDate": 1761864698170, "rentalAmount": 6657.044792142818, "created": 1761864698170, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 3221, "price": 3287.497735798266, "isProcessed": true, "dataArticleId": 9107, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 6282, "startDate": 1761864698170, "createdById": 2052 }], "pages": 1208, "pageSize": 9431, "draftsCount": 5215, "page": 3389 }
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": 4174, "projects": [{ "createdByName": "createdByName", "cost": 9884.617639617716, "created": 9189, "description": "description", "customerName": "customerName", "stockValue": 2594.08927660287, "name": "name", "customerId": 6180, "state": "0", "projectId": 5826, "responsibleUserId": 2996, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5524.695660828655, "batchSnBestBefore": 7514, "accountName": "accountName", "articleId": "articleId", "priceListId": 4285, "purchasePrice": 3849.7116498872506, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6579, "checkoutDate": 7925, "price": 4420.302503132883, "comment": "comment", "id": 9301, "projectId": 4651, "checkoutAmount": 130.92454464710858, "events": [{ "date": 1761864698170, "amount": 9923.725782152138, "type": "type" }], "checkinConsumeDate": 1761864698170, "checkinAmount": 7481.659011942436, "consumedAmount": 992.3143236828746 }], "createdById": 8950, "responsibleUserName": "responsibleUserName" }], "pageSize": 3159, "page": 3283, "projectsCount": 3192 }
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": 5585.240825043791, "created": 1638, "description": "description", "customerName": "customerName", "stockValue": 9604.508592702041, "name": "name", "customerId": 5253, "state": "0", "projectId": 4604, "responsibleUserId": 7834, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8735.484358956606, "batchSnBestBefore": 1760, "accountName": "accountName", "articleId": "articleId", "priceListId": 4863, "purchasePrice": 9208.187747948756, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2389, "checkoutDate": 1055, "price": 8935.23847675428, "comment": "comment", "id": 5461, "projectId": 313, "checkoutAmount": 8337.489471704785, "events": [{ "date": 1761864698171, "amount": 7138.941936156825, "type": "type" }], "checkinConsumeDate": 1761864698171, "checkinAmount": 4258.2512541277465, "consumedAmount": 2982.892225432787 }], "createdById": 4565, "responsibleUserName": "responsibleUserName" }
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": 8685, "pageSize": 6020, "page": 3943, "projectsCount": 9219, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9685.425235503304, "batchSnBestBefore": 1633, "accountName": "accountName", "articleId": "articleId", "priceListId": 2370, "purchasePrice": 767.7580543003826, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 7819, "checkoutDate": 1445, "price": 8657.935017501906, "comment": "comment", "id": 2060, "projectId": 9589, "checkoutAmount": 2086.7568937273363, "events": [{ "date": 1761864698171, "amount": 2967.1793899942336, "type": "type" }], "checkinConsumeDate": 1761864698171, "checkinAmount": 3895.4676078632456, "consumedAmount": 9416.123594586874 }] }
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": 8784, "projects": [{ "createdByName": "createdByName", "cost": 714.079241781097, "created": 9578, "description": "description", "customerName": "customerName", "stockValue": 3045.7439528782584, "name": "name", "customerId": 6404, "state": "0", "projectId": 7246, "responsibleUserId": 2648, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5527.4912644751075, "batchSnBestBefore": 5527, "accountName": "accountName", "articleId": "articleId", "priceListId": 1688, "purchasePrice": 5017.76843921467, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6205, "checkoutDate": 9004, "price": 4634.535566795917, "comment": "comment", "id": 8426, "projectId": 8440, "checkoutAmount": 82.2836001407945, "events": [{ "date": 1761864698172, "amount": 3682.004853809948, "type": "type" }], "checkinConsumeDate": 1761864698172, "checkinAmount": 6842.12886127847, "consumedAmount": 754.6376249968156 }], "createdById": 7380, "responsibleUserName": "responsibleUserName" }], "pageSize": 1820, "page": 9328, "projectsCount": 1416 }
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": 9761.392129906464, "created": 2141, "description": "description", "customerName": "customerName", "stockValue": 1274.9263926300791, "name": "name", "customerId": 293, "state": "0", "responsibleUserId": 5456, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1324.607469185377, "batchSnBestBefore": 841, "accountName": "accountName", "articleId": "articleId", "priceListId": 7060, "purchasePrice": 9986.224466955182, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3892, "checkoutDate": 6853, "price": 3999.5663488552736, "comment": "comment", "id": 6693, "projectId": 1495, "checkoutAmount": 8713.91868367491, "events": [{ "date": 1761864698173, "amount": 1124.5510486233468, "type": "type" }], "checkinConsumeDate": 1761864698173, "checkinAmount": 7813.785867530781, "consumedAmount": 6400.415542356101 }], "createdById": 4640, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 8945.602544422663, "created": 8471, "description": "description", "customerName": "customerName", "stockValue": 4369.444640176181, "name": "name", "customerId": 620, "state": "0", "projectId": 1290, "responsibleUserId": 1377, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9579.165374350892, "batchSnBestBefore": 3379, "accountName": "accountName", "articleId": "articleId", "priceListId": 5042, "purchasePrice": 426.26459261531744, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6231, "checkoutDate": 5569, "price": 1146.5460219641798, "comment": "comment", "id": 5703, "projectId": 1720, "checkoutAmount": 6202.972996747903, "events": [{ "date": 1761864698173, "amount": 6793.544737454762, "type": "type" }], "checkinConsumeDate": 1761864698173, "checkinAmount": 5662.713282523785, "consumedAmount": 6058.865952594564 }], "createdById": 6563, "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": 6901}
Successfull response:
{ "createdByName": "createdByName", "cost": 9782.637320804053, "created": 9453, "description": "description", "customerName": "customerName", "stockValue": 6474.6473945867065, "name": "name", "customerId": 8689, "state": "0", "projectId": 9623, "responsibleUserId": 3387, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3590.308537677951, "batchSnBestBefore": 7754, "accountName": "accountName", "articleId": "articleId", "priceListId": 918, "purchasePrice": 3408.949900022373, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2599, "checkoutDate": 6725, "price": 181.84782170622915, "comment": "comment", "id": 1315, "projectId": 8304, "checkoutAmount": 9258.952643536466, "events": [{ "date": 1761864698173, "amount": 2579.457909584617, "type": "type" }], "checkinConsumeDate": 1761864698173, "checkinAmount": 4865.549901733179, "consumedAmount": 6980.210708209535 }], "createdById": 3560, "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": 3704.4666989826137, "batchSnBestBefore": 7688, "accountName": "accountName", "articleId": "articleId", "priceListId": 7863, "purchasePrice": 6168.211817580162, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 90, "checkoutDate": 4892, "price": 807.0314296735847, "comment": "comment", "id": 8368, "projectId": 707, "checkoutAmount": 1486.856095401825, "events": [{ "date": 1761864698173, "amount": 9861.14576566328, "type": "type" }], "checkinConsumeDate": 1761864698173, "checkinAmount": 1725.74496663104, "consumedAmount": 4594.546633448296 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 357.99500843893827, "batchSnBestBefore": 8458, "accountName": "accountName", "articleId": "articleId", "priceListId": 8836, "purchasePrice": 8717.162793784919, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 2322, "checkoutDate": 573, "price": 7926.003922912894, "comment": "comment", "id": 1369, "projectId": 7094, "checkoutAmount": 5361.744096210418, "events": [{ "date": 1761864698174, "amount": 4296.236360100499, "type": "type" }], "checkinConsumeDate": 1761864698174, "checkinAmount": 6062.712606948534, "consumedAmount": 6872.241806277377 }
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": 6945.847543324772, "created": 1116, "description": "description", "customerName": "customerName", "stockValue": 8385.529274093258, "name": "name", "customerId": 6877, "state": "0", "projectId": 6661, "responsibleUserId": 9190, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1100.734724648339, "batchSnBestBefore": 3846, "accountName": "accountName", "articleId": "articleId", "priceListId": 8463, "purchasePrice": 7269.714908836069, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5538, "checkoutDate": 8265, "price": 9083.428672796801, "comment": "comment", "id": 9946, "projectId": 9207, "checkoutAmount": 8507.469016573108, "events": [{ "date": 1761864698174, "amount": 1787.9675274152708, "type": "type" }], "checkinConsumeDate": 1761864698174, "checkinAmount": 3980.3437377974547, "consumedAmount": 9060.241029322418 }], "createdById": 9590, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 4106.130477065717, "created": 4128, "description": "description", "customerName": "customerName", "stockValue": 9096.511400513822, "name": "name", "customerId": 2713, "state": "0", "projectId": 5089, "responsibleUserId": 5975, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5702.89571683925, "batchSnBestBefore": 4666, "accountName": "accountName", "articleId": "articleId", "priceListId": 9801, "purchasePrice": 5083.151627816984, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4966, "checkoutDate": 707, "price": 2.7277907957268255, "comment": "comment", "id": 7517, "projectId": 7506, "checkoutAmount": 2071.448519229393, "events": [{ "date": 1761864698174, "amount": 7623.774331275606, "type": "type" }], "checkinConsumeDate": 1761864698174, "checkinAmount": 7788.963405450594, "consumedAmount": 73.81465517063978 }], "createdById": 9309, "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": 4500.487898556625, "batchSnBestBefore": 9399, "accountName": "accountName", "articleId": "articleId", "priceListId": 484, "purchasePrice": 3643.8163160239524, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 8377, "checkoutDate": 6138, "price": 2378.1195984829574, "comment": "comment", "id": 4944, "projectId": 8297, "checkoutAmount": 7918.390473129582, "events": [{ "date": 1761864698175, "amount": 3729.6225738950493, "type": "type" }], "checkinConsumeDate": 1761864698175, "checkinAmount": 3163.9732637882967, "consumedAmount": 6310.770530182302 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 4555.429570341425, "articleName": "articleName", "pricelistId": 3089, "endDate": 1761864698175, "rentalAmount": 9113.950460855798, "created": 1761864698175, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 772, "price": 8036.018623158484, "isProcessed": false, "dataArticleId": 9725, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 3305, "startDate": 1761864698175, "createdById": 725 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2770.6123788446457, "batchSnBestBefore": 2899, "accountName": "accountName", "articleId": "articleId", "priceListId": 644, "purchasePrice": 2682.279994435718, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8524, "checkoutDate": 6957, "price": 4759.405441369412, "comment": "comment", "id": 6082, "projectId": 6429, "checkoutAmount": 830.6390920785411, "events": [{ "date": 1761864698175, "amount": 2134.2167408032064, "type": "type" }], "checkinConsumeDate": 1761864698175, "checkinAmount": 9295.167848976533, "consumedAmount": 2283.5722903650767 }] }
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": 9270, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 1301.7816874211085, "batchSnBestBefore": 5207, "accountName": "accountName", "articleId": "articleId", "priceListId": 1097, "purchasePrice": 2371.0689351566716, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 1745, "checkoutDate": 7196, "price": 3301.3952295929894, "comment": "comment", "id": 4239, "projectId": 2157, "checkoutAmount": 5185.748673282835, "events": [{ "date": 1761864698175, "amount": 2385.142455460466, "type": "type" }], "checkinConsumeDate": 1761864698175, "checkinAmount": 6135.231320932568, "consumedAmount": 9680.943425846272 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 90.14069284666859, "articleName": "articleName", "pricelistId": 1778, "endDate": 1761864698175, "rentalAmount": 7309.014319390326, "created": 1761864698175, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 9131, "price": 1486.8258998203753, "isProcessed": false, "dataArticleId": 6085, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 909, "startDate": 1761864698175, "createdById": 7929 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8158.283536556398, "batchSnBestBefore": 1711, "accountName": "accountName", "articleId": "articleId", "priceListId": 1318, "purchasePrice": 8141.360470539096, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3221, "checkoutDate": 4114, "price": 3939.207695014535, "comment": "comment", "id": 3342, "projectId": 9129, "checkoutAmount": 2654.1057529731593, "events": [{ "date": 1761864698175, "amount": 8082.665261086434, "type": "type" }], "checkinConsumeDate": 1761864698175, "checkinAmount": 5597.737651063531, "consumedAmount": 8636.594787945118 }] }
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": 563.4028235605537, "articleName": "articleName", "pricelistId": 9804, "endDate": 1761864698176, "rentalAmount": 9513.694400443097, "created": 1761864698176, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 2297, "price": 8322.41102956876, "isProcessed": true, "dataArticleId": 9638, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9083, "startDate": 1761864698176, "createdById": 4004 }], "freeTexts": [{}], "customerId": 6583, "type": "type", "projectId": 449 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 589.8049787677506, "articleName": "articleName", "pricelistId": 325, "endDate": 1761864698176, "rentalAmount": 783.2173759856154, "created": 1761864698176, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 2557, "price": 6558.383095220279, "isProcessed": true, "dataArticleId": 4723, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 415, "startDate": 1761864698176, "createdById": 3517 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 6015.527504008666, "batchSnBestBefore": 9573, "accountName": "accountName", "articleId": "articleId", "priceListId": 9431, "purchasePrice": 256.3627480745201, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 4836, "checkoutDate": 9026, "price": 1099.5633910054137, "comment": "comment", "id": 3056, "projectId": 1989, "checkoutAmount": 9826.565715626073, "events": [{ "date": 1761864698176, "amount": 9583.214618943557, "type": "type" }], "checkinConsumeDate": 1761864698176, "checkinAmount": 5467.126459971156, "consumedAmount": 4695.038088702382 }] }
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": 7019.8434407324385, "created": 2093, "description": "description", "customerName": "customerName", "stockValue": 3852.2430959243925, "name": "name", "customerId": 7115, "state": "0", "projectId": 5419, "responsibleUserId": 6453, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 844.3481041237544, "batchSnBestBefore": 7744, "accountName": "accountName", "articleId": "articleId", "priceListId": 919, "purchasePrice": 5063.356672861252, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3021, "checkoutDate": 9263, "price": 421.1925565482988, "comment": "comment", "id": 193, "projectId": 9913, "checkoutAmount": 584.6076657472598, "events": [{ "date": 1761864698176, "amount": 9431.514222429556, "type": "type" }], "checkinConsumeDate": 1761864698176, "checkinAmount": 7468.879150174692, "consumedAmount": 1330.8435138461105 }], "createdById": 2490, "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 |