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": 23.868677413032557, "articleName": "articleName", "pricelistId": 2008, "endDate": 1767114890949, "rentalAmount": 1943.80073732472, "created": 1767114890949, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 6974, "price": 4136.725385789883, "isProcessed": true, "dataArticleId": 8169, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 125, "startDate": 1767114890949, "createdById": 5614 }], "pages": 2377, "pageSize": 3378, "draftsCount": 9629, "page": 2676 }
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": 3442.033692856915, "created": 240, "description": "description", "customerName": "customerName", "stockValue": 1473.2544046961382, "name": "name", "customerId": 2952, "state": "0", "projectId": 8250, "responsibleUserId": 4251, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8511.806607239007, "batchSnBestBefore": 8627, "accountName": "accountName", "articleId": "articleId", "priceListId": 3239, "purchasePrice": 7231.401693230601, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8293, "checkoutDate": 7040, "price": 2597.821321784922, "comment": "comment", "id": 971, "projectId": 8609, "checkoutAmount": 5848.852935207206, "events": [{ "date": 1767114890949, "amount": 9075.911516495957, "type": "type" }], "checkinConsumeDate": 1767114890949, "checkinAmount": 5621.050036361132, "consumedAmount": 5805.353962629748 }], "createdById": 3612, "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": 4582, "projects": [{ "createdByName": "createdByName", "cost": 2992.0667547451794, "created": 1373, "description": "description", "customerName": "customerName", "stockValue": 4393.599045409875, "name": "name", "customerId": 5964, "state": "0", "projectId": 4277, "responsibleUserId": 9810, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7441.144099846931, "batchSnBestBefore": 2494, "accountName": "accountName", "articleId": "articleId", "priceListId": 1108, "purchasePrice": 5552.7191406870825, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4869, "checkoutDate": 9074, "price": 2950.4774717812998, "comment": "comment", "id": 906, "projectId": 3231, "checkoutAmount": 7408.400857991602, "events": [{ "date": 1767114890949, "amount": 3469.2177013409987, "type": "type" }], "checkinConsumeDate": 1767114890949, "checkinAmount": 8230.84588270405, "consumedAmount": 6856.191095260341 }], "createdById": 8048, "responsibleUserName": "responsibleUserName" }], "pageSize": 6808, "page": 697, "projectsCount": 4130 }
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": 8458, "projects": [{ "createdByName": "createdByName", "cost": 641.5882624711567, "created": 5148, "description": "description", "customerName": "customerName", "stockValue": 8260.251892203141, "name": "name", "customerId": 744, "state": "0", "projectId": 8676, "responsibleUserId": 2506, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3321.7786076023312, "batchSnBestBefore": 3657, "accountName": "accountName", "articleId": "articleId", "priceListId": 9661, "purchasePrice": 9027.48598634357, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 757, "checkoutDate": 5182, "price": 6814.629086272424, "comment": "comment", "id": 3228, "projectId": 8374, "checkoutAmount": 533.4489451886459, "events": [{ "date": 1767114890950, "amount": 9454.28137418807, "type": "type" }], "checkinConsumeDate": 1767114890950, "checkinAmount": 2924.610325971053, "consumedAmount": 3882.692559291867 }], "createdById": 549, "responsibleUserName": "responsibleUserName" }], "pageSize": 4813, "page": 2164, "projectsCount": 2777 }
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": 4166, "pageSize": 834, "page": 592, "projectsCount": 2650, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9552.281200312476, "batchSnBestBefore": 536, "accountName": "accountName", "articleId": "articleId", "priceListId": 4396, "purchasePrice": 1653.9002753903465, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5580, "checkoutDate": 8246, "price": 9897.95735184219, "comment": "comment", "id": 1439, "projectId": 6050, "checkoutAmount": 6101.318659483694, "events": [{ "date": 1767114890950, "amount": 3289.8968293225817, "type": "type" }], "checkinConsumeDate": 1767114890950, "checkinAmount": 1617.9761775241775, "consumedAmount": 2137.8365625128527 }] }
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": 1025.2686977691872, "articleName": "articleName", "pricelistId": 3606, "endDate": 1767114890951, "rentalAmount": 4517.90765203274, "created": 1767114890951, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 1401, "price": 5052.650829680413, "isProcessed": false, "dataArticleId": 8577, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9384, "startDate": 1767114890951, "createdById": 9217 }], "pages": 4992, "pageSize": 8200, "draftsCount": 8778, "page": 8478 }
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": 4139.982776051878, "created": 1286, "description": "description", "customerName": "customerName", "stockValue": 9558.093699101226, "name": "name", "customerId": 930, "state": "0", "responsibleUserId": 7974, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8987.479364397703, "batchSnBestBefore": 6188, "accountName": "accountName", "articleId": "articleId", "priceListId": 2940, "purchasePrice": 240.25646473257223, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 4972, "checkoutDate": 3895, "price": 4463.2170514766585, "comment": "comment", "id": 5380, "projectId": 8840, "checkoutAmount": 5216.347760437449, "events": [{ "date": 1767114890951, "amount": 6856.962436239012, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 3282.056564452593, "consumedAmount": 4412.278888787308 }], "createdById": 3922, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 3936.0084105321102, "created": 1309, "description": "description", "customerName": "customerName", "stockValue": 91.94689750719465, "name": "name", "customerId": 8134, "state": "0", "projectId": 8866, "responsibleUserId": 2909, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7849.057759481849, "batchSnBestBefore": 4476, "accountName": "accountName", "articleId": "articleId", "priceListId": 8817, "purchasePrice": 9968.477843428167, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 423, "checkoutDate": 5488, "price": 5940.649956363112, "comment": "comment", "id": 3371, "projectId": 4939, "checkoutAmount": 9329.48385644902, "events": [{ "date": 1767114890951, "amount": 8425.588704249885, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 967.3621134371047, "consumedAmount": 4371.184239604861 }], "createdById": 9190, "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": 8906}
Successfull response:
{ "createdByName": "createdByName", "cost": 603.9536298572701, "created": 452, "description": "description", "customerName": "customerName", "stockValue": 8516.211881026846, "name": "name", "customerId": 2953, "state": "0", "projectId": 897, "responsibleUserId": 1711, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2176.2883919688147, "batchSnBestBefore": 9223, "accountName": "accountName", "articleId": "articleId", "priceListId": 2833, "purchasePrice": 7102.344432318615, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3189, "checkoutDate": 2366, "price": 6163.664297191539, "comment": "comment", "id": 873, "projectId": 2329, "checkoutAmount": 5584.841241720024, "events": [{ "date": 1767114890951, "amount": 5446.451222361373, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 1111.454247007142, "consumedAmount": 7904.346358620358 }], "createdById": 7544, "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": 2506.412677624724, "batchSnBestBefore": 5844, "accountName": "accountName", "articleId": "articleId", "priceListId": 1491, "purchasePrice": 4619.125866288937, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3471, "checkoutDate": 3722, "price": 8689.508581931319, "comment": "comment", "id": 95, "projectId": 3889, "checkoutAmount": 2808.534688781188, "events": [{ "date": 1767114890951, "amount": 879.3991097253462, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 9796.799207191218, "consumedAmount": 474.53882571066976 }
Successfull response:
{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 9306.936313650855, "batchSnBestBefore": 830, "accountName": "accountName", "articleId": "articleId", "priceListId": 3912, "purchasePrice": 2287.704871064077, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 9545, "checkoutDate": 8218, "price": 961.8525588787652, "comment": "comment", "id": 6647, "projectId": 996, "checkoutAmount": 8950.459297804155, "events": [{ "date": 1767114890951, "amount": 4289.379666807539, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 5332.398718410819, "consumedAmount": 4263.8321640501645 }
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": 4291.272827851231, "created": 7444, "description": "description", "customerName": "customerName", "stockValue": 8473.148539364625, "name": "name", "customerId": 3280, "state": "0", "projectId": 9931, "responsibleUserId": 5239, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 4694.661334530369, "batchSnBestBefore": 1373, "accountName": "accountName", "articleId": "articleId", "priceListId": 4476, "purchasePrice": 9150.21322625995, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8329, "checkoutDate": 3576, "price": 2598.036620124915, "comment": "comment", "id": 2373, "projectId": 1096, "checkoutAmount": 1130.6402023585404, "events": [{ "date": 1767114890951, "amount": 6891.197867470665, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 918.8094193779906, "consumedAmount": 1949.5361170490899 }], "createdById": 5256, "responsibleUserName": "responsibleUserName" }
Successfull response:
{ "createdByName": "createdByName", "cost": 3443.7587375579506, "created": 9479, "description": "description", "customerName": "customerName", "stockValue": 8260.68454267333, "name": "name", "customerId": 6470, "state": "0", "projectId": 9565, "responsibleUserId": 7598, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 8182.944303517847, "batchSnBestBefore": 78, "accountName": "accountName", "articleId": "articleId", "priceListId": 3196, "purchasePrice": 3973.0171461415307, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 5817, "checkoutDate": 121, "price": 581.4702421307283, "comment": "comment", "id": 9420, "projectId": 1739, "checkoutAmount": 6419.58173236947, "events": [{ "date": 1767114890951, "amount": 1392.785749882688, "type": "type" }], "checkinConsumeDate": 1767114890951, "checkinAmount": 3676.0782147803116, "consumedAmount": 9878.246211591402 }], "createdById": 5173, "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": 4453.921031616437, "batchSnBestBefore": 4729, "accountName": "accountName", "articleId": "articleId", "priceListId": 4044, "purchasePrice": 95.43489079242518, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 8480, "checkoutDate": 942, "price": 8121.41166163509, "comment": "comment", "id": 5778, "projectId": 4061, "checkoutAmount": 4908.1773330546375, "events": [{ "date": 1767114890952, "amount": 7892.955565011389, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 8764.732511856542, "consumedAmount": 1885.5480119051049 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 2232.345399948226, "articleName": "articleName", "pricelistId": 548, "endDate": 1767114890952, "rentalAmount": 9285.981254836284, "created": 1767114890952, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 2390, "price": 8693.403595774622, "isProcessed": true, "dataArticleId": 7677, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 594, "startDate": 1767114890952, "createdById": 5057 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2191.8418109969098, "batchSnBestBefore": 1050, "accountName": "accountName", "articleId": "articleId", "priceListId": 4614, "purchasePrice": 4332.315444352024, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 5889, "checkoutDate": 5772, "price": 6201.929011250256, "comment": "comment", "id": 2217, "projectId": 2050, "checkoutAmount": 4528.171099675493, "events": [{ "date": 1767114890952, "amount": 7606.170063887195, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 4220.214461143913, "consumedAmount": 9054.931113678576 }] }
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": 4222, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 2047.7781422503283, "batchSnBestBefore": 9784, "accountName": "accountName", "articleId": "articleId", "priceListId": 29, "purchasePrice": 8384.487338520748, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 3144, "checkoutDate": 4083, "price": 9244.201679136704, "comment": "comment", "id": 9032, "projectId": 5921, "checkoutAmount": 7329.6110559957815, "events": [{ "date": 1767114890952, "amount": 126.48580668331854, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 4693.815477924991, "consumedAmount": 9744.435565017979 }] }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 1559.6882534338674, "articleName": "articleName", "pricelistId": 4646, "endDate": 1767114890952, "rentalAmount": 2741.482473521618, "created": 1767114890952, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 8144, "price": 6351.4364298000755, "isProcessed": true, "dataArticleId": 770, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 9988, "startDate": 1767114890952, "createdById": 4635 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 7349.8584548722365, "batchSnBestBefore": 3347, "accountName": "accountName", "articleId": "articleId", "priceListId": 7470, "purchasePrice": 8415.010199870743, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 3127, "checkoutDate": 5647, "price": 1094.518137940801, "comment": "comment", "id": 9265, "projectId": 2451, "checkoutAmount": 9805.18593437129, "events": [{ "date": 1767114890952, "amount": 3077.8452684928493, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 1973.1255095651968, "consumedAmount": 3572.5594481121693 }] }
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": 2430.158955232846, "articleName": "articleName", "pricelistId": 3708, "endDate": 1767114890952, "rentalAmount": 914.8016232563472, "created": 1767114890952, "dataType": "dataType", "articleId": "articleId", "isInvoiced": false, "rentalCurrency": "rentalCurrency", "dataId": 7260, "price": 5269.80689555219, "isProcessed": true, "dataArticleId": 9330, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 4996, "startDate": 1767114890952, "createdById": 3578 }], "freeTexts": [{}], "customerId": 381, "type": "type", "projectId": 8023 }
Successfull response:
{ "invoiceDrafts": [{ "createdByName": "createdByName", "amount": 4100.934432448525, "articleName": "articleName", "pricelistId": 9460, "endDate": 1767114890952, "rentalAmount": 4803.271045945291, "created": 1767114890952, "dataType": "dataType", "articleId": "articleId", "isInvoiced": true, "rentalCurrency": "rentalCurrency", "dataId": 1585, "price": 7823.659251185737, "isProcessed": true, "dataArticleId": 5770, "currency": "currency", "comment": "comment", "invoiceId": "invoiceId", "id": 1697, "startDate": 1767114890952, "createdById": 8248 }], "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 5358.0747951229105, "batchSnBestBefore": 6777, "accountName": "accountName", "articleId": "articleId", "priceListId": 1509, "purchasePrice": 7389.6470352173, "batchId": "batchId", "rental": true, "rentalCurrency": "rentalCurrency", "accountId": 6104, "checkoutDate": 2107, "price": 8429.989932915136, "comment": "comment", "id": 9752, "projectId": 6114, "checkoutAmount": 4634.135192323838, "events": [{ "date": 1767114890952, "amount": 7963.707126918915, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 1889.4108626735906, "consumedAmount": 4631.8796902842805 }] }
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": 2329.3377952472847, "created": 6969, "description": "description", "customerName": "customerName", "stockValue": 4444.845505989378, "name": "name", "customerId": 6397, "state": "0", "projectId": 133, "responsibleUserId": 1321, "articles": [{ "articleName": "articleName", "snId": "snId", "invoicedAmount": 3622.6519403512234, "batchSnBestBefore": 9493, "accountName": "accountName", "articleId": "articleId", "priceListId": 3973, "purchasePrice": 1770.025605886435, "batchId": "batchId", "rental": false, "rentalCurrency": "rentalCurrency", "accountId": 2029, "checkoutDate": 7615, "price": 4198.253657374283, "comment": "comment", "id": 7834, "projectId": 516, "checkoutAmount": 7840.133604837422, "events": [{ "date": 1767114890952, "amount": 6198.0620195628035, "type": "type" }], "checkinConsumeDate": 1767114890952, "checkinAmount": 8360.751481281488, "consumedAmount": 7830.717434018843 }], "createdById": 2360, "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 |