Create Customer

From WMS Wiki
Jump to: navigation, search

Contents

URL

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

Description

Create a new customer in the system.

Request

  • authenticationToken [varchar] [required]
  • locationCode [varchar] [required]
  • locationName [varchar] [required]
  • phone [varchar]
  • fax [varchar]
  • website [varchar]
  • armelliniCode [varchar]
  • primeCode [varchar]
  • panatlanticCode [varchar]
  • contactName [varchar]
  • contactPhone [varchar]
  • email [varchar]
  • contactExt [varchar]
  • street [varchar] [required]
  • city [varchar] [required]
  • state [varchar] [required]
  • zipCode [varchar] [required]
  • country [varchar]
  • emailPod [int]: it must be 0(deactivated) or 1(activated).
  • emailShipment [int]: it must be 0(deactivated) or 1(activated).

Response

  • status [int]: returns 1 when the customer is successfully saved into the system.
  • customerId [int]: Customer Id.
  • 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/customer.put?authenticationToken=o814vor93b8ji40cd8ea9ostuu
&locationCode=XYZ
&locationName=Test
&phone=4452111
&fax=4452111
&website=http://www.google.com
&armelliniCode=MN8522
&primeCode=MJ966
&panatlanticCode=MN855
&contactName=Vertical Tech
&contactPhone=2685252
&email=noreply@vertical-tech.com
&contactExt=320
&street=Str 52 96-63
&city=Miami
&state=Florida
&zipCode=000000
&country=United States
&emailPod=0
&emailShipment=1

Response

Successful
     {"error":"","customerId":1234,"message":"Customer saved succesfully.","status":1}
Unsuccessful
     {"error":"Invalid Security Token.","message":"","status":0}
     {"error":"Company code is required.","message":"","status":0}
     {"error":"Company name is required.","message":"","status":0}
     {"error":"Street is required.","message":"","status":0}
     {"error":"City is required.","message":"","status":0}
     {"error":"State is required.","message":"","status":0}
     {"error":"Zip Code is required.","message":"","status":0}
     {"error":"Email is invalid.","message":"","status":0}
     {"error":"Customer code is duplicated.","message":"","status":0}     
     {"error":"Customer not saved.","message":"","status":0}


Available Methods

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox