Customer restricted departments

In shared multi-entity companies, customers can be restricted to specific departments or department groups to prevent the customer from being used in the wrong entity.

List customer restricted departments

get/objects/accounts-receivable/customer-restricted-department

Returns a collection with a key, ID, and link for each customer restricted department. This operation is mostly for use in testing; use query to find objects that meet certain criteria and to specify properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": [
    • {
      • "key": "76",
      • "id": "76",
      • "href": "/objects/accounts-receivable/customer-restricted-department/76"
      },
    • {
      • "key": "77",
      • "id": "77",
      • "href": "/objects/accounts-receivable/customer-restricted-department/77"
      }
    ],
  • "ia::meta": {
    • "totalCount": 2,
    • "start": 1,
    • "pageSize": 100
    }
}

Get a customer restricted department

get/objects/accounts-receivable/customer-restricted-department/{key}

Returns detailed information for a specified customer restricted department.

SecurityOAuth2
Request
path Parameters
key
required
string

System-assigned unique key for the customer restricted department.

Example: 77
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "key": "77",
    • "objectType": "CUSTOMER",
    • "id": "77",
    • "department": {
      • "key": "24",
      • "id": "DES",
      • "href": "/objects/company-config/department/24"
      },
    • "departmentGroup": {
      • "key": null,
      • "id": null
      },
    • "customer": {
      • "key": "330",
      • "id": "D10",
      • "href": "/objects/accounts-receivable/customer/142"
      },
    • "href": "/objects/accounts-receivable/customer-restricted-department/77"
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 1,
    • "totalError": 0
    }
}

Query customer restricted departments

post/services/core/query

Use the query service to find customer restricted departments that meet certain criteria and to specify the properties that are returned.

SecurityOAuth2
Responses
200

OK

400

Bad Request

Request samples
Response samples
application/json
{
  • "ia::result": {
    • "ia::error": {
      • "code": "invalidRequest",
      • "message": "A POST request requires a payload",
      • "errorId": "REST-1028",
      • "additionalInfo": {
        },
      • "supportId": "Kxi78%7EZuyXBDEGVHD2UmO1phYXDQAAAAo"
      }
    },
  • "ia::meta": {
    • "totalCount": 1,
    • "totalSuccess": 0,
    • "totalError": 1
    }
}