Orders
Last updated
Last updated
GET
/order/$id
Name | Type | Description |
---|---|---|
{
"status": "ok",
"response": {
"order": {
"id": "EA8",
"store": {
"name": "My TeSt StOrE",
"order_id": "000000027"
},
"status": {
"code": "F",
"label": "Fulfilled",
"since": "2030-05-11 13:19"
},
"addresses": {
"billing": {
"fname": "Chris",
"name": "Jansen",
"street": "Hoofdstraat",
"streetNr": "95",
"streetNrExt": "",
"postcode": "1234 AB",
"city": "Amsterdam",
"country": "NL",
"email": "chris@email.nl",
"phone": "0000000000"
},
"shipping": {
"fname": "Chris",
"name": "Jansen",
"street": "Hoofdstraat",
"streetNr": "95",
"streetNrExt": "",
"postcode": "1234 AB",
"city": "Amsterdam",
"country": "NL",
"email": "chris@email.nl",
"phone": "0000000000"
}
},
"line_items": [
{
"sku": "RS155M-30-L",
"name": "RS155M-30-L",
"thumb": "",
"image": "",
"status": "fulfilled",
"options": [
{
"code": "dtg",
"attributes": [
{
"name": "src",
"value": "https://test1234.com/mydesign.png",
"source": "user"
},
{
"name": "preview",
"value": "https://test1234.com/a-preview-of-the-design.png",
"source": "user"
},
{
"name": "position",
"value": "front",
"source": "user"
},
{
"name": "qty",
"value": 1,
"source": "default"
},
{
"name": "offsetX",
"value": -1,
"source": "default"
},
{
"name": "offsetY",
"value": -1,
"source": "default"
},
{
"name": "dpi",
"value": 150,
"source": "default"
},
{
"name": "pallet",
"value": "Standard Pallet",
"source": "default"
}
],
"status": "fulfilled",
"source": "api",
"sort_order": 2000
}
]
}
],
"transactions": [
{
"items": [
{
"ID": 47891,
"qty": "1.0000",
"sku": "RS155M-30-L",
"total": "5.7600"
},
{
"ID": 47892,
"qty": "1.0000",
"sku": "ISF-EU-T-T",
"total": "4.7800"
}
],
"transaction": {
"ID": "21895",
"date": "07-12-2030 15:30",
"orderRef": "EA8",
"total": "10.5400"
},
"invoice": {
"ID": 6389
}
}
],
"shipments": [
{
"status": {
"code": "N",
"label": "New"
},
"tracking": {
"code": "3SCEBU5051344513",
"url": "https://jouw.postnl.nl/track-and-trace/3SCEBU5051344513-NL-1234AB"
}
}
]
}
}
}
{
// Response
}
POST
https://api.cottoncast.com/order
This endpoint allows you to create a new order.
{
"store" : "5a2e74fad24826b7836f75c5",
"order_ref" : "100009769",
"billing" : {
"fname" : "John",
"name": "Carpenter",
"street" : "Lange laan",
"streetNr" : "234",
"streetNrExt" : "b",
"postcode" : "1033AZ",
"city" : "Amsterdam",
"country" : "NL",
"phone" : "0612345678",
"email" : "example@example.com"
},
"shipping" : {
"fname" : "John",
"name": "Carpenter",
"street" : "Lange laan",
"streetNr" : "234",
"streetNrExt" : "b",
"postcode" : "1033AZ",
"city" : "Amsterdam",
"country" : "NL",
"phone" : "0612345678",
"email" : "example@example.com"
},
"items": [
{
"qty": 1,
"sku": "RS155M-30-S",
"options" : [
{
"code" : "dtg",
"attributes" : [
{
"name" : "src",
"value": "https://mydomain.com/design.png"
},
{
"name" : "position",
"value": "marker: chest; width:80%; top: 1cm"
},
{
"name" : "preview",
"value": "https://mydomain.com/preview.png"
}
]
}
]
},
{
"qty": 1,
"sku": "RS155M-36-L",
"options" : [
{
"code" : "dtg",
"attributes" : [
{
"name" : "src",
"value": "https://mydomain.com/design2.svg"
},
{
"name" : "position",
"value": "On the chest, about 80% in width"
}
]
}
]
},
{
"qty": 1,
"sku": "7RX-30-L"
}
]
}
{
// Response
}
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
id*
String
Order ID
Authentication
string
Basic Authentication
items
object
Products you want to order
shipping
object
Shipping address
billing
object
Billing address
order_ref
string
Your order reference
store
string
ID of the sales channel