Create Cart (assetToOrder)

Create orders from existing assets by performing move, add, change, and delete (MACD) actions. Use assetToOrder only for Future Dated Orders.

  • The inputFields is not supported for AssetToOrder (subaction as assetToOrder).
  • This API only accepts dates in the format YYYY-MM-DDTHH:MM:SS.sss.000+0000. For example, 2023-01-24T11:13:33.000+0000.

Note

1POST /v2/carts

Remote Method 

1assetToOrder

REST Handler 

1APICreateCartsCpqV2

Apex Remote Service 

1CpqAppHandler

Apex Remote Input Map 

1{
2"methodName":"assetToOrder",
3"id":"02i3O000006PrKSQA0,02i3O000006PrKSQB0",
4"accountId":"801360000008eNU",
5"requestDateTime":"2021-10-7"
6}

Package 

Communication (vlocity_cmt)

API Parameters and Response Format 

For API parameter names and descriptions, see Cart-Based API Swagger Reference.

Resource Information 

Response FormatJSON
Resource URL/services/apexrest/{namespace}/v2/carts

Example Request 

To raise a Change Order for a specific time and date:

1{
2"subaction": "assetToOrder",
3"id": "02i3O000006PrKSQA0",
4"accountId": "0013O00000N6TEN",
5"requestDateTime": "2021-11-10 10:24:04"
6}

To raise a Change Order on the current time and date:

1{
2"methodName":"assetToOrder",
3
4"id":"02i3O000006PrKSQA0,02i3O000006PrKSQB0",
5"accountId":"801360000008eNU",
6"requestDateTime":"2021-10-7"
7}

Example Response 

1{
2 "error": "OK",
3 "errorCode": "INVOKE-200",
4 "result": {
5 "actions": "0x6be19049",
6 "data": "0x7988afe5",
7 "messages": "0x1c660bd",
8 "records": "0x37796bf6",
9 "totalSize": 0
10 }
11}