Grower List

From WMS Wiki
Jump to: navigation, search

Contents

URL

http://<wms-url>/api/growers.list

Description

Returns the list of growers that are associated with the API user.

Request

  • authenticationToken [varchar]

Response

  • status [int]: returns 1 when successful and 0 when unsuccessful.
  • error [varchar]: returns "Invalid Security Token" if status is 0.
  • customers [array]: returns an array with the customer id, name and code.
    • growerId [int]
    • growerName [varchar]
    • growerCode [varchar]
    • shipperName [varchar]
    • shipperCode [varchar]

Example

Request

     http://<wms-url>/api/customers.list?authenticationToken=rl52rgk7o2sa8njg9i0ttgsepl

Response

Successful
  1. {
  2.     "growers": [
  3.         {
  4.             "growerId": 1,
  5.             "growerName": "Grower 001",
  6.             "growerCode": "VT001",
  7.             "shipperName": "Test 1",
  8.             "shipperCode": "TEST1"
  9.         },
  10.         {
  11.             "growerId": 2,
  12.             "growerName": "Grower 002",
  13.             "growerCode": "VT002",
  14.             "shipperName": "Test 2",
  15.             "shipperCode": "TEST2"
  16.         },
  17.         {
  18.             "growerId": 3,
  19.             "growerName": "Grower 003",
  20.             "growerCode": "VT003",
  21.             "shipperName": "Test 3",
  22.             "shipperCode": "TEST3"
  23.         }
  24.     ],
  25.     "status": 1
  26. }

Bulb.png Your user must be associated with growers in the WMS. If you don't get any growers then check with a WMS admin.

Unsuccessful
     {"error":"Invalid Security Token.","status":0}


Available Methods

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox