Add or Edit an Order
This API call let's you add or edit an order. The response is an XML of the add/edit order action.
Request Fields
Field Name | Type | Required | Description |
---|---|---|---|
action | String | Yes | orderEdit |
accountId | Integer | Yes | The Helcim Commerce account ID. |
apiToken | String | Yes | API token used for authentication and access control. |
orderNumber | String | No | The order number. If it's entered then you are editing an order. If it is not entered then you are adding a new order. |
dateIssed | String | No | The date the order was issued. |
datePaid | String | No | The date the order was paid. |
currency | String | No | The currency of the order's price. |
status | String | No | Due, paid, shipped, completed, refunded, cancelled. |
paymentTerms | Integer | No | The number of days the customer has to pay for the order. |
comments | String | No | Comments about the order. |
customerCode | String | No | The customer code. |
billing_contactName | String | No | The the billing address contact name. |
billing_businessName | String | No | The billing address business name. |
billing_street1 | String | No | The billing street address. |
billing_street2 | String | No | The billing street address. |
billing_city | String | No | The billing city. |
billing_province | String | No | The billing province. |
billing_country | String | No | The billing country. |
billing_postalCode | String | No | The billing postal code. |
billing_phone | String | No | The billing phone number. |
billing_fax | String | No | The billing fax number |
billing_email | String | No | The billing email. |
shipping_contactName | String | No | The shipping contact name. |
shipping_businessName | String | No | The shipping business name. |
shipping_street1 | String | No | The shipping street address. |
shipping_street2 | String | No | The shipping street address. |
shipping_city | String | No | The shipping city. |
shipping_province | String | No | The shipping province. |
shipping_country | String | No | The shipping country. |
shipping_postalCode | String | No | The shipping postal code. |
shipping_phone | String | No | The shipping phone number. |
shipping_fax | String | No | The shipping fax number. |
shipping_email | String | No | The shipping email address. |
amount | Decimal | No | Amount to process. Must include two decimal places, and must NOT include $. |
amountShipping | Decimal | No | The shipping cost. |
amountTax | Decimal | No | The tax. |
amountTip | Decimal | No | The tip. |
amountDiscount | Decimal | No | The discount. |
shippingMethod | String | No | The method of shipping. |
taxDetails | String | No | Information about the applicable taxes. |
discountDetails | String | No | Information about the applicable discounts. |
itemSKU# | Integer | No | The sku. |
itemDescription# | String | No | The item description. |
itemSerialNumber# | String | No | The item serial number. |
itemQuantity# | Decimal | No | Item quantity, must be at least one for item to be added. |
itemPrice# | Decimal | No | The item price. |
itemTotal# | Decimal | No | The item price x the quantity. |
Order Information NOTICE: For all item variables replace "#" with a unique item number (starting at 1, and increasing by 1 for each unique item added).
Response Fields (XML)
Field Name | Type | Description |
---|---|---|
message | - | XML structure |
response | Integer | 1 or 0. Whether the order was added/edited or not. |
responseMessage | String | Confirmation of completed action. |
order | - | XML structure |
orderNumber | String | The order number. |
token | String | The order token. |
amount | Decimal | Amount to process. Must include two decimal places, and must NOT include $. |
currency | String | The currency of the order's price. |
status | String | The status of the order (paid/unpaid). |
dateCreated | String | The date the order was created. |
dateIssued | String | The date the order was issued. |
datePaid | String | The date the order was paid. |
Errors
For all API requests, there are also generic API authentication and user access restriction errors.
Response Code | Error Code | Message | Description |
---|---|---|---|
0 | - | Invalid Order Number | The order number is invalid. |
0 | - | Failed Saving Order | The order was not saved. |
0 | - | Invalid API Token1 | The API Token is invalid, or not entered. |
0 | - | Missing or Invalid Fields - Account ID | The Account ID is invalid, or not entered. |