Get Details About a Contract

Here’s an example of a GET request using the Contract-based Orders resource to query details about a contract and its child orders, order products, and custom objects.

Example usage 

1/services/data/v30.0/commerce/sale/800D0000000PFHp

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" : 4,
12      "done" : true,
13      "records" : [ {
14        "attributes" : {
15          "type" : "Order",
16          "url" : "/services/data/v30.0/sobjects/Order/801D0000000FqzsIAC"
17        },
18        "Id" : "801D0000000FqzsIAC",
19        "OrderItems" : {
20          "totalSize" : 3,
21          "done" : true,
22          "records" : [ {
23            "attributes" : {
24              "type" : "OrderItem",
25              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CJX0IAO"
26            },
27            "Id" : "802D0000000CJX0IAO"
28          }, {
29            "attributes" : {
30              "type" : "OrderItem",
31              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CJYDIA4"
32            },
33            "Id" : "802D0000000CJYDIA4"
34          }, {
35            "attributes" : {
36              "type" : "OrderItem",
37              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CKFCIA4"
38            },
39            "Id" : "802D0000000CKFCIA4"
40          } ]
41        },
42        "Custom_Objects__r" : null
43      }, {
44        "attributes" : {
45          "type" : "Order",
46          "url" : "/services/data/v30.0/sobjects/Order/801D0000000FpNEIA0"
47        },
48        "Id" : "801D0000000FpNEIA0",
49        "OrderItems" : {
50          "totalSize" : 3,
51          "done" : true,
52          "records" : [ {
53            "attributes" : {
54              "type" : "OrderItem",
55              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWBIA4"
56            },
57            "Id" : "802D0000000CIWBIA4"
58          }, {
59            "attributes" : {
60              "type" : "OrderItem",
61              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWCIA4"
62            },
63            "Id" : "802D0000000CIWCIA4"
64          }, {
65            "attributes" : {
66              "type" : "OrderItem",
67              "url" : "/services/data/v30.0/sobjects/OrderItem/802D0000000CIWDIA4"
68            },
69            "Id" : "802D0000000CIWDIA4"
70          } ]
71        },
72        "Custom_Objects__r" : null
73      }, {
74        "attributes" : {
75          "type" : "Order",
76          "url" : "/services/data/v30.0/sobjects/Order/801D0000000FqztIAC"
77        },
78        "Id" : "801D0000000FqztIAC",
79        "OrderItems" : null,
80        "Custom_Objects__r" : null
81      }, {
82        "attributes" : {
83          "type" : "Order",
84          "url" : "/services/data/v30.0/sobjects/Order/801D0000000FpkNIAS"
85        },
86        "Id" : "801D0000000FpkNIAS",
87        "OrderItems" : null,
88        "Custom_Objects__r" : null
89      } ]
90    },
91    "Test_Contract1__r" : null
92  } ]
93}