Create bulk subscriptions
curl --request POST \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"customer": {
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactnumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
}
},
"shipTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"item": [
{
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"weight": 10,
"weightUnit": "lb",
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
},
"plan": {
"id": "1001",
"frequency": 30,
"frequencyType": "Daily"
},
"offsetDays": 2,
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
}
}
]
}'
{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"item": {
"sku": "MOBO-X570"
},
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
}
}
],
"errors": [
{
"lineItemId": 1,
"code": "SUBSCRIPTION_NOT_FOUND"
}
]
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Details used to create bulk subscription
Request processed successfully
Bulk subscriptions created, and errors, if any
Bulk subscriptions created, and errors, if any
Bulk subscriptions created, and errors, if any
Was this page helpful?
curl --request POST \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"customer": {
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactnumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
}
},
"shipTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"item": [
{
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"weight": 10,
"weightUnit": "lb",
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
},
"plan": {
"id": "1001",
"frequency": 30,
"frequencyType": "Daily"
},
"offsetDays": 2,
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
}
}
]
}'
{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"item": {
"sku": "MOBO-X570"
},
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
}
}
],
"errors": [
{
"lineItemId": 1,
"code": "SUBSCRIPTION_NOT_FOUND"
}
]
}
}
Create bulk subscriptions
curl --request POST \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"customer": {
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactnumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
}
},
"shipTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"item": [
{
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"weight": 10,
"weightUnit": "lb",
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
},
"plan": {
"id": "1001",
"frequency": 30,
"frequencyType": "Daily"
},
"offsetDays": 2,
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
}
}
]
}'
{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"item": {
"sku": "MOBO-X570"
},
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
}
}
],
"errors": [
{
"lineItemId": 1,
"code": "SUBSCRIPTION_NOT_FOUND"
}
]
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Details used to create bulk subscription
Request processed successfully
Bulk subscriptions created, and errors, if any
Bulk subscriptions created, and errors, if any
Bulk subscriptions created, and errors, if any
Was this page helpful?
curl --request POST \
--url https://prod01.copilot.fabric.inc/data-subscription/v1/subscriptions/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"channel": "WEBSITE",
"originOrderId": "22-4498-4800",
"customer": {
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactnumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
}
},
"shipTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"billTo": {
"name": {
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake"
},
"streetAddress": {
"street1": "123 Main St",
"street2": "Suite 100"
},
"city": "Boston",
"state": "MA",
"postalCode": "02127",
"country": "US",
"phone": {
"number": "5555551234",
"kind": "home"
}
},
"paymentDetails": {
"paymentIdentifier": {
"cardIdentifier": "1234",
"expiryDate": "12/20"
},
"paymentMethod": "credit_card",
"paymentKind": "Visa"
},
"customAttributes": {
"storeId": "60cb07fc20387b000821c5c3",
"associateId": 1,
"trackingUrl": "609436d21baded0008945b05"
},
"item": [
{
"id": 1000000006,
"sku": "MOBO-X570",
"quantity": 1,
"weight": 10,
"weightUnit": "lb",
"itemPrice": {
"price": 100,
"currencyCode": "USD"
},
"tax": {
"taxCode": "FR020000",
"taxAmount": 10,
"currencyCode": "USD"
},
"plan": {
"id": "1001",
"frequency": 30,
"frequencyType": "Daily"
},
"offsetDays": 2,
"offer": {
"id": "SUB-E10717",
"source": "PDP"
},
"shipping": {
"shipmentCarrier": "USPS",
"shipmentMethod": "Ground",
"shipmentInstructions": "Please leave the package in the box",
"taxCode": "SHP020000",
"shippingAmount": 10,
"taxAmount": 1,
"currencyCode": "USD"
},
"expiry": {
"expiryDate": "2022-07-18T09:16:11.437Z",
"billingCycles": 2
}
}
]
}'
{
"responseStatus": "OK",
"message": "Request processed successfully",
"data": {
"subscriptions": [
{
"id": "6256610bc312410009b7390b",
"item": {
"sku": "MOBO-X570"
},
"customer": {
"id": "62cffd65e8d7eb868c6a29d6",
"customerReferenceId": "12345",
"locale": "en_US",
"email": "customer@example.com",
"contactNumber": "+923333709568",
"firstName": "Pat",
"middleName": "E",
"lastName": "Kake",
"segment": [
"employee"
],
"employeeId": "345",
"communicationPreference": {
"email": true,
"sms": true
},
"status": "ACTIVE",
"createdAt": "2021-10-12T21:35:05.756Z",
"updatedAt": "2021-10-14T05:40:55.997Z"
}
}
],
"errors": [
{
"lineItemId": 1,
"code": "SUBSCRIPTION_NOT_FOUND"
}
]
}
}