Copilot Business Layer (1.0.0)

Download OpenAPI specification:Download

Copilot Business Layer

Inventory

Inventory APIs

Get Inventory

Get Inventory

Request
query Parameters
object
Responses
200

Get List of Inventories success

400

A generic client error

401

A generic Unauthorized Error

404

A generic Items Not Found Error

500

A generic server error

get/inventory
Response samples
application/json
{
  • "query": {
    },
  • "data": [
    ]
}

Get Inventory SKU List

Get Inventory SKU List

Responses
200

Get SKU List Successfuly

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

get/inventory/sku-list
Response samples
application/json
[
  • {
    }
]

Get Inventory by Ids

Get all inventory for item Ids

Request
Request Body schema: application/json
offset
integer
Default: 0
limit
integer
Default: 10
itemIds
required
Array of integers
Responses
200

Get all inventory for item Ids Successfuly

400

A generic client error

401

A generic Unauthorized Error

404

A generic Items Not Found Error

500

A generic server error

post/inventory/item-ids
Request samples
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "itemIds": [
    ]
}
Response samples
application/json
[
  • {
    }
]

Get Inventory by Query

Get Inventory by Query

Request
Request Body schema: application/json
offset
integer
Default: 0
limit
integer
Default: 10
itemIds
Array of integers
queryType
string
Default: "paginated"
Enum: "paginated" "suggested"
Responses
200

Get Inventories based on query

400

A generic client error

401

A generic Unauthorized Error

404

A generic Items Not Found Error

500

A generic server error

post/inventory/query
Request samples
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "itemIds": [
    ],
  • "queryType": "paginated"
}
Response samples
application/json
{
  • "itemId": [
    ],
  • "sku": [
    ],
  • "title": [
    ]
}

Get URL to upload file to S3

Get URL to upload file to S3

Request
Request Body schema: application/json
fileName
required
string
type
required
string
Value: "inventory"
Responses
200

Uploaded Successfully

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

post/inventory/upload-url
Request samples
application/json
{
  • "fileName": "template.csv",
  • "type": "inventory"
}
Response samples
application/json
{
  • "fileName": "inventory_0301.csv",
  • "type": "inventory"
}

Get all Statuses

Get all Statuses

Responses
200

All Statuses

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

get/inventory/bulk-upload-status
Response samples
application/json
{
  • "query": {
    },
  • "uploadHistory": [
    ]
}

Inventory Change Sync

Inventory Change Sync

Request
Request Body schema: application/json
itemIds
Array of integers
eventSource
string
Value: "commerce"
accountId
string
stage
string
Responses
200

Success

500

A generic server error

post/inventory/commerce-change-sync
Request samples
application/json
{
  • "itemIds": [
    ],
  • "eventSource": "cpmmerce",
  • "accountId": "8739392294",
  • "stage": "dev02"
}
Response samples
application/json
"Event source must be from commerce"

Get Bulk upload status by Key Id

Get Bulk upload status by Key Id

Request
path Parameters
keyId
required
string

Get Bulk Upload By Key Params

Example: 606b6bf14ae47c00080798f3
Responses
200

Get Bulk upload status by Key Id

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

get/inventory/bulk-upload-status/{keyId}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "itemFamily": "5fe444d019956d0007ad0d42",
  • "keyId": "api-1618948218654",
  • "type": "api",
  • "status": "FINISHED",
  • "totalItems": 1,
  • "totalItemsUploaded": 1,
  • "totalRows": 2,
  • "totalRowsErrors": 0,
  • "messages": [
    ]
}

Bulk Insert Inventory

Bulk Insert Inventory

Request
Request Body schema: application/json
Array (non-empty)
sku
string non-empty
itemId
number >= 1
totalQuantity
number >= 0
reservedQuantity
number >= 0
locationId
number >= 0
type
string
Enum: "Stock" "Transit"
channelId
number
Enum: 12 13
transitRef
string
transitOrderDate
string
transitStockDate
string
Responses
200

Bulk Insert Inventories

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

post/inventory/bulk-insert
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
[
  • {
    }
]

Warehouse

Warehouse APIs

Get Warehouse

Get Warehouse

Request
query Parameters
object
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Responses
200

Get List Of Warehouses

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

get/warehouse
Response samples
application/json
{
  • "query": {
    },
  • "locations": [
    ],
  • "status": {
    }
}

Create Warehouse

Create Warehouse

Request
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Request Body schema: application/json
channel
Array of integers
isActive
required
boolean
isDefault
boolean
pickup
boolean
name
required
string [ 2 .. 140 ]
kind
string <= 140 characters
required
object
shortName
string [ 2 .. 24 ] characters
type
string 24 characters
Responses
200

Successfully Created Warehouse

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

post/warehouse
Request samples
application/json
{
  • "channel": [
    ],
  • "isActive": true,
  • "isDefault": true,
  • "pickup": true,
  • "name": "Warehouse name 104",
  • "kind": "Warehouse",
  • "address": {
    },
  • "shortName": "TAG-ABC123",
  • "type": "stringstringstringstring"
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "channel": [
    ],
  • "type": {
    },
  • "isActive": true,
  • "isDefault": true,
  • "pickup": true,
  • "name": "Warehouse name 104",
  • "kind": "Warehouse",
  • "shortName": "string",
  • "address": {
    },
  • "locationId": 161,
  • "coordinates": {
    }
}

Get Warehouse by Query

Get Warehouse by Query

Request
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Request Body schema: application/json
offset
integer >= 0
Default: 0
limit
integer >= 1
Default: 10
queryType
string
Default: "paginated"
Enum: "paginated" "suggested"
warehouseId
number
searchTerm
string
Responses
200

Get List Of inventory based on a query

400

A generic client error

401

A generic Unauthorized Error

404

Location Not Found Error

500

A generic server error

post/warehouse/query
Request samples
application/json
{
  • "offset": 0,
  • "limit": 10,
  • "queryType": "paginated",
  • "warehouseId": 1000000608,
  • "searchTerm": "Warehouse"
}
Response samples
application/json
{
  • "locationId": [
    ],
  • "name": [
    ],
  • "channel": [
    ]
}

Get Warehouse By Id

Get Warehouse By Id

Request
path Parameters
warehouseId
required
number

Warehouse Id

Example: 1
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Responses
200

Successfully Return Warehouse

400

A generic client error

401

A generic Unauthorized Error

404

Location Not Found Error

500

A generic server error

get/warehouse/{warehouseId}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "channel": [
    ],
  • "type": {
    },
  • "isActive": true,
  • "isDefault": true,
  • "pickup": true,
  • "name": "Warehouse name 104",
  • "kind": "Warehouse",
  • "shortName": "string",
  • "address": {
    },
  • "locationId": 161,
  • "coordinates": {
    }
}

Update Warehouse

Update Warehouse

Request
path Parameters
warehouseId
required
number

Warehouse Id

Example: 1
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Request Body schema: application/json
channel
Array of integers
isActive
required
boolean
isDefault
boolean
pickup
boolean
name
required
string [ 2 .. 140 ]
kind
string <= 140 characters
required
object
shortName
string [ 2 .. 24 ] characters
type
string 24 characters
Responses
200

Successfully Updated Warehouse

400

A generic client error

401

A generic Unauthorized Error

404

Location Not Found Error

500

A generic server error

patch/warehouse/{warehouseId}
Request samples
application/json
{
  • "channel": [
    ],
  • "isActive": true,
  • "isDefault": true,
  • "pickup": true,
  • "name": "Warehouse name 104",
  • "kind": "Warehouse",
  • "address": {
    },
  • "shortName": "TAG-ABC123",
  • "type": "stringstringstringstring"
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "channel": [
    ],
  • "type": {
    },
  • "isActive": true,
  • "isDefault": true,
  • "pickup": true,
  • "name": "Warehouse name 104",
  • "kind": "Warehouse",
  • "shortName": "string",
  • "address": {
    },
  • "locationId": 161,
  • "coordinates": {
    }
}

Get Warehouse Channels

Get list of all available channels

Request
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng'
Responses
200

Get List of channels

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

get/warehouse/channels
Response samples
application/json
[
  • {
    }
]

Get channels status

Get channels status

Request
header Parameters
Authorization
required
string
Example: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYWZmMTcxNDNlMTU0MDAwODBhZmZkNSIsInJvbGVzIjpbIkFkbWluIl0sInBlcm1pc3Npb25zIjpbIndyaXRlOnNrdXNldCIsInJlYWQ6YXR0cmlidXRlLWdyb3VwIiwicmVhZDphdHRyaWJ1dGUiLCJ3cml0ZTpyb2xlIiwid3JpdGU6dXNlciIsIndyaXRlOmF0dHJpYnV0ZS1ncm91cCIsIndyaXRlOmNvbGxlY3Rpb24iLCJyZWFkOnNrdXNldCIsInJlYWQ6Y29sbGVjdGlvbiIsInJlYWQ6dXNlciIsInJlYWQ6cGVybWlzc2lvbiIsInJlYWQ6cm9sZSIsIndyaXRlOmF0dHJpYnV0ZSJdLCJhY2NvdW50IjoiNjBhYzE5ZWY4OTNhYjEwMDA4NjRiNzcxIiwiYWNjb3VudElkIjoxNTMzMzUyNTYxLCJ1c2VyVHlwZSI6eyJraW5kIjoiUkVHSVNURVJFRCJ9LCJpYXQiOjE2MjM3MDM3ODQsImV4cCI6MTcyMzcwNTU4NH0.MI_eTWLzfkkFCex7vK8FtFw4suC0DrvBb-QozeX0KRWSRmm5DYrzOuj_br7SWi6YOdYyjPy_jz0CXNLThuYkng
Request Body schema: application/json
required
Array of objects
Responses
200

Get List of channels Statuses

400

A generic client error

401

A generic Unauthorized Error

500

A generic server error

post/warehouse/channels/status
Request samples
application/json
{
  • "channels": [
    ]
}
Response samples
application/json
{
  • "channelsStatus": [
    ]
}

Fulfillment-method

Fulfillment-method APIs

Get All Fulfillment Methods

Get All Fulfillment Methods

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get All Fulfilment Methods

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

get/fulfillment-method
Response samples
application/json
[
  • {
    }
]

Create a Fulfillment Method

Create a Fulfillment Method

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
name
required
string [ 2 .. 140 ] characters
Responses
200

Successfully Created Fulfilment Method

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/fulfillment-method
Request samples
application/json
{
  • "name": "Bellevue Warehouse Main"
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Bellevue Warehouse Main",
  • "priority": 65
}

Get Fulfillment Method by Id

Get Fulfillment Method by Id

Request
path Parameters
methodId
required
string

Fulfilment Method Id

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Fulfilment Method By ID

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Fulfilment Method Not Found Error

500

A generic server error

get/fulfillment-method/{methodId}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Bellevue Warehouse Main",
  • "priority": 65
}

Update Fulfillment Method by Id

Update Fulfillment Method by Id

Request
path Parameters
methodId
required
string

Fulfilment Method Id

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
name
required
string [ 2 .. 140 ] characters
Responses
200

Update Fulfilment Method By ID

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Fulfilment Method Not Found Error

500

A generic server error

patch/fulfillment-method/{methodId}
Request samples
application/json
{
  • "name": "Bellevue Warehouse Main"
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Bellevue Warehouse Main",
  • "priority": 65
}

Set Priority

Set Priority

Request
Request Body schema: application/json
required
Array of objects
Responses
200

Successfully Set Priority

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/fulfillment-method/set-priority
Request samples
application/json
{
  • "method": [
    ]
}
Response samples
application/json
{
  • "message": "Priority Updated Successfully",
  • "warnings": [
    ]
}

Configurations

Configurations APIs

Create New Attribute

Create New Attribute

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
name
required
string
level
required
string
Enum: "order" "item"
price
number
type
required
string
Enum: "bool" "string"
isDeleted
boolean
items
Array of strings
Responses
200

Successfully Created Attribute

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/attribute
Request samples
application/json
{
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Get Attribute

Get Attribute

Request
path Parameters
id
required
string

Attribute Id for the object you need to retrieve

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Attribute

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Object with the sent attribute Id is not found

500

A generic server error

get/attribute/{id}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Update Attribute

Update Attribute

Request
path Parameters
id
required
string

Attribute Id for the object you need to update

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
name
string
level
string
Enum: "order" "item"
price
number
type
string
Enum: "bool" "string"
items
Array of strings
Responses
200

Successfully Updated Attribute

400

Object with the sent attribute Id is not found

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

patch/attribute/{id}
Request samples
application/json
{
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "items": [
    ]
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Delete Attribute

Delete Attribute

Request
path Parameters
id
required
string

Attribute Id for the object you need to delete

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Successfully Deleted Attribute

400

Object with the sent attribute Id is not found or it is already deleted

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

delete/attribute/{id}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Get All Attributes

Get All Attributes

Request
query Parameters
offset
integer
Default: 0
Example: offset=0
limit
integer
Default: 10
Example: limit=10
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Attributes response

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

get/attribute/getAll
Response samples
application/json
{
  • "query": {
    },
  • "attributes": [
    ]
}

Restore Deleted Attribute

Restore Deleted Attribute

Request
path Parameters
id
required
string

Attribute Id

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Restore Deleted Attribute

400

Object with the sent attribute Id is not found or it is already restored

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

patch/attribute/restore/{id}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Get Deleted Attribute

Get Deleted attribute from attributeId

Request
path Parameters
id
required
string

Attribute Id

Example: 606b6bf14ae47c00080798f3
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Deleted Attribute

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Object with the sent attribute Id is not found

500

A generic server error

get/attribute/getDeleted/{id}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "name": "Gift Messaging",
  • "level": "order",
  • "price": 50.25,
  • "type": "bool",
  • "isDeleted": false,
  • "items": [
    ]
}

Get Order Attributes

Get All Order level Attributes

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Order Level Attributes

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

get/attribute/getAll/order-attributes
Response samples
application/json
{
  • "attributes": [
    ]
}

Get Settings

Get Settings

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Fulfillment Setting

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

get/setting
Response samples
application/json
"distance"

Create Settings

Create or Update Store Settings

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
fulfillmentSetting
required
string
Enum: "distance" "custom"
Responses
200

Create Or Update Setting

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/setting
Request samples
application/json
{
  • "fulfillmentSetting": "distance"
}
Response samples
application/json
{
  • "_id": "5fee9d59f2f08a1b3cbdea08",
  • "createdAt": "2020-12-31T02:09:53.914Z",
  • "updatedAt": "2020-12-31T02:09:53.914Z",
  • "cancellationPolicy": {
    },
  • "returnPolicy": {
    },
  • "sugarRefundPolicy": {
    },
  • "account": "5f689caa4216e7000750d1ef",
  • "fulfillmentSetting": "distance"
}

Get Cancellations Policies

Get Cancellation Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Cancellation Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Cancellation policy not found

500

A generic server error

get/setting/cancellation-policy
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Create Cancellation Policy

Create Cancellation Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
autoRefund
required
boolean
isEnabled
required
boolean
windowHours
required
number
statuses
required
Array of strings
Responses
200

Create Cancellation Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/setting/cancellation-policy
Request samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Update Cancellation Policy

Update Cancellation Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
Any of:
autoRefund
required
boolean
isEnabled
boolean
windowHours
number
statuses
Array of strings
Responses
200

Update Cancellation Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

patch/setting/cancellation-policy
Request samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Get Return Policies

Get Return Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Cancellation Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

404

Return policy not found

500

A generic server error

get/setting/return-policy
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Create Return Policy

Create Return Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
autoRefund
required
boolean
isEnabled
required
boolean
windowHours
required
number
statuses
required
Array of strings
Responses
200

Create Return Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/setting/return-policy
Request samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Update Return Policy

Update Return Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
Any of:
autoRefund
required
boolean
isEnabled
boolean
windowHours
number
statuses
Array of strings
Responses
200

Update Return Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

patch/setting/return-policy
Request samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}
Response samples
application/json
{
  • "autoRefund": true,
  • "isEnabled": true,
  • "windowHours": 12,
  • "statuses": [
    ]
}

Get Sugar Refund Policies

Get Sugar Refund Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Responses
200

Get Sugar Refund Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

get/setting/sugar-refund-policy
Response samples
application/json
{
  • "maxOrderValue": 1000,
  • "isEnabled": true,
  • "totalRefundsAllowed": 12,
  • "currency": "USD"
}

Create Sugar Refund Policy

Create Sugar Refund Policy

Request
header Parameters
Authorization
required
string
Example: JWT
Request Body schema: application/json
maxOrderValue
required
integer
isEnabled
required
boolean
totalRefundsAllowed
required
number
currency
required
string
Responses
200

Create Sugar Refund Policy Successfully

400

A generic client error

401

A generic Unauthorized Error

403

A generic Forbidden Error

500

A generic server error

post/setting/sugar-refund-policy
Request samples
application/json
{
  • "maxOrderValue": 1000,
  • "isEnabled": true,
  • "totalRefundsAllowed": 12,
  • "currency": "USD"
}
Response samples