Create Incoming Order
Creating an incoming order
Create Incoming order
POST
https://api-sandbox.shiplemon.com/v1/incoming-orders/generic
Adds an incoming order in our system
Request Body
store_id
string
The unique store url to avoid overwrites when orders from multiple stores have the same id. For link compatibility, also add the url protocol. Eg. value: https://woocommercestore.gr
status
string
The status of the order: One of: processing, completed
items*
array
{
id: number;
name: string; quantity: string;
price: number;
sku?: string;
width: string;
length: string;
height: string;
weight: string;
image_url: string;
}
shipping*
object
{
"first_name": "First Name",
"last_name": "Last Name",
"company": "Company",
"address_1": "Address 1",
"address_2": "2nd floor",
"city": "city",
"state": "state",
"postcode": "postcode",
"country": "GR",
"phone": "phone",
"email": "[email protected]",
"notes: "Beware of the dog"
}
company
, address_2
, and state
are optional and can accept null
Country is a 2 letter ISO code
Phone is either local phone or for non GR destination prefix with country code: https://en.wikipedia.org/wiki/E.164
total*
number
The total amount of the order
currency*
string
Accepts the code of the currency based on the iso 4217
Check more here: https://en.wikipedia.org/wiki/ISO_4217
shipping_total
number
The shipping amount of the order
Default to 0
billing*
object
{
"first_name": "First Name",
"last_name": "Last Name",
"company": "Company",
"address_1": "Address 1",
"address_2": "2nd floor",
"city": "city",
"state": "state",
"postcode": "postcode",
"country": "GR",
"phone": "phone",
"email": "[email protected]"
}
company
, address_2
, and state
are optional and can accept null
Country is a 2 letter ISO code
Phone is either local phone or for non GR destination prefix with country code: https://en.wikipedia.org/wiki/E.164
id
string
The order id (could be a string or number)
created_at
Date
eg. 2022-02-20T18:14:00.000Z
discount_total
number
The discount amount of the order. Default to 0
Example Request
curl --location --request POST 'http://api-sandbox.shiplemon.com/v1/incoming-orders/generic' \
--header 'x-api-key: {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 1,
"store_id": "https://test-store.gr",
"shipment_id": null,
"currency": "eur",
"shipping_total": 3,
"total": 22,
"billing": {
"first_name": "first_name",
"last_name": "last_name",
"company": "company",
"address_1": "address_1",
"address_2": "address_2",
"city": "city",
"state": null,
"postcode": "12345",
"country": "GR",
"phone": "+306900000000",
"email": "[email protected]"
},
"shipping": {
"first_name": "first_name",
"last_name": "last_name",
"company": "company",
"address_1": "address_1",
"address_2": "address_2",
"city": "Athens",
"state": "Attica",
"postcode": "12345",
"country": "GR",
"phone": "+306900000000",
"email": "[email protected]"
},
"payment_method": "cash_on_delivery",
"payment_status": "pending",
"created_at": "2022-02-20T18:14:00.000Z",
"items": [
{
"id": "product_id",
"name": "name",
"quantity": 2,
"price": 11,
"width": 0,
"length": 0,
"height": 0,
"weight": 0,
"image_url": null
}
]
}'
Payment methods
Inside an order payment_method
listed above should be one of the following fields:
cash_on_delivery
bank_transfer
paypal
card
free
unknown
Payment Statuses
Inside an order payment_status
listed above should be one of the following fields:
pending
paid
Example response
{
"status": "ok",
"data": {
"id": "820b648b-2d06-4786-8b13-73a6dc8b4aec",
"state": "new",
"store_id": "https://test-store.gr",
"source_id": "1",
"shipment_id": null,
"total": 22,
"currency": "eur",
"payment_method": "cash_on_delivery",
"payment_status": "pending",
"billing_address": {
"company": "string",
"first_name": "string",
"last_name": "string",
"address_1": "string",
"address_2": "string",
"country": "string",
"state": "string",
"postcode": "string",
"city": "string",
"phone": "string",
"email": "string"
},
"shipping_address": {
"company": "string",
"first_name": "string",
"last_name": "string",
"address_1": "string",
"address_2": "string",
"country": "string",
"state": "string",
"postcode": "string",
"city": "string",
"phone": "string",
"email": "string",
"notes": null
},
"shipping_option": {
"driver": null,
"service": null
},
"ecommerce_token": null,
"ecommerce_id": "1",
"ecartapi_id": null,
"has_shipment_draft": false,
"items": [
{
"id": "product_id",
"name": "name",
"quantity": 2,
"price": 11,
"width": 0,
"height": 0,
"length": 0,
"weight": 0,
"image_url": null
}
],
"completed": false,
"deleted_at": null,
"created_at": "2022-02-20T18:14:00.000Z",
"updated_at": "2022-10-10T16:02:43.825Z"
}
}
Last updated