Download OpenAPI specification:Download
fabric's Subscriptions API lets your customers set recurring purchases of their desired products or services for a scheduled period (weekly, monthly, etc.). In addition, Subscriptions helps you retrieve and update subscription details, and lets your customers skip one or more subscription schedules, or remove a subscription. This API also lets you create and updates customers cancellation reasons, and subscription discounts.
These endpoints let you create, update, or get one or all of your subscribers (customers who have subscriptions). If you request all subscribers, you will receive a paginated response; you can specify the page size, and which page you want.
Create new subscriber with specified details
Details of customer being created
Request processed successfully
Bad request
{- "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
}
}
{- "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"
}
Get details of single customer, specified by customer ID
Request processed successfully
Not found
{- "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"
}
Update single subscriber, specified by customer ID
Details of customer being updated
Request processed successfully
Bad request
Not found
{- "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
}
}
{- "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"
}
Update single subscriber's shipping and billing information (subscriber specified by customer ID)
Details for updating customer billing and shipping information
object (AddressShipTo) Ship-to address and phone details | |
object (Address) Bill-to address and phone details |
Request processed successfully
Bad request
Not found
{- "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"
}
}
}
{- "subscriptions": [
- {
- "item": {
- "sku": "MOBO-X570"
}
}
]
}
These endpoints let your customers set recurring purchases of their desired products or services for a scheduled period (weekly, monthly, etc.). In addition, these endpoints let you get and update subscription details, and let your customers skip one or more subscription schedules, or remove a subscription.
Get all subscriptions (response is paginated)
Request processed successfully
Subscription not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "subscriptions": [
- {
- "id": "6256610bc312410009b7390b",
- "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"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "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
}, - "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"
}, - "status": "ACTIVE",
- "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "channel": "WEBSITE",
- "originOrderId": "22-4498-4800",
- "offsetDays": 2,
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z"
}
], - "query": {
- "limit": 10,
- "offset": 10,
- "count": 100
}
}
}
Get single subscription by subscription ID
Request processed successfully
Subscription not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "subscription": {
- "id": "6256610bc312410009b7390b",
- "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"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "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
}, - "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"
}, - "status": "ACTIVE",
- "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "channel": "WEBSITE",
- "originOrderId": "22-4498-4800",
- "offsetDays": 2,
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z"
}
}
}
Update single subscription by subscription ID
Request processed successfully
Subscription not found
{- "channel": "WEBSITE",
- "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": "credit"
}, - "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "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": {
- "subscription": {
- "id": "6256610bc312410009b7390b",
- "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"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "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
}, - "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"
}, - "status": "ACTIVE",
- "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "channel": "WEBSITE",
- "originOrderId": "22-4498-4800",
- "offsetDays": 2,
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z"
}
}
}
Create bulk subscriptions
Request processed successfully
Bad request
{- "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"
}
]
}
}
Deactivate single subscription by subscription ID
Request processed successfully
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "6256610bc312410009b7390b",
- "status": "INACTIVE"
}
}
Reactivate single subscription by subscription ID
Request processed successfully
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "6256610bc312410009b7390b",
- "status": "ACTIVE"
}
}
Replace a subscription item (with details) by specifying item SKU
Request processed successfully
Bad request
{- "item": {
- "sku": "MOBO-X570"
}, - "replacementItem": {
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "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": "This request to replace items is currently being processed. Once done, we will update you via your webhooks (your webhooks need to be configured). Refer to our documentation on more information on webhooks."
}
Discontinue items in subscription by specifying item SKUs
Request processed successfully
{- "sku": [
- "MOBO-X570"
]
}
{- "responseStatus": "OK",
- "message": "This request to replace items is currently being processed. Once done, we will update you via your webhooks (your webhooks need to be configured). Refer to our documentation on more information on webhooks."
}
Get single order, specified by order ID
Request processed successfully
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "order": {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
}
}
Update single order, specified by order ID
object (UpdateOrder) Order details to be updated |
Request processed successfully
Bad request
Unauthorized
Not found
{- "order": {
- "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"
}, - "scheduledDate": "2019-01-01T00:00:00.000Z",
- "status": "SCHEDULED",
- "lineItems": [
- {
- "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "Item": {
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
]
}
}
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "order": {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
}
}
Get all orders for a specified customer, specified by customer ID
Request processed successfully
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "orders": [
- {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": null,
- "frequency": null,
- "frequencyType": null
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": null,
- "currencyCode": null
}, - "tax": {
- "taxCode": null,
- "taxAmount": null,
- "currencyCode": null
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
]
}
}
Trigger order specified by order ID
Request processed successfully
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "order": {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
}
}
Skip order specified by order ID
Request processed successfully
Bad request
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "Order": {
- "id": "6384462ab645220008a4358a",
- "status": "SKIPPED"
}, - "dateSkipped": "2020-01-01T00:00:00.000Z",
- "nextScheduledOrders": {
- "newOrders": [
- "62d51ab385a8cd00092eb8b7"
], - "subscriptions": [
- "62d51ab385a8cd00092eb8b7"
]
}, - "errors": [
- {
- "lineItemId": 1,
- "code": "SUBSCRIPTION_NOT_FOUND"
}
]
}
}
Remove items from order specified by order ID
Request processed successfully
Bad request
Unauthorized
Not found
{- "lineItemIds": [
- 1
]
}
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "order": {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
}
}
Add items to order specified by order ID
Array of objects (AddItemToOrderItems) Line items to add to order |
Request processed successfully
Bad request
Unauthorized
Not found
{- "lineItems": [
- {
- "subscriptionId": "6256610bc312410009b7390b",
- "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}
}
]
}
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "order": {
- "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"
}, - "isDeleted": false,
- "deletedAt": "2019-01-01T00:00:00.000Z",
- "id": "6384462ab645220008a4358a",
- "status": "SCHEDULED",
- "totalAmount": 100,
- "totalTax": 10,
- "totalDiscount": 10,
- "currencyCode": "USD",
- "scheduledDate": "2019-01-01T00:00:00.000Z",
- "customer": {
- "customerReferenceId": "12345",
- "locale": "en_US",
- "email": "customer@example.com",
- "contactnumber": "5555551234",
- "firstName": "Pat",
- "middleName": "E",
- "lastName": "Kake",
- "segments": [
- "employee"
], - "employeeId": "345",
- "status": "ACTIVE",
- "isDeleted": false,
- "DeletedAt": "2021-01-01T00:00:00.000Z",
- "createdAt": "2019-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "communicationPreference": {
- "email": true,
- "sms": true
}
}, - "lineItems": [
- {
- "subscription": {
- "plan": {
- "id": "1001",
- "frequency": 30,
- "frequencyType": "Daily"
}, - "id": "6256610bc312410009b7390b"
}, - "item": {
- "id": 1000000006,
- "sku": "MOBO-X570",
- "quantity": 1,
- "weight": 10,
- "weightUnit": "lb",
- "title": "Vitamin",
- "description": "Vitamin C",
- "itemPrice": {
- "price": 100,
- "currencyCode": "USD"
}, - "tax": {
- "taxCode": "FR020000",
- "taxAmount": 10,
- "currencyCode": "USD"
}
}, - "shipping": {
- "shipmentCarrier": "USPS",
- "shipmentMethod": "Ground",
- "shipmentInstructions": "Please leave the package in the box",
- "taxCode": "SHP020000",
- "shippingAmount": 10,
- "taxAmount": 1,
- "currencyCode": "USD"
}, - "offer": {
- "id": "SUB-E10717",
- "source": "PDP"
}, - "lineItemId": 1,
- "customAttributes": {
- "storeId": "60cb07fc20387b000821c5c3",
- "associateId": 1,
- "trackingUrl": "609436d21baded0008945b05"
}
}
], - "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "statusUpdatedAt": "2021-10-14T10:24:36.468Z",
- "Retry": {
- "maxRetries": 3,
- "retryType": "PAYMENT RETRY",
- "retryAfterDays": 1,
- "retryCount": 2
}, - "error": {
- "errorCode": "ORDER_NOT_FOUND",
- "errorMessage": "The order is not found"
}
}
}
}
Get all cancellation reasons
Request processed successfully
Unauthorized access
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": [
- {
- "_id": "string",
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z",
- "code": 99,
- "reason": "Customer is not happy"
}
]
}
Create cancellation reasons
Request processed successfully
Bad Request
Unauthorized access
[- {
- "code": 99,
- "reason": "Customer is not happy"
}
]
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": [
- {
- "code": 99,
- "reason": "Customer is not happy"
}
]
}
These endpoints let you create, update, deactivate, and get discount offers for the orders placed by your customers.
Create subscription discounts
Details of subscription discount to be created
Request processed successfully
Bad request
Unauthorized
{- "validity": {
- "startDate": "2022-07-21T13:14:51.474Z",
- "endDate": "2022-07-21T13:14:51.474Z",
- "applyOnOrders": [
- 2,
- 3
]
}, - "message": "Offer terms and conditions",
- "discount": {
- "amount": 10
}, - "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP",
- "customerSegment": [
- "employee"
]
}
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "62d9196aeec12800095633f2",
- "status": "ACTIVE",
- "offerCode": "SUB-D45DD7",
- "validity": {
- "startDate": "2022-07-21T13:14:51.474Z",
- "endDate": "2022-07-21T13:14:51.474Z",
- "applyOnOrders": [
- 2,
- 3
]
}, - "message": "Offer terms and conditions",
- "discount": {
- "amount": 10
}, - "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP",
- "customerSegment": [
- "employee"
], - "isDeleted": false,
- "DeletedAt": "2019-01-01T00:00:00.000Z",
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z"
}
}
Get a subscription discount for a specified offer (specified by offer ID)
Request processed successfully
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "62d9196aeec12800095633f2",
- "status": "ACTIVE",
- "offerCode": "SUB-D45DD7",
- "validity": {
- "startDate": "2022-07-21T13:14:51.474Z",
- "endDate": "2022-07-21T13:14:51.474Z",
- "applyOnOrders": [
- 2,
- 3
]
}, - "message": "Offer terms and conditions",
- "discount": {
- "amount": 10
}, - "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP",
- "customerSegment": [
- "employee"
], - "isDeleted": false,
- "DeletedAt": "2019-01-01T00:00:00.000Z",
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z"
}
}
Update a subscription discount for a specified offer (specified by offer ID)
Details used to update discount
Request processed successfully
Bad request
Unauthorized
Not found
{- "discount": {
- "amount": 10
}, - "message": "Offer terms and conditions",
- "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP"
}
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "62d9196aeec12800095633f2",
- "status": "ACTIVE",
- "offerCode": "SUB-D45DD7",
- "validity": {
- "startDate": "2022-07-21T13:14:51.474Z",
- "endDate": "2022-07-21T13:14:51.474Z",
- "applyOnOrders": [
- 2,
- 3
]
}, - "message": "Offer terms and conditions",
- "discount": {
- "amount": 10
}, - "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP",
- "customerSegment": [
- "employee"
], - "isDeleted": false,
- "DeletedAt": "2019-01-01T00:00:00.000Z",
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z"
}
}
Deactivate a specified subscription discount (specified by discount ID)
Request processed successfully
Bad request
Unauthorized
Not found
{- "responseStatus": "OK",
- "message": "Request processed successfully",
- "data": {
- "id": "62d9196aeec12800095633f2",
- "status": "INACTIVE",
- "offerCode": "SUB-D45DD7",
- "validity": {
- "startDate": "2022-07-21T13:14:51.474Z",
- "endDate": "2022-07-21T13:14:51.474Z",
- "applyOnOrders": [
- 2,
- 3
]
}, - "message": "Offer terms and conditions",
- "discount": {
- "amount": 10
}, - "skus": [
- "MOBO-X570"
], - "categories": [
- "holiday-best-sellers"
], - "frequency": {
- "shippingFrequency": 1,
- "shippingFrequencyType": "daily",
- "billingFrequency": 1,
- "billingFrequencyType": "daily"
}, - "itemQuantity": 1,
- "channel": "WEBSITE",
- "target": "PDP",
- "customerSegment": [
- "employee"
], - "isDeleted": false,
- "DeletedAt": "2019-01-01T00:00:00.000Z",
- "createdAt": "2021-10-12T21:35:05.756Z",
- "updatedAt": "2021-10-14T05:40:55.997Z"
}
}