Orders API RESTful v2
Please note:
It is your responsibility to properly set up all translation features, perform testing, and request support from ShipEdge in a timely manner. It is your responsibility to test and verify the integration between ShipEdge and any 3rd party selling channel. We strongly recommend frequent testing of any integration, specially when changes occur on your selling channel (e.g. SKU renaming, shipping method variations, permissions and credentials). ShipEdge is not responsible for translation issues, omitted orders, or any other issues related to communication with any 3rd party selling channel. Support for channel automation requires at least 24 hours for investigation before any action can be taken (hourly development charges may apply). The warehouse is not responsible for any omission, duplication or error in your orders coming through this system, and you agree not to get the warehouse involved in integration issues, nor will they make any exception or procedure changes due to the use of this feature.
Base
- http://<integration>.shipedge.com/API/Rest/v2/Orders
Ping
Ping to check the system status.
- POST /ping
Parameters
Paremeter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
key (*) | varchar | Your API Key |
warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
Example request
{ "key": "123abc", "warehouse": "whx", "account_id": 1 }
Example response
{ "status": "successful", "result": "pong!" }
Get orders
Gets the collection of orders.
- POST /get_orders
Parameters
Paremeter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
key (*) | varchar | Your API Key |
warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
page (*) | int | Pagination, number of page. |
status (*) | varchar | all, cancel, pending, processing, incomplete, divided, backorder, shipped, error, return by carrier, packing error, low balance, hold, dropship, editing, sent to shipedge, shipped by shipedge, pending to cotim, sent to cotim, shipped by cotim |
from_date | datetime | Format yyyy-mm-dd hh:mm:ss |
to_date | datetime | Format yyyy-mm-dd hh:mm:ss |
Example request
{ "key": "123abc", "warehouse": "whx", "account_id": 1, "page": 1, "status": "all" }
Example response
{ "status": "successful", "total_orders": "109", "total_pages": 5, "orders": [{ "order_id": "1", "order_number": "1", "reference_number": "", "date": "2019-10-18 00:00:00", "status": { "id": "9", "description": "shipped" }, "pending_date": "2019-10-18 15:58:03", "shipping_date": "2019-10-18 16:50:07", "last_update": "2019-10-21 14:04:53", "order_comments": "", "customer": { "first_name": "bruce", "last_name": "wayne", "address1": "464 South Alston Avenue", "address2": "#120", "city": "Durham", "state": "NC", "zip": "27713", "country": "United States" }, "billing": { "first_name": "bruce", "last_name": "wayne", "address1": "464 South Alston Avenue", "address2": "#120", "city": "Durham", "state": "NC", "zip": "27713", "country": "United States" }, "shipping": { "method": "FCD", "description": "USPS First Class Mail (2-6)", "tracking_number": "1234567" }, "items": [{ "item_id": "1", "sku": "S00063", "quantity": "1", "sold_price": "0.00", "description": "", "attributes": [], "product": { "product_id": "1", "account_id": "1", "sku": "S00063", "upc": null, "description": "test", "harmonization_code": "", "quantity_in_warehouse": "69", "quantity_available": "74", "quantity_hurt": "0", "quantity_shipped": "24", "cost": "4.00", "retail": "5.00", "discontinued": "N", "discontinued_date": null, "created_date": "2018-09-04 20:58:47", "updated_date": "2019-10-22 17:00:19", "weight": "0.3000", "width": "0.400", "height": "0.300", "length": "0.200", "distribution_center": { "id": "1", "name": "WH0" }, "supplier": { "id": null, "name": null }, "package_type": { "id": null, "name": null }, "attributes": [] } }], "attributes": [{ "id": "2739", "attributte_name": "total", "attribute_value": "NaN", "description": "_total_" }, { "id": "2738", "attributte_name": "subtotal", "attribute_value": "NaN", "description": "_subtotal_" }, { "id": "2741", "attributte_name": "shipping cost", "attribute_value": "0", "description": "_shipping_" }, { "id": "2740", "attributte_name": "handling estimate", "attribute_value": "3.00", "description": "_handling_" }], "account": { "account_id": "1", "account_name": "shipedge", "company_name": "shipedge", "contact_name": "Peter Parker", "address1": "106 Capitola Dr", "address2": null, "city": "Durham", "state": "NC", "postal_code": "27713", "country": "USA", "phone": "9192930940", "email": "integrations@shipedge.com", "activated": "true", "attributes": [{ "id": "3571", "attributte_name": "attr1", "attribute_value": "11", "description": "desc" }] } }] }
Get order
Gets the detail information about an order.
- POST /get_order
Parameters
Paremeter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
key (*) | varchar | Your API Key |
warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
id (*) | varchar | Specify an order_id to get details about an order. |
Example request
{ "key": "123abc", "warehouse": "whx", "account_id": 1, "id": "1" }
Example response
{ "status": "successful", "total_orders": "109", "total_pages": 5, "order": { "order_id": "1", "order_number": "1", "reference_number": "", "date": "2019-10-18 00:00:00", "status": { "id": "9", "description": "shipped" }, "pending_date": "2019-10-18 15:58:03", "shipping_date": "2019-10-18 16:50:07", "last_update": "2019-10-21 14:04:53", "order_comments": "", "customer": { "first_name": "bruce", "last_name": "wayne", "address1": "464 South Alston Avenue", "address2": "#120", "city": "Durham", "state": "NC", "zip": "27713", "country": "United States" }, "billing": { "first_name": "bruce", "last_name": "wayne", "address1": "464 South Alston Avenue", "address2": "#120", "city": "Durham", "state": "NC", "zip": "27713", "country": "United States" }, "shipping": { "method": "FCD", "description": "USPS First Class Mail (2-6)", "tracking_number": "1234567" }, "items": [{ "item_id": "1", "sku": "S00063", "quantity": "1", "sold_price": "0.00", "description": "", "attributes": [], "product": { "product_id": "1", "account_id": "1", "sku": "S00063", "upc": null, "description": "test", "harmonization_code": "", "quantity_in_warehouse": "69", "quantity_available": "74", "quantity_hurt": "0", "quantity_shipped": "24", "cost": "4.00", "retail": "5.00", "discontinued": "N", "discontinued_date": null, "created_date": "2018-09-04 20:58:47", "updated_date": "2019-10-22 17:00:19", "weight": "0.3000", "width": "0.400", "height": "0.300", "length": "0.200", "distribution_center": { "id": "1", "name": "WH0" }, "supplier": { "id": null, "name": null }, "package_type": { "id": null, "name": null }, "attributes": [] } }], "attributes": [{ "id": "2739", "attributte_name": "total", "attribute_value": "NaN", "description": "_total_" }, { "id": "2738", "attributte_name": "subtotal", "attribute_value": "NaN", "description": "_subtotal_" }, { "id": "2741", "attributte_name": "shipping cost", "attribute_value": "0", "description": "_shipping_" }, { "id": "2740", "attributte_name": "handling estimate", "attribute_value": "3.00", "description": "_handling_" }], "account": { "account_id": "1", "account_name": "shipedge", "company_name": "shipedge", "contact_name": "Peter Parker", "address1": "106 Capitola Dr", "address2": null, "city": "Durham", "state": "NC", "postal_code": "27713", "country": "USA", "phone": "9192930940", "email": "integrations@shipedge.com", "activated": "true", "attributes": [{ "id": "3571", "attributte_name": "attr1", "attribute_value": "11", "description": "desc" }] } } }
Get total orders
Gets the total of orders.
- POST /get_total_orders
Parameters
Paremeter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
key (*) | varchar | Your API Key |
warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
status (*) | varchar | all, cancel, pending, processing, incomplete, divided, backorder, shipped, error, return by carrier, packing error, low balance, hold, dropship, editing, sent to shipedge, shipped by shipedge, pending to cotim, sent to cotim, shipped by cotim |
from_date | datetime | Format yyyy-mm-dd hh:mm:ss |
to_date | datetime | Format yyyy-mm-dd hh:mm:ss |
Example request
{ "key": "abc123", "warehouse": "wh0", "account_id": 1, "status": "all" }
Example response
{ "status": "successful", "orders": { "total": "109" } }
Cancel order
Cancel an order.
- POST /cancel_order
Parameters
Paremeter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
key (*) | varchar | Your API Key |
warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
order_id (*) | varchar | Specify a shipping number to cancel it |
Example request
{ "order_id": "279434", "key": "bf3XXXXXXXXXXXXXXXXXXXXXXXXXXXXX8ec", "warehouse": "wh1", "account_id": 13 }
Example response
{ "status": "successful", "result": "Shippment 279434 was cancelled" }
Add orders
- POST /add_orders
Parameters
Paremeter | Type | Description |
---|---|---|
key (*) | varchar | Found in your ShipEdge account. Preferences>API Integration> Key. (Required) |
account_id (*) | int | Found in your ShipEdge account. Preferences>API Integration>AccountID. (Required) |
warehouse (*) | varchar | This will be found in your Shipege account. Preferences>API Integration> Warehouse. (Required) |
order_number (*) | varchar | order_number must be unique. You may use a shopping-cart or order processing software ID. It is recommended to use incremental consecutive numbers. If an Order# is repeated, the system will not import that row. (Required) |
reference_number | varchar | Order reference number |
shipping.carrier | varchar | Shipping carrier |
shipping.method (*) | varchar | please refer to ship method codes table. (Required) |
customer.email | varchar | we can send order status updates to this email on your behalf. |
customer.phone | varchar | Your customer’s delivery phone# is required on all international orders and express shipments. You may use your own phone number if you don’t have the buyer's contact phone#. |
customer.first_name (*) | varchar | Use as first name or as complete name.(Required) |
customer.last_name | varchar | Last name after first name. |
customer.company | varchar | If buyer is a company or organization. |
customer.address1 (*) | varchar | street delivery address. (Required) |
customer.address2 | varchar | apartment or unit number. International order may use this field for zone or area. |
customer.city (*) | varchar | delivery city name. (Required) |
customer.state (*) | varchar | state or province. (Required) |
customer.country (*) | varchar | delivery country name. (Required) |
customer.comments | varchar | comments to customer |
billing.first_name | varchar | Buyer first or complete name. Used for customer services purposes and order management. If left blank we will repeat the delivery address. If left blank we will repeat the delivery address. |
billing.company | varchar | If left blank we will repeat the delivery address. |
billing.address1 | varchar | If left blank we will repeat the delivery address. |
billing.address2 | varchar | If left blank we will repeat the delivery address. |
billing.city | varchar | If left blank we will repeat the delivery address. |
billing.state | varchar | If left blank we will repeat the delivery address. |
billing.zip | varchar | If left blank we will repeat the delivery address. |
billing.country | varchar | If left blank we will repeat the delivery address. |
cod_amount | varchar | Amount to be picked up when shipment is delivered (only available through UPS – additional service fees apply). |
insurance_amount | varchar | If insurance is required, please include the insurance amount otherwise leave blank (additional charges apply). UPS and FedEx automatically include insurance up to $100 at no additional charge. |
signature_required | Enum (YES, NO) | YES or NO (blank or nill) |
release_date | date | Release date |
shipping.shiment_subtotal | varchar | Total amount charged for merchandise not including shipping & handling charges. |
shipping.shipping_charge | varchar | Shipping and Handling charges. |
shipping.total_charge | varchar | Total amount charged for merchandise plus shipping & handling charges. |
residential | Enum(YES,NO) | YES / NO. Used to attain different service levels by UPS or FedEx. We can fill this for you if you are subscribed to automatic address verification and residence status (this service will detect the status of the delivery and automatically select the correct service: Commercial or Residential) |
order_comments | varchar | Order comments |
store_id | int | |
items.sku (*) | varchar | The SKU we need to place in the package. (Required) |
items.quantity (*) | int | The number of products for its respective.(Required) |
items.sold_price | float | |
items.description | varchar | Description of the Sku. |
Example request
{ "key": "abc123", "warehouse": "wh0", "account_id": 1, "orders": [{ "order_number": "20", "reference_number": "123", "order_comments": "Comments", "shipping": { "method": "DROPSHIP" }, "customer": { "email": "test@mail.com", "phone": "123345", "first_name": "Luis1", "last_name": "cust Name", "company": "cust Company", "address1": "123 Campbellton", "address2": "cust Address2", "city": "Montague – PE", "state": "PE", "zip": "C0A 1R0", "country": "Canada" }, "billing": { "first_name": "Bill FName", "last_name": "Bill LName", "company": "Bill Company", "address1": "Bill Address1", "address2": "Bill Address2", "city": "Los angeles", "state": "CA", "zip": "60915", "country": "USA" }, "cod_amount": "", "insurance_amount": "NO", "signature_required": "NO", "residential": "YES", "store_id": "", "release_date": "", "items": [{ "sku": "111-01950", "quantity": 1, "sold_price": "2.2200", "description": "sell by user example" }, { "sku": "111-12301", "quantity": 2, "sold_price": "3.3333", "description": "sell by user example 3333" }] }, { "order_number": "21", "reference_number": "456", "order_comments": "Comments", "shipping": { "method": "DROPSHIP" }, "customer": { "email": "test@mail.com", "phone": "6789000", "first_name": "Bruce", "last_name": "cust Name", "company": "cust Company", "address1": "123 Campbellton", "address2": "cust Address2", "city": "Montague – PE", "state": "PE", "zip": "C0A 1R0", "country": "Canada", "comments": "" }, "billing": { "first_name": "Bill FName", "last_name": "Bill LName", "company": "Bill Company", "address1": "Bill Address1", "address2": "Bill Address2", "city": "Los angeles", "state": "CA", "zip": "60915", "country": "USA" }, "cod_amount": "", "insurance_amount": "", "signature_required": "NO", "residential": "YES", "store_id": "", "release_date": "", "items": [{ "sku": "AC-F2-F15", "quantity": 1, "sold_price": "2.2200", "description": "sell by user example" }, { "sku": "AC-F3-F14", "quantity": 2, "sold_price": "3.3333", "description": "sell by user example 3333" }] }] }
Example response
{ "access": { "account_id": "1", "access": "Allow: add_orders", "warehouse": "wh0", "total_orders": 2, "message": "All orders in system", "batch_id": 1 }, "orders": { "allow": [{ "order_number": "20", "OrderID": "1" }], "denied": [{ "order_number": "21", "CommentAPI": "Check Field:SKU", "OrderID": "false" }] } }
Add Attributes
Add Attributes to an Oder or item respectively, if the attribute already exists; it is only modified, If no more attributes are added. In case OrderItemID is 0 or empty, it’s assigned for all orders.
- POST /add_attributes
Request
{ "account_id": "210", "key": "13439852318c7988c8774f02bad0b1d5", "warehouse": "dev", "order_id": "123654", "order_item_id": "2453", "attribute": "color", "attrval": "Blue", "description": "Color of items 2453" }
Parameters
Parameter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
Key (*) | varchar | Your API Key |
Warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
order_id | varchar | Specify an id of order to add attributes |
order_item_id | varchar | Specify an id associated with a order |
attribute | varchar | Attribute associated with an order or item (color, weight, etc) |
attrval | varchar | Value of the attribute to register |
description | varchar | Description of the attributes to register or update |
Note:
- Check that the order_item_id variable could be sent or omitted, since the end user would define whether it´s added to an order or an item, or check if the item exists and not proceed.
Response
{ "success": true, "message": "You updated it successfully." }
Get Attributes
Gets the listed of an order or item respectively, they are for the purpose of obtaining attributes.
- POST /get_attributes
Request
{ "AccountID": "210", "Key": "13439852318c7988c8774f02bad0b1d5", "Warehouse": "dev", "order_id": "123654", "order_item_id": "2453", "attribute": "color" }
Parameters
Parameter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
Key (*) | varchar | Your API Key |
Warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
order_id | varchar | Specify an id of order to add attributes |
order_item_id | varchar | Specify an id associated with a order |
attribute | varchar | Attribute associated with an order or item (color, weight, etc) |
Notes:
- The same case of addAttribute, ordre_item_id, could be sent or omitted. Since it could exist as neither.
- Attribute could also be omitted, so you can get all existing attributes of an order or item respectively.
Delete Attributes
Deletes the existing attribute o fan order or ítem respectively.
- POST /delete_attributes
Request
{ "AccountID": "210", "Key": "13439852318c7988c8774f02bad0b1d5", "Warehouse": "dev", "order_id": "123654", "order_item_id": "2453", "attribute": "color" }
Parameters
Parameter | Type | Description |
---|---|---|
account_id (*) | int | Your account ID |
Key (*) | varchar | Your API Key |
Warehouse (*) | varchar | This will be found in your ShipEdge account. Preferences > API Integration > Warehouse. |
order_id | varchar | Specify an id of order to add attributes |
order_item_id | varchar | Specify an id associated with a order |
attribute | varchar | Attribute associated with an order or item (color, weight, etc) |
Note:
- Here you could also omit order_item_id, as well as attribute (if you send an attribute it is deleted; if you do not send an attribute, all the attributes assigned to an order or item would be deleted).