Item planning purchase
Endpoints
Create new item planning purchase
| /companies/{companycode}/item-planning-purchases | 
Parameters
| Type | Name | Description | Schema | Business Rules | 
|---|---|---|---|---|
| Path | companyCode | Current context company code | string | 2 characters max | 
| Body | body | 
Get entity list
| /companies/{companycode}/item-planning-purchases | 
Parameters
| Type | Name | Description | Schema | Business Rules | 
|---|---|---|---|---|
| Path | companyCode | Current context company code | string | 2 characters max | 
| Query | page | Page index | integer (int32) | |
| Query | size | Entity count per page | integer (int32) | 
Responses
| HTTP Code | Description | Schema | 
|---|---|---|
| 200 | Successfull | < Item > array | 
| 400 | Functionnal error | No Content | 
| 500 | Internal server error | No Content | 
Import entity list
| /companies/{companycode}/item-planning-purchases/import | 
Parameters
| Type | Name | Description | Schema | Business Rules | 
|---|---|---|---|---|
| Path | companyCode | Current context company code | string | 2 characters max | 
| Body | body | 
Data structure
ImportItemPlanningPurchaseList
| Name | Value | 
|---|---|
| callback | string | 
| data | ItemPlanningPurchase list | 
| parameters | 
ItemPlanningPurchase
Item planning purchase data structure.
| Name | Description | Value | Business Rules | 
|---|---|---|---|
| companyCode | Current company code | string | 2 characters max | 
| depositCode | Deposit code | string | 10 characters max | 
| establishmentCode | Current establishment code | string | 2 characters max | 
| itemCode | Item code | string | 20 characters max | 
| parameterCode | Parameter code | string | (MINIMUM_REPLENISHMENT, MAXIMUM_REPLENISHMENT, MULTIPLE_REPLENISHMENT, REPLENISHMENT_PERIOD, REPLENISHMENT_DELAY) | 
| parameterUnit | Parameter unit | string | Within (DAY, WEEK) if parameterCode = REPLENISHMENT_PERIOD Within (DAY, WEEK, WORKING_DAY) if parameterCode = REPLENISHMENT_DELAY | 
| parameterValue | Parameter value | double | 
ItemPlanningPurchaseParameters
Item planning purchase parameters structure.
| Even if parameters are optional and empty, its should be send in request | 
| Name | Description | Value | Business Rules | 
|---|---|---|---|
| establishmentCode | Establishment code | string | 2 characters max | 
| depositCodes | List of deposit codes | list | 10 characters max | 
| parameterTypes | List of parameter types | list (MINIMUM_REPLENISHMENT, MAXIMUM_REPLENISHMENT, MULTIPLE_REPLENISHMENT, REPLENISHMENT_PERIOD, REPLENISHMENT_DELAY) | 
Example of JSON that can be send:
{
    "data": [
        {
            "companyCode": "cCode",
            "establishmentCode": "01",
            "itemCode": "itemCode1",
            "parameterCode": "MINIMUM_REPLENISHMENT",
            "parameterUnit": "KG",
            "parameterValue": 1000
        }
    ],
    "parameters": {
        "establishmentCode": "01",
        "depositCodes": [],
        "parameterTypes" : []
    }
}