Webapi - How to create a part with inventory extension?

Web API - How to create a part with inventory extension?

This method allows to create a part of the Part type with inventory extension in a simplified manner.

The method to be used when creating a part with inventory extension is: 

POST url/api/mytenant/myorganization/inventorycore/inventoryparts

 

Json example to create a part of the part type with inventory extension:

  1. {  
        "partKey": "P_024",
        "Description": "Peca 024",
        "ComplementaryDescription": "peca do postman 024",
        "Keyword": "P024",
        "Barcode": "P024",
        "Family": "OL",
        "Brand": "M",
        "BrandModel": "BM",
        "PartType": 1,
        "BaseUnit": "UN",
        "Supplier" : "FA_0022",
        "Remarks": "Peça importada postman",
        "PartSubType": "",
        "MinStock": "10",
        "MaxStock": "100",
        "UnitCost": "2",
        "DefaultWarehouse": "W1",
        "InventoryPartWarehouses": [
          {
                "Warehouse": "W1",
                "MaxStock": 100
          },
          {
                "Warehouse": "W2",
                "MinStock": 10,
                "MaxStock": 200,
                "ManagedExternally": 1
          }
        ]
    }


This method allows to create a part with inventory extension according to the filled in parameters:

  1. PartKey: The parts' key. This field is mandatory.
  2. Description: Short description of the part. This field is mandatory.
  3. ComplementaryDescription: Full description.
  4. Keyword: Short description of the part.
  5. Barcode: The part tag.
  6. Family: The family's key.
  7. Brand: The brand's key.
  8. BrandModel: The model's key.
  9. PartType: When creating a part of the part type, this field is filled in with "1".  This field is mandatory.
  10. BaseUnit: The base unit key. This field is mandatory.
  11. Supplier: The supplier key.
  12. Picture: The parts' image. 
  13. Remarks: Location observation.
  14. PartSubType: The key of the part subtype.
  15. BaseUnit: The base unit key. This field is mandatory.
  16. DefaultWarehouse: The default warehouse key. This field is mandatory.
  17. MinStock: The minimum stock value.
  18. MaxStock: The maximum stock value.
  19. UnitCost: Unitary price value.
  20. InventoryPartWarehouses: Warehouses where the Part may have inventory.
    1. Warehouse: Warehouse key.
    2. ManagedExternally: Boolean field indicating whether the Warehouse is managed externally.
    3. UnitCost: Unit cost value of the Part in the Warehouse.
    4. MinStock: Reference value as minimum stock in the Warehouse.
    5. MaxStock: Reference value for maximum stock in the warehouse.
When this method is executed successfully, it returns HttpStatusCode.200 OK

    • Related Articles

    • Webapi - How to create a part of the service type?

      This method allows to create a part of the service type in a simplified manner. The method to be used to create a part of the service type is: POST url/api/mytenant/myorganization/businesscore/parts Json example to create a part of the service type: ...
    • WebAPI - How to create a tool?

      This method allows to create a tool in a simplified manner. The method to be used when creating a tool is: POST url/api/mytenant/myorganization/assetmanagementcore/equipmentItems Json example for creating a tool: 1. { "equipmentKey": "PCR", ...
    • WebAPI - Changing a part or service attribute

      This method allows to change a part or service field.   The method to be used to change a part or service attribute is:    PUT  {{url}/api/{{tenant}}/{{organization}}/businesscore/parts/{{partKey}}/{{atributo}}   The parameters on the method are the ...
    • WebAPI - Deleting a part or service

      This method allows to delete a part or service. The method to be used when deleting a part or service is: DELETE  url/api/mytenant/myorganization/businesscore/parts/{{partKey}} The parameters being replaced on the method are: partKey: key of the part ...
    • Webapi - Deleting a part or service

      This method allows to delete a part or service.   The method to be used when deleting a part or service is:   DELETE  url/api/mytenant/myorganization/businesscore/parts/{{partKey}}   The parameters being replaced on the method are: partKey: key of ...