curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/subscriptions/orders \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e4876e10cfe1d8902005d33",
"orderReference": "<string>",
"channel": 11,
"orderTotal": 125.99,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_CREATED",
"statusLog": "Order has been cancelled",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerEmail": "jsmith@example.com",
"customerPhone": {
"number": "<string>",
"kind": "<string>"
},
"notes": "<string>",
"tags": [
"tag100",
"tag101"
],
"events": [
{
"status": "ORDER_CREATED",
"data": {}
}
],
"shipTo": [
{
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10.25,
"committedTax": 10.25,
"promosApplied": [
{}
],
"total": 1,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "10000001",
"promisedDeliveryDate": "2019-12-14",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered",
"address": {
"name": {
"first": "John",
"middle": "Paul",
"last": "Smith"
},
"email": "johnsmith@google.com",
"phone": {
"number": "<string>",
"kind": "<string>"
},
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
}
}
]
}'
{
"tags": [
"Monthly Penut Bar"
],
"_id": "60b5b8b08766410008dd72be",
"channel": 13,
"orderTotal": 125.33,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerEmail": "ino@fabric.inc",
"customerPhone": {
"number": "555-555-5555",
"kind": "mobile"
},
"orderId": "2468-1668-79485",
"shipTo": [
{
"address": {
"name": {
"first": "Mark",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"email": "mark@google.com",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": 98004,
"kind": "Ship to address"
},
"promosApplied": [
{
"name": "test1"
}
],
"_id": "60b5b8b08766410008dd72bf",
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10,
"committedTax": 10,
"total": 34.87,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": 10000001,
"promisedDeliveryDate": "2021-02-14T00:00:00.000Z",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered"
}
],
"items": [
{
"group": [
"Group1"
],
"promosApplied": [
{
"name": "test"
}
],
"_id": "60b5b8b08766410008dd72c0",
"lineItemId": 1,
"itemId": 1000000051,
"priceListId": 100003,
"sku": 1538910,
"title": "Luminous Cushion Lagoon",
"quantity": 10,
"price": 4.5,
"discount": 1,
"currency": "USD",
"shipToId": 1000001,
"estimatedTax": 10.25,
"committedTax": 10.25,
"total": 4.54,
"taxCode": "FR020000",
"weight": 10,
"weightUnit": "lb",
"reservedLocation": [
"<any>"
],
"attributes": [
"<any>"
]
}
],
"shipments": [
"<any>"
],
"payments": [
{
"billToAddress": {
"name": {
"first": "Marl",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"email": "mark@google.com",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": 98004,
"kind": "Ship to address"
},
"shipToId": [
1000001
],
"_id": "60b5b8b08766410008dd72c1",
"billToId": 1000001,
"paymentIdentifier": {
"cardIdentifier": 4242
},
"paymentMethod": "Visa",
"paymentToken": {
"token": 12345689
},
"paymentKind": "Default payment",
"amount": 533.33,
"currency": "USD",
"conversion": 1,
"paymentStatus": "Pending"
}
],
"revision": 0,
"totalQuantity": 10,
"statusDescriptions": [
"<any>"
],
"events": [
"<any>"
],
"attributes": [
"<any>"
],
"createdAt": "2021-06-01T04:33:52.118Z",
"updatedAt": "2021-06-01T04:33:52.118Z"
}
Create subscriptions orders
curl --request POST \
--url https://prod01-apigw.{customer_name}.fabric.zone/api-order/subscriptions/orders \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '{
"cartId": "5e4876e10cfe1d8902005d33",
"orderReference": "<string>",
"channel": 11,
"orderTotal": 125.99,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_CREATED",
"statusLog": "Order has been cancelled",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerEmail": "jsmith@example.com",
"customerPhone": {
"number": "<string>",
"kind": "<string>"
},
"notes": "<string>",
"tags": [
"tag100",
"tag101"
],
"events": [
{
"status": "ORDER_CREATED",
"data": {}
}
],
"shipTo": [
{
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10.25,
"committedTax": 10.25,
"promosApplied": [
{}
],
"total": 1,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": "10000001",
"promisedDeliveryDate": "2019-12-14",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered",
"address": {
"name": {
"first": "John",
"middle": "Paul",
"last": "Smith"
},
"email": "johnsmith@google.com",
"phone": {
"number": "<string>",
"kind": "<string>"
},
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": "98004",
"kind": "Ship to address"
}
}
]
}'
{
"tags": [
"Monthly Penut Bar"
],
"_id": "60b5b8b08766410008dd72be",
"channel": 13,
"orderTotal": 125.33,
"taxTotal": 5.23,
"orderCurrency": "USD",
"status": "ORDER_CREATED",
"statusLog": "Order has been created",
"customerUserId": "5e3598e3007c5e00080d2bb8",
"customerAccountId": "5e3598e3007c5e00080d2bb8",
"customerEmail": "ino@fabric.inc",
"customerPhone": {
"number": "555-555-5555",
"kind": "mobile"
},
"orderId": "2468-1668-79485",
"shipTo": [
{
"address": {
"name": {
"first": "Mark",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"email": "mark@google.com",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": 98004,
"kind": "Ship to address"
},
"promosApplied": [
{
"name": "test1"
}
],
"_id": "60b5b8b08766410008dd72bf",
"shipToId": 1000001,
"shipToType": "SHIP_TO_ADDRESS",
"price": 24.87,
"currency": "USD",
"estimatedTax": 10,
"committedTax": 10,
"total": 34.87,
"taxCode": "FR020000",
"shipmentCarrier": "Fedex",
"shipmentMethod": "Express",
"shipmentMethodId": 10000001,
"promisedDeliveryDate": "2021-02-14T00:00:00.000Z",
"shipmentInstructions": "Leave at back door",
"shipmentStatus": "Delivered"
}
],
"items": [
{
"group": [
"Group1"
],
"promosApplied": [
{
"name": "test"
}
],
"_id": "60b5b8b08766410008dd72c0",
"lineItemId": 1,
"itemId": 1000000051,
"priceListId": 100003,
"sku": 1538910,
"title": "Luminous Cushion Lagoon",
"quantity": 10,
"price": 4.5,
"discount": 1,
"currency": "USD",
"shipToId": 1000001,
"estimatedTax": 10.25,
"committedTax": 10.25,
"total": 4.54,
"taxCode": "FR020000",
"weight": 10,
"weightUnit": "lb",
"reservedLocation": [
"<any>"
],
"attributes": [
"<any>"
]
}
],
"shipments": [
"<any>"
],
"payments": [
{
"billToAddress": {
"name": {
"first": "Marl",
"middle": "p",
"last": "styler"
},
"phone": {
"number": "555-555-5555",
"kind": "mobile"
},
"email": "mark@google.com",
"street1": "10400 NE 4th St",
"street2": "Suite 500",
"city": "Bellevue",
"state": "WA",
"country": "USA",
"zipCode": 98004,
"kind": "Ship to address"
},
"shipToId": [
1000001
],
"_id": "60b5b8b08766410008dd72c1",
"billToId": 1000001,
"paymentIdentifier": {
"cardIdentifier": 4242
},
"paymentMethod": "Visa",
"paymentToken": {
"token": 12345689
},
"paymentKind": "Default payment",
"amount": 533.33,
"currency": "USD",
"conversion": 1,
"paymentStatus": "Pending"
}
],
"revision": 0,
"totalQuantity": 10,
"statusDescriptions": [
"<any>"
],
"events": [
"<any>"
],
"attributes": [
"<any>"
],
"createdAt": "2021-06-01T04:33:52.118Z",
"updatedAt": "2021-06-01T04:33:52.118Z"
}
"0LybWR49k95cCwYh3cu0waCYoh4H2Eux2J52wn4k"
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Created subscription order
The response is of type object
.
Was this page helpful?