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

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:


   {

      "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": "",

      "Warehouse": "W1",

      "MinStock": "10",

      "MaxStock": "100",

      "UnitCost": "2"

}


 

This method allows to create a part of the service type according to the filled in parameters:

i.PartKey: The part of the service type's key. This field is mandatory.

ii.Description: Short description of the service. This field is mandatory.

iii.ComplementaryDescription: Full description.

iv.Keyword: Short description of the service.

v.Barcode: The service tag.

vi.Picture: The service image. 

vii.Remarks: Location observation.

viii.Family: The family's key.

ix.Brand: The brand's key.

x.BrandModel: The model's key.

xi.BaseUnit: The base unit key. This field is mandatory.

xii.Supplier: The supplier key.

xiii.PartType: When creating a part of the service type, this field is filled in with "2". If you insert 1, a part of the part type without inventory extension will be created. This field is mandatory.

When this method is executed successfully, it returns HttpStatusCode.201 Created

 

Using this method, parts of the type 1 can be created. Parts of the type 2. Service. However, when creating parts of the type 1, this method does not create parts with inventory extension. To create a part with inventory extension, please see the article "webapi - Creating a part with inventory extension".



    • Related Articles

    • 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 - Creating a requisition type

      This method allows creating a type of requisition in a simplified manner. The method to be used to create a requisition type is: POST url/api/mytenant/myorganization/requisitionscore/requisitiontypes Json example for creating a type of requisition:  ...
    • WebAPI – How do I create work orders?

      This method offers a simple way of creating a Work Order for a specific Asset, Location, Tool or Route. The method to be used to create a work order is: POST /api/mytenant/myorganization/maintenance/workorders/newWorkOrderInfo Json example to create ...
    • 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 ...