Operations (sample payloads)

Main operations
Copy

Add record
Copy

Add a new record for a given type.

Sample Input

1
{
2
"record": {
3
"type": "customer",
4
"xmlns_namespace": "listRel"
5
},
6
"fields": [
7
{
8
"name": "entityId",
9
"value": "John Doe"
10
},
11
{
12
"name": "companyName",
13
"value": "Acme Corporation"
14
},
15
{
16
"name": "email",
17
"value": "john.doe@acme.com"
18
},
19
{
20
"name": "phone",
21
"value": "555-123-4567"
22
},
23
{
24
"name": "subsidiary",
25
"attributes": {
26
"internalId": "1"
27
}
28
}
29
]
30
}

Sample Output

1
{
2
"record": {
3
"internalId": 12345,
4
"recordType": "customer"
5
},
6
"isSuccess": true
7
}

Batch add records
Copy

Batch add new records, each for a given type.

Sample Input

1
{
2
"add_record_batch": [
3
{
4
"record": {
5
"type": "customer",
6
"xmlns_namespace": "listRel"
7
},
8
"fields": [
9
{
10
"name": "entityId",
11
"value": "John Doe"
12
},
13
{
14
"name": "companyName",
15
"value": "Acme Corporation"
16
},
17
{
18
"name": "email",
19
"value": "john.doe@acme.com"
20
},
21
{
22
"name": "phone",
23
"value": "555-123-4567"
24
}
25
]
26
},
27
{
28
"record": {
29
"type": "salesOrder",
30
"xmlns_namespace": "transactionSales"
31
},
32
"fields": [
33
{
34
"name": "entity",
35
"attributes": {
36
"internalId": "12345"
37
},
38
"value": "John Doe"
39
},
40
{
41
"name": "tranDate",
42
"value": "2023-05-15"
43
},
44
{
45
"name": "item",
46
"value": [
47
{
48
"item": {
49
"internalId": "67890"
50
},
51
"quantity": 2,
52
"amount": 100
53
}
54
]
55
}
56
]
57
}
58
]
59
}

Sample Output

1
{
2
"response_list": [
3
{
4
"record": {
5
"internalId": 54321,
6
"recordType": "customer"
7
},
8
"isSuccess": true
9
},
10
{
11
"record": {
12
"internalId": 98765,
13
"recordType": "salesOrder"
14
},
15
"isSuccess": true
16
}
17
]
18
}

Batch delete records
Copy

Batch delete records, each for a given type and ID.

Sample Input

1
{
2
"delete_record_batch": [
3
{
4
"record_type": "customer",
5
"internal_id": "12345"
6
},
7
{
8
"record_type": "invoice",
9
"internal_id": "INV10001"
10
},
11
{
12
"record_type": "salesorder",
13
"internal_id": "SO5678"
14
}
15
],
16
"deletion_reason_code": 3,
17
"deletion_reason_memo": "Duplicate records removed as part of data cleanup process."
18
}

Sample Output

1
{
2
"response_list": [
3
{
4
"record": {
5
"internalId": 12345,
6
"recordType": "customer"
7
},
8
"isSuccess": true
9
},
10
{
11
"record": {
12
"internalId": 10001,
13
"recordType": "invoice"
14
},
15
"isSuccess": true
16
},
17
{
18
"record": {
19
"internalId": 5678,
20
"recordType": "salesorder"
21
},
22
"isSuccess": false
23
}
24
]
25
}

Batch get records
Copy

Batch get records, each for a given type and ID.

Sample Input

1
{
2
"batch_get_record": [
3
{
4
"record_type": "customer",
5
"internal_id": "12345"
6
},
7
{
8
"record_type": "invoice",
9
"internal_id": "67890"
10
},
11
{
12
"record_type": "item",
13
"internal_id": "54321"
14
}
15
]
16
}

Sample Output

1
{
2
"response_list": [
3
{
4
"record": {
5
"internalId": 12345,
6
"recordType": "customer"
7
},
8
"isSuccess": true
9
},
10
{
11
"record": {
12
"internalId": 67890,
13
"recordType": "invoice"
14
},
15
"isSuccess": true
16
},
17
{
18
"record": {
19
"internalId": 54321,
20
"recordType": "item"
21
},
22
"isSuccess": true
23
}
24
]
25
}

Batch update records
Copy

Batch update records, each for a given type and ID.

Sample Input

1
{
2
"update_record_batch": [
3
{
4
"record": {
5
"type": "customer",
6
"xmlns_namespace": "listRel"
7
},
8
"fields": [
9
{
10
"name": "companyName",
11
"value": "Acme Corporation"
12
},
13
{
14
"name": "email",
15
"value": "info@acmecorp.com"
16
},
17
{
18
"name": "phone",
19
"value": "555-123-4567"
20
}
21
],
22
"internal_id": "1234"
23
},
24
{
25
"record": {
26
"type": "employee",
27
"xmlns_namespace": "listEmployees"
28
},
29
"fields": [
30
{
31
"name": "firstName",
32
"value": "John"
33
},
34
{
35
"name": "lastName",
36
"value": "Doe"
37
},
38
{
39
"name": "email",
40
"value": "john.doe@company.com"
41
}
42
],
43
"internal_id": "5678"
44
}
45
]
46
}

Sample Output

1
{
2
"response_list": [
3
{
4
"record": {
5
"internalId": 1234,
6
"recordType": "customer"
7
},
8
"isSuccess": true
9
},
10
{
11
"record": {
12
"internalId": 5678,
13
"recordType": "employee"
14
},
15
"isSuccess": true
16
}
17
]
18
}

Batch upsert records
Copy

Batch upsert records, each of a given record type. Existing records will be updated and new records will be added.

Sample Input

1
{
2
"upsert_record_batch": [
3
{
4
"record": {
5
"type": "customer",
6
"xmlns_namespace": "listRel"
7
},
8
"external_id": "CUST001",
9
"fields": [
10
{
11
"name": "companyName",
12
"value": "Acme Corporation"
13
},
14
{
15
"name": "email",
16
"value": "info@acme.com"
17
},
18
{
19
"name": "phone",
20
"value": "555-123-4567"
21
}
22
]
23
},
24
{
25
"record": {
26
"type": "employee",
27
"xmlns_namespace": "listEmployees"
28
},
29
"external_id": "EMP001",
30
"fields": [
31
{
32
"name": "firstName",
33
"value": "John"
34
},
35
{
36
"name": "lastName",
37
"value": "Doe"
38
},
39
{
40
"name": "email",
41
"value": "john.doe@company.com"
42
}
43
]
44
}
45
]
46
}

Sample Output

1
{
2
"response_list": [
3
{
4
"record": {
5
"internalId": 12345,
6
"externalId": "CUST001",
7
"recordType": "customer"
8
},
9
"isSuccess": true
10
},
11
{
12
"record": {
13
"internalId": 67890,
14
"externalId": "EMP001",
15
"recordType": "employee"
16
},
17
"isSuccess": true
18
}
19
]
20
}

Delete record
Copy

Delete a record of a given record type and ID.

Sample Input

1
{
2
"record_type": "customer",
3
"internal_id": "12345",
4
"deletion_reason_code": 3,
5
"deletion_reason_memo": "Customer account closed due to inactivity"
6
}

Sample Output

1
{
2
"isSuccess": true,
3
"deleted_record": {
4
"internalId": 12345,
5
"recordType": "customer"
6
}
7
}

Get account governance info
Copy

Retrieve account governance info.

Sample Input

1
{
2
"key_name": "governance_info"
3
}

Sample Output

1
{
2
"isSuccess": true,
3
"accountConcurrencyLimit": 25,
4
"unallocatedConcurrencyLimit": 15
5
}

Get currency rate
Copy

Retrieve the exchange rate between two currencies based on a certain date.

Sample Input

1
{
2
"base_currency_internal_id": "1",
3
"from_currency_internal_id": "2",
4
"effective_date": "2023-05-15T00:00:00Z"
5
}

Sample Output

1
{
2
"isSuccess": "true",
3
"currencyRateList": [
4
{
5
"baseCurrency": "USD",
6
"fromCurrency": "EUR",
7
"exchangeRate": 0.92,
8
"effectiveDate": "2023-05-15T00:00:00Z"
9
}
10
]
11
}

Get integration governance info
Copy

Retrieve integration governance info.

Sample Input

1
{
2
"key_name": "IntegrationGovernanceKey"
3
}

Sample Output

1
{
2
"isSuccess": true,
3
"accountConcurrencyLimit": 25,
4
"unallocatedConcurrencyLimit": 10
5
}

Get item availability
Copy

Retrieve the inventory availability for a specific list of items.

Sample Input

1
{
2
"items": [
3
1234,
4
5678,
5
"9012"
6
],
7
"last_qty_available_change": "2023-05-01T12:00:00Z"
8
}

Sample Output

1
{
2
"isSuccess": true,
3
"itemAvailabilityList": [
4
{
5
"itemId": 1234,
6
"itemName": "Widget A",
7
"itemType": "inventoryItem",
8
"locationId": 1,
9
"locationName": "Main Warehouse",
10
"lastQtyAvailableChange": "2023-05-02T09:30:00Z",
11
"quantityOnHand": 500,
12
"onHandValueMli": 5000,
13
"reorderPoint": 100,
14
"preferredStockLevel": 300,
15
"quantityOnOrder": 200,
16
"quantityCommitted": 150,
17
"quantityAvailable": 350
18
},
19
{
20
"itemId": 5678,
21
"itemName": "Gadget B",
22
"itemType": "inventoryItem",
23
"locationId": 2,
24
"locationName": "Secondary Warehouse",
25
"lastQtyAvailableChange": "2023-05-01T14:45:00Z",
26
"quantityOnHand": 250,
27
"onHandValueMli": 3750,
28
"reorderPoint": 50,
29
"preferredStockLevel": 200,
30
"quantityOnOrder": 100,
31
"quantityCommitted": 75,
32
"quantityAvailable": 175
33
},
34
{
35
"itemId": 9012,
36
"itemName": "Component C",
37
"itemType": "inventoryItem",
38
"locationId": 1,
39
"locationName": "Main Warehouse",
40
"lastQtyAvailableChange": "2023-05-03T11:15:00Z",
41
"quantityOnHand": 1000,
42
"onHandValueMli": 2000,
43
"reorderPoint": 200,
44
"preferredStockLevel": 500,
45
"quantityOnOrder": 300,
46
"quantityCommitted": 400,
47
"quantityAvailable": 600
48
}
49
]
50
}

Get record
Copy

Retrieve a record of a given type and ID.

Sample Input

1
{
2
"record_type": "customer",
3
"internal_id": "12345"
4
}

Sample Output

1
{
2
"record": {
3
"internalId": 12345,
4
"recordType": "customer",
5
"customFieldList": {
6
"internalId": 67890,
7
"scriptId": "custentity_loyalty_points"
8
}
9
},
10
"isSuccess": true
11
}

List records
Copy

List records for a given type (available only for certain types - state values).

Sample Input

1
{
2
"record_type_list": "currency"
3
}

Sample Output

1
{
2
"totalRecords": 5,
3
"recordList": [
4
{
5
"internalId": 1,
6
"name": "US Dollar"
7
},
8
{
9
"internalId": 2,
10
"name": "Euro"
11
},
12
{
13
"internalId": 3,
14
"name": "British Pound"
15
},
16
{
17
"internalId": 4,
18
"name": "Japanese Yen"
19
},
20
{
21
"internalId": 5,
22
"name": "Canadian Dollar"
23
}
24
],
25
"isSuccess": true
26
}

Search records
Copy

Search records for a given type and criteria (Basic).

Sample Input

1
{
2
"search_record": {
3
"type": "customer",
4
"xmlns_namespace": "listRel"
5
},
6
"search_criteria": [
7
{
8
"name": "email",
9
"attributes": {},
10
"value": "customer@example.com"
11
},
12
{
13
"name": "companyName",
14
"attributes": {},
15
"value": "Example Corp"
16
}
17
],
18
"page_size": 50
19
}

Sample Output

1
{
2
"totalRecords": 2,
3
"pageSize": 50,
4
"totalPages": 1,
5
"pageIndex": 1,
6
"searchId": "WEBSERVICES_3824982_SB1_052320231581851663397605558_28d78",
7
"recordList": [
8
{
9
"attributes": {
10
"internalId": 12345,
11
"externalId": "CUST001",
12
"xsi:type": "listRel:Customer"
13
},
14
"entityId": "Example Corp",
15
"customFieldList": {
16
"customField": [
17
{
18
"attributes": {
19
"internalId": 100,
20
"xsi:type": "StringCustomFieldRef"
21
}
22
}
23
]
24
}
25
},
26
{
27
"attributes": {
28
"internalId": 12346,
29
"externalId": "CUST002",
30
"xsi:type": "listRel:Customer"
31
},
32
"entityId": "Example Corp Subsidiary",
33
"customFieldList": {
34
"customField": [
35
{
36
"attributes": {
37
"internalId": 100,
38
"xsi:type": "StringCustomFieldRef"
39
}
40
}
41
]
42
}
43
}
44
],
45
"isSuccess": true
46
}

Search records (advanced)
Copy

Use a saved search to retrieve records from NetSuite.

Sample Input

1
{
2
"search_record_advanced": {
3
"type": "CustomerSearchAdvanced",
4
"xmlns_namespace": "listRel",
5
"saved_search_id": "customsearch_active_customers"
6
},
7
"page_size": 50,
8
"search_criteria": [
9
{
10
"name": "email",
11
"value": "@example.com"
12
},
13
{
14
"name": "mainline",
15
"value": "true"
16
}
17
]
18
}

Sample Output

1
{
2
"totalRecords": 150,
3
"pageSize": 50,
4
"totalPages": 3,
5
"pageIndex": 1,
6
"searchId": "WEBSERVICES_738373_SB2_052320231653567823957393067_28d7f",
7
"searchRowList": {
8
"searchRow": [
9
{
10
"attributes": {
11
"xsi:type": "listRel:CustomerSearchRow"
12
},
13
"basic": {
14
"email": {
15
"searchValue": "john.doe@example.com"
16
},
17
"entityId": {
18
"searchValue": "John Doe"
19
},
20
"phone": {
21
"searchValue": "555-123-4567"
22
},
23
"salesRep": {
24
"searchValue": {
25
"attributes": {
26
"internalId": 12345
27
}
28
}
29
}
30
}
31
},
32
{
33
"attributes": {
34
"xsi:type": "listRel:CustomerSearchRow"
35
},
36
"basic": {
37
"email": {
38
"searchValue": "jane.smith@example.com"
39
},
40
"entityId": {
41
"searchValue": "Jane Smith"
42
},
43
"phone": {
44
"searchValue": "555-987-6543"
45
},
46
"salesRep": {
47
"searchValue": {
48
"attributes": {
49
"internalId": 67890
50
}
51
}
52
}
53
}
54
}
55
]
56
},
57
"isSuccess": true
58
}

Search records more (by pagination)
Copy

Search more records for a given ID and page.

Sample Input

1
{
2
"search_id": "SEARCH_ID_12345",
3
"page": 2
4
}

Sample Output

1
{
2
"totalRecords": 150,
3
"pageSize": 20,
4
"totalPages": 8,
5
"pageIndex": 2,
6
"searchId": "SEARCH_ID_12345",
7
"recordList": [
8
{
9
"attributes": {
10
"internalId": 1001,
11
"externalId": "EXT001",
12
"xsi:type": "Customer"
13
},
14
"entityId": "CUST001",
15
"customFieldList": {
16
"customField": [
17
{
18
"attributes": {
19
"internalId": 5001,
20
"xsi:type": "StringCustomFieldRef"
21
}
22
}
23
]
24
}
25
},
26
{
27
"attributes": {
28
"internalId": 1002,
29
"externalId": "EXT002",
30
"xsi:type": "Customer"
31
},
32
"entityId": "CUST002",
33
"customFieldList": {
34
"customField": [
35
{
36
"attributes": {
37
"internalId": 5002,
38
"xsi:type": "StringCustomFieldRef"
39
}
40
}
41
]
42
}
43
}
44
],
45
"isSuccess": true
46
}

Update record
Copy

Update a record of a given type and ID.

Sample Input

1
{
2
"internal_id": "12345",
3
"record": {
4
"type": "customer",
5
"xmlns_namespace": "listRel"
6
},
7
"fields": [
8
{
9
"name": "companyName",
10
"value": "Acme Corporation"
11
},
12
{
13
"name": "email",
14
"value": "info@acmecorp.com"
15
},
16
{
17
"name": "phone",
18
"value": "555-123-4567"
19
},
20
{
21
"name": "customField",
22
"attributes": {
23
"scriptId": "custentity_loyalty_level"
24
},
25
"value": "Gold"
26
}
27
]
28
}

Sample Output

1
{
2
"record": {
3
"internalId": 12345,
4
"recordType": "customer"
5
},
6
"isSuccess": true
7
}

Upsert record
Copy

Upsert a record of a given type. Existing records will be updated and new records will be added.

Sample Input

1
{
2
"external_id": "EXT123456",
3
"record": {
4
"type": "customer",
5
"xmlns_namespace": "listRel"
6
},
7
"fields": [
8
{
9
"name": "companyName",
10
"value": "Acme Corporation"
11
},
12
{
13
"name": "email",
14
"value": "info@acmecorp.com"
15
},
16
{
17
"name": "phone",
18
"value": "555-123-4567"
19
},
20
{
21
"name": "addressbook",
22
"attributes": {
23
"addressbooktype": "defaultShipping"
24
},
25
"value": {
26
"addr1": "123 Main St",
27
"city": "Anytown",
28
"state": "CA",
29
"zip": "12345",
30
"country": "US"
31
}
32
}
33
]
34
}

Sample Output

1
{
2
"record": {
3
"internalId": 1234567,
4
"recordType": "customer",
5
"externalId": "EXT123456"
6
},
7
"isSuccess": true
8
}