POST
add_order
With this action you can add a new Shopgate order to your shop system. If there already is an order with the same number, the action must cancel and the error must be reported.
If you don’t use the Shopgate Cart Integration SDK you also have to call our Shopgate Merchant API method get_orders to get the order data.
Query parameters
Response
application/json
error
integer
False means no error.
error_text
string or null
Error text; null means no error.
shopgate_library_version
string
Shopgate Library version. Example: “2.5.0”
plugin_version
string
Plugin version. Example: “2.5.3”
trace_id
string
Request trace-ID, needed as reference for contact Example: “sma-4f99573d74ae1”
external_order_number
string
Order number in your shop system. Example: “458323452”
external_order_id
string
Order id in your shop system. Example: “26345”
Error Codes
Code | Description |
---|---|
2 | cannot open/create logfile(s) |
10 | invalid value in configuration |
11 | error reading or writing configuration |
20 | no action specified |
21 | unknown action requested |
22 | disabled action requested |
23 | wrong response format |
30 | parameter “order_number” missing |
60 | duplicate order |
62 | no customer group found for customer |
64 | order status is sent |
83 | database error |
84 | unknown country code |
85 | unknown state code |
100 | no connection to server |
101 | Unknown action |
102 | error code received from merchant API |
120 | authentication failed |
200 | the coupon is not valid |
201 | the coupon code is not valid |
202 | products for coupon are not valid |
203 | delivery address for coupon is not valid |
204 | user is not valid for coupon |
205 | too many coupons in cart |
999 | Unknown error |
Example
{
"error": 0,
"error_text": null,
"shopgate_library_version": "2.1.0",
"plugin_version": "2.1.0",
"trace_id": "sma-3995",
"external_order_id": "153003",
"external_order_number": "141"
}