Main Web API Documentation Information
|
|
Actual Page/Function Name:
|
addQuote |
Human Readable Name or Caption:
|
Add Quote |
Page/Function Description:
|
This method will add a new quote to the database. |
Page/Function Output Type:
|
API - JSON or WDDX |
Categories:
|
eComm,quote |
Extra Page/Function Notes:
|
A quote inside the system does not affect the actual inventory. It may be restored to the cart and then converted into an invoice. Another name for a quote is an order or an online eCommerce order where no payment is applied. |
Parameters
|
|||||||
Scope | Name | Type | Default | Description | Required | Alternates | Known Values |
Arguments | CORP_ID | Numeric | 0 | Pass in the corp id number. This is your corporation ID or your business world number. This is required and will be validated. The default is 0, but will be checked for a real number. | Yes | ||
Arguments | CUSTOMER_ID | Numeric | 1 | Pass in the customer id number. Pass in the value of 1 if it's a counter sale. Pass in the customer's id number if it's a customer quote. | Yes | ||
Arguments | EXTERNAL_PO_NUMBER | String | Pass in the external customer PO number. | No | |||
Arguments | INVOICE_NUMBER | Numeric | 0 | Pass in the invoice number that results from the quote. This helps show chains and what got converted into what. The default is 0 unless an actual invoice resulted from this quote. | No | ||
Arguments | INVOICE_TYPE_ID | Numeric | 0 | Pass in the invoice type id number. 2=Customer Invoice, 3=Counter Sale, 4=Rental Ticket, 5=Internal-Repair, 6=Transfer, 7=Quote, 8=Transition Invoice. As a side note, a valid customer id is needed for invoice types 2, 4, 7, and 8. | Yes | ||
Arguments | NOTES | String | Pass in the quote notes. This field accepts up to 255 characters. If additional notes are needed, you'll want to see Elements of Time. | No | |||
Arguments | OTHER_SALESPERSON_ID | Numeric | 1 | Pass in the other salesperson id number. This is actually a payee id number if there is a second salesperson or associate assigned to the ticket. If unknown, use 1. | Yes | ||
Arguments | OTHER_STORE_ID | Numeric | 1 | Pass in the other location id number. This is for transfers. The default is 1 unless an actual transfer invoice. | Yes | ||
Arguments | PRINTABLE_NOTES | String | Pass in the printable notes for the quote. This field accepts up to 255 characters. | No | |||
Arguments | QUOTE_AMOUNT | Numeric | 0 | Pass in the quote amount or invoice total. | Yes | ||
Arguments | QUOTE_CREATED_BY_ID | Numeric | 0 | Pass in the payee user id of the person who created the quote. This id number will be used for a history message of who added the record. If this is not passed in, it will default to whoever the main payee/user id is that is using the method. | Yes | ||
Arguments | QUOTE_DATE | String | Pass in the original quote date. If a date is not entered, the current date will be put in as the default. | Yes | |||
Arguments | QUOTE_DATE_TIME | String | Pass in the adjusted date/time stamp. If a date/time is not entered, the current date will be put in as the default. | Yes | |||
Arguments | SALESPERSON_ID | Numeric | 0 | Pass in the salesperson id number or main payee id number. | Yes | ||
Arguments | STOCK | Numeric | 0 | Pass in a stock number if applicable. Use 0 if not applicable. As a note, a stock unit is a big ticket item like a vehicle, trailer, house, gun, or some other serialized item. | No | ||
Arguments | STOCK_UNIT_LIST | String | Pass in a comma separated list of stock numbers if any. | No | |||
Arguments | STORE_ID | Numeric | 0 | Pass in the store or location id number. This value is corporation specific and can be looked up by going to the getGeneralLookupValues method. You'll be looking for the QRY_LOCATION_INFO_ARRAY data. This is a huge part of how we track quantities per location. If you have multiple locations, this is extremely important. | Yes |
Results
|
||||||||||||
RET_STATUS | RET_MAIN_MESSAGE | RET_SECOND_MESSAGE | Redirect Link | Description | ||||||||
ok | Successfully saved the quote in the database. | Where can we take you? [view new quote] [interactive map] [classic homepage] [start a new cart] [my quotes] [quote homepage] | This assumes that everything went well. | |||||||||
|
||||||||||||
dataIn | Unable to save the quote to the database. Missing some information. | Use your back button and try again. | This is returned if the corp id, customer id, invoice type id, other salesperson id, other store id, quote created by id, salesperson id, or store id arguments are not found. | |||||||||
dataIn2 | Unable to save the quote to the database. Missing the date/time information. | Use your back button and try again. | This is returned if the date is not valid. | |||||||||
db | Unable to connect to the database. The quote was not saved in the database. | Use your back button and try again. | This is returned if there was an error in inserting values such as corp id, customer id, external po number, invoice number, notes, quote amount, quote date, store id, etc. |
Samples
|
|
Caption | Text |
JSON |
{"API_CALL_FUNCTION_NAME":"addQuote","API_USER_PASSWORD":1234,"API_URL_ENCODING":"AUTO","QUOTE_DATE":"2015-03-24","API_INPUT_OUTPUT_TYPE":"JSON","CUSTOMER_ID":23169,"OTHER_SALESPERSON_ID":1,"SALESPERSON_ID":2,"CORP_ID":53,"INVOICE_NUMBER":0,"QUOTE_CREATED_BY_ID":2,"QUOTE_AMOUNT":123.45,"PRINTABLE_NOTES":"Printable notes","API_CURRENT_PAYEE_ID":3,"STOCK":0,"API_USER_NAME":"demo","QUOTE_DATE_TIME":"2015-03-24 11:54:00","INVOICE_TYPE_ID":3,"NOTES":"Notes","API_CORP_KEY_ID":"PLA-0053","STORE_ID":178,"STOCK_UNIT_LIST":"","EXTERNAL_PO_NUMBER":"","OTHER_STORE_ID":1}
|