All Collections
SKULabs API
Creating orders by API
Creating orders by API

Order stash order api

Updated over a week ago

Ideally, SKULabs recommends using a "Remote Store CSV" or "Remote Store JSON" formatted file to import orders into SKULabs from custom integrations or APIs.

If you've decided to implement our order API and not the Remote Store sync, this article is for you.

When creating orders by API you may need to create an order stash. This is a sample stash for reference.

"stash" : {

"id" : "123456",
"shipping_information" : {
"name" : "John Doe",
"email" : "[email protected]",
"address" : "123 Main St",
"state" : "NY",
"city" : "New York",
"zip" : "10001",
"country" : "US",
"phone" : "+1 555-555-9643",
"method" : "Standard Shippping",
"address_type" : "residential"
},
"total" : 9.14,
"currency" : "USD",
"tax" : 0.64,
"shipping" : 0,
"discount" : 0,
"date" : ISODate("2020-06-10T17:30:59.690-04:00"),
"ship_by_date" : ISODate("2020-06-12T02:59:59.000-04:00"),
"deliver_by_date" : ISODate("2020-06-24T02:59:59.000-04:00"),
"items" : [
{
"fulfillments" : [],
"serial_numbers" : [],
"type" : "item",
"id" : "SKULabs Item ID",
"line_id" : "A consistent identifier for this line in your own database."
"price" : 8.5,
"quantity" : 1,
"lineSku" : "Optional product SKU as seen in checkout",
"lineName" : "Optional product name as seen in checkout"
}
],
"notes" : "Customer requests or notes which will appear on packing slips",

"internal_notes" : "Notes only staff can see",

"channel_status" : "Any status name that your system knows this order by.",

"pending" : false,
}

There is a order/add endpoint that you can use to create manual store orders in SKULabs. Below is example request payload for creating an order.

{

"store_id": "5857eae287169633325649fa", // Manual store ID. Required.

"order_number": "12345", // Optional. Auto increments if left blank.

"stash": {

"store_id": "5857eae287169633325649fa", // Manual store ID. Required. Identical to store_id provided above.

"type": "manual",

"id": "12345", // Order number. Identical to order_number provided above. Conditionally required if order_number is provided.

"notes": "Here is my note pertaining to my order ...",

"date": "2021-03-26T10:21:00-04:00",

"items": [

{

"quantity": 3,

"price": 43.95,

"type": "item", // "item" or "kit"

"id": "5f452ca01c9d4465079873d8", // SKULabs item ID

"line_id": 10002, // Line-item-id. Optional.

"lineSku": "'02-125",

"lineName": "Example item name"

},

{

"quantity": 4,

"price": 59.99,

"type": "kit", // "item" or "kit"

"id": "5e616a7242caa57a6fc7251e", // SKULabs kit ID, since type is "kit"

"line_id": 10003, // Line-item-id. Optional.

"lineSku": "colbie/ivory/l", // Item or kit SKU. Optional.

"lineName": "Example kit name" // Optional.

}

],

"discount": 0,

"shipping": 0,

"financial_status": "",

"tax": 0,

"total": 371.81,

"shipping_information": {

"name": "Customer name",

"phone": "1234567890",

"email": "[email protected]",

"company": "",

"city": "New York",

"country": "US",

"state": "NY",

"zip": "12345",

"address": "123 Ecommerce St",

"address_2": "Unit 456",

"method": "2 day free shipping" // Requested shipping method

},

"tags": [ "Urgent", "Tag name 2"] // List of order tag names. Optional.

}

}

Try it and let us know how it works for you. If you have any further questions, please have your technical point of contact email us directly. Send an email to [email protected] with "API Support" in the subject line.

Did this answer your question?