Filter Details About a Contract

Here’s an example of a GET request using the Contract-based Orders resource to query a given contract’s activated orders.

Example usage 

1/services/data/v30.0/commerce/sale/800D0000000PFL8?contract.orders.StatusCode='Activated'

Example request body 

None

Example JSON response body 

1{
2  "totalSize" : 1,
3  "done" : true,
4  "records" : [ {
5    "attributes" : {
6      "type" : "Contract",
7      "url" : "/services/data/v30.0/sobjects/Contract/800D0000000PFHpIAO"
8    },
9    "Id" : "800D0000000PFHpIAO",
10    "Orders" : {
11      "totalSize" : 1,
12      "done" : true,
13      "records" : [ {
14        "attributes" : {
15          "type" : "Order",
16          "url" : "/services/data/v30.0/sobjects/Order/801D0000000FpNEIA0"
17        },
18        "Id" : "801D0000000FpNEIA0",
19        "OrderItems" : {
20          "totalSize" : 3,
21          "done" : true,
22          "records" : [ {
23            "attributes" : {
24              "type" : "OrderItem",
25              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWBIA4"
26            },
27            "Id" : "802D0000000CIWBIA4"
28          }, {
29            "attributes" : {
30              "type" : "OrderItem",
31              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWCIA4"
32            },
33            "Id" : "802D0000000CIWCIA4"
34          }, {
35            "attributes" : {
36              "type" : "OrderItem",
37              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWDIA4"
38            },
39            "Id" : "802D0000000CIWDIA4"
40          } ]
41        },
42        "Custom_Objects__r" : null
43      } ]
44    },
45    "Test_Contract1__r" : null
46  } ]
47}