Create Grower

From WMS Wiki
Jump to: navigation, search

Contents

URL

http://<wms-url>/api/grower.put

Description

Create a grower into system.

Request

  • authenticationToken [varchar] [required]
  • growerCode [varchar] [required]
  • growerName [varchar] [required]
  • shipperCode [varchar] [required]

Response

  • status [int]: returns 1 when the grower is successfully saved into the system.
  • message [varchar]: description of the result.
  • error [varchar]: error message returned when status is 0. It can be "Invalid Security Token" if token is invalid, if someone of the parameters is not valid or if some error occurs in the process.

Example

Request

http://<wms-url>/api/grower.put?authenticationToken=o814vor93b8ji40cd8ea9ostuu
&growerCode=XYZ
&growerName=Test
&shipperCode=KMH

Response

Successful
     {"error":"","message":"Grower saved succesfully.","status":1}
Unsuccessful
     {"error":"Invalid Security Token.","message":"","status":0}
     {"error":"Grower code is required.","message":"","status":0}
     {"error":"Grower name is required.","message":"","status":0}
     {"error":"Shipper code is required.","message":"","status":0}
     {"error":"Shipper code does not exist.","message":"","status":0}
     {"error":"Grower code is duplicated.","message":"","status":0}     
     {"error":"Grower not saved.","message":"","status":0}


Available Methods

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox