Skip to content

Update billing automations assignments

POST
/api/connector/v1/billingAutomations/updateAssignments

Add, update or remove billing automation assignments of a specific billing automation.

Billing automation assignments update parameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
EnterpriseId

Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.

string format: uuid
nullable
BillingAutomationId
required

Unique identifier of the billing automation.

string format: uuid
AssignmentsToAdd

Parameters for adding new assignments (or null if not being updated).

Array<object>
nullable <= 20 items
Billing automation assignment add parameters
object
ServiceId
required

Unique identifier of the related service.

string format: uuid
RoutedItemTypes
required
Billing automation item types parameters

Type of items that are going to be routed.

object
SpaceOrder
required

Space order

boolean
CityTax
required

City tax

boolean
AllProducts
required

All products

boolean
Deposits
required

Deposits

boolean
AdditionalExpenses
required

Additional expenses

boolean
AllCustomItems
required

All custom items

boolean
RateIds

Unique identifiers of Rates that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
ProductCategoryIds

Unique identifiers of Product Categories that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
ProductIds

Unique identifiers of Products that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
AccountingCategories

List of accounting categories that will be applied as billing automation condition.

Array<object>
nullable <= 100 items
Billing automation accounting category assignment
object
AccountingCategoryId
required

Unique identifier of the accounting category.

string format: uuid
ItemTypes
required
Accounting category routed item types

Type of the accounting category routed item.

object
Products
required

Specifies whether products under the given accounting category are routed.

boolean
CustomItems
required

Specifies whether custom items under the given accounting category are routed.

boolean
AssignmentsToUpdate

List of parameters for updating existing assignments (or null if not being updated).

Array<object>
nullable <= 20 items
Billing automation assignment update parameters
object
BillingAutomationAssignmentId
required

Unique identifier of the billing automation assignment.

string format: uuid
RoutedItemTypes
Billing automation item types update parameters

Type of items that are going to be routed (or null should it not be updated).

object
SpaceOrder
Boolean update value

Space order (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
CityTax
Boolean update value

City tax (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AllProducts
Boolean update value

Products (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
Deposits
Boolean update value

Deposits(or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AdditionalExpenses
Boolean update value

Additional expenses (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AllCustomItems
Boolean update value

Custom items (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
RateIds
Guid array update value

Unique identifiers of Rates that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
ProductCategoryIds
Guid array update value

Unique identifiers of Product Categories that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
ProductIds
Guid array update value

Unique identifiers of Products that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
AccountingCategories
Billing automation accounting category assignment array update value

List of Accounting Categories with their ItemTypes that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<object>
nullable
Billing automation accounting category assignment
object
AccountingCategoryId
required

Unique identifier of the accounting category.

string format: uuid
ItemTypes
required
Accounting category routed item types

Type of the accounting category routed item.

object
Products
required

Specifies whether products under the given accounting category are routed.

boolean
CustomItems
required

Specifies whether custom items under the given accounting category are routed.

boolean
AssignmentIdsToRemove

List of unique identifiers for assignments to be removed (or null if not being updated).

Array<string>
nullable <= 100 items
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"BillingAutomationId": "ecd64eec-4423-4c65-b844-814b9199856d",
"AssignmentsToUpdate": [
{
"BillingAutomationAssignmentId": "00000000-0000-0000-0000-000000000000",
"RoutedItemTypes": {
"SpaceOrder": {
"Value": true
},
"CityTax": {
"Value": true
},
"AllProducts": {
"Value": false
},
"Deposits": {
"Value": true
},
"AdditionalExpenses": {
"Value": true
},
"AllCustomItems": {
"Value": false
}
},
"ProductIds": {
"Value": [
"507d93e6-9fb5-4734-a6d1-977afc4dfdff"
]
}
}
]
}

OK

Billing automation assignments update parameters
object
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
EnterpriseId

Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.

string format: uuid
nullable
BillingAutomationId
required

Unique identifier of the billing automation.

string format: uuid
AssignmentsToAdd

Parameters for adding new assignments (or null if not being updated).

Array<object>
nullable <= 20 items
Billing automation assignment add parameters
object
ServiceId
required

Unique identifier of the related service.

string format: uuid
RoutedItemTypes
required
Billing automation item types parameters

Type of items that are going to be routed.

object
SpaceOrder
required

Space order

boolean
CityTax
required

City tax

boolean
AllProducts
required

All products

boolean
Deposits
required

Deposits

boolean
AdditionalExpenses
required

Additional expenses

boolean
AllCustomItems
required

All custom items

boolean
RateIds

Unique identifiers of Rates that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
ProductCategoryIds

Unique identifiers of Product Categories that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
ProductIds

Unique identifiers of Products that will be applied as billing automation condition.

Array<string>
nullable <= 100 items
AccountingCategories

List of accounting categories that will be applied as billing automation condition.

Array<object>
nullable <= 100 items
Billing automation accounting category assignment
object
AccountingCategoryId
required

Unique identifier of the accounting category.

string format: uuid
ItemTypes
required
Accounting category routed item types

Type of the accounting category routed item.

object
Products
required

Specifies whether products under the given accounting category are routed.

boolean
CustomItems
required

Specifies whether custom items under the given accounting category are routed.

boolean
AssignmentsToUpdate

List of parameters for updating existing assignments (or null if not being updated).

Array<object>
nullable <= 20 items
Billing automation assignment update parameters
object
BillingAutomationAssignmentId
required

Unique identifier of the billing automation assignment.

string format: uuid
RoutedItemTypes
Billing automation item types update parameters

Type of items that are going to be routed (or null should it not be updated).

object
SpaceOrder
Boolean update value

Space order (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
CityTax
Boolean update value

City tax (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AllProducts
Boolean update value

Products (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
Deposits
Boolean update value

Deposits(or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AdditionalExpenses
Boolean update value

Additional expenses (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
AllCustomItems
Boolean update value

Custom items (or null should it not be updated).

object
Value

Value which is to be updated.

boolean
RateIds
Guid array update value

Unique identifiers of Rates that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
ProductCategoryIds
Guid array update value

Unique identifiers of Product Categories that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
ProductIds
Guid array update value

Unique identifiers of Products that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<string>
nullable
AccountingCategories
Billing automation accounting category assignment array update value

List of Accounting Categories with their ItemTypes that will be applied as billing automation condition (or null should it not be updated).

object
Value

Value which is to be updated.

Array<object>
nullable
Billing automation accounting category assignment
object
AccountingCategoryId
required

Unique identifier of the accounting category.

string format: uuid
ItemTypes
required
Accounting category routed item types

Type of the accounting category routed item.

object
Products
required

Specifies whether products under the given accounting category are routed.

boolean
CustomItems
required

Specifies whether custom items under the given accounting category are routed.

boolean
AssignmentIdsToRemove

List of unique identifiers for assignments to be removed (or null if not being updated).

Array<string>
nullable <= 100 items
Example
{
"BillingAutomations": [
{
"Id": "ecd64eec-4423-4c65-b844-814b9199856d",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Name": "Continuous billing automation for company XYZ",
"Description": "Billing Automation for company XYZ with prepayment all, company as owner.",
"CompaniesWithRelations": [
{
"CompanyId": "c6f5c82d-621a-4c8a-903b-1b0a9a23b71f",
"CompanyRelations": {
"PartnerCompany": true,
"TravelAgency": false
}
}
],
"Prepayment": "All",
"AssignmentTargetType": "CompanyAsOwner",
"TriggerType": "Continuous",
"BillAggregationType": "AggregateAll",
"CreatedUtc": "2017-01-31T10:58:06Z",
"ProcessingStartOffset": null,
"OrderItemConsumptionPeriod": null,
"Assignments": [
{
"Id": "d6b550e9-9c4b-42dd-9daa-555312b030e6",
"BillingAutomationId": "ecd64eec-4423-4c65-b844-814b9199856d",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"RoutedItemTypes": {
"SpaceOrder": true,
"CityTax": true,
"AllProducts": true,
"Deposits": true,
"AdditionalExpenses": false,
"AllCustomItems": false
},
"RateIds": [
"ab3682ba-4493-4eb0-bcdc-8d000f5bad65"
],
"ProductCategoryIds": [
"599c477e-b826-4444-8ded-4fa7276ef0c1"
],
"ProductIds": [
"f0184ec2-9f02-4026-9b70-0b2bed2adde7"
],
"AccountingCategoryAssignments": [
{
"AccountingCategoryId": "2e0f5930-605e-4a23-9994-a7701a56b576",
"ItemTypes": {
"Products": true,
"CustomItems": false
}
}
]
}
]
}
]
}

Server has successfully fulfilled the request and there is no additional information to send back.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see Request timeouts

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by too many requests sent in a given amount of time. Response contains Retry-After header indicating how long the user agent should wait before making a follow-up request. For more information, see Request limits.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our documentation repository.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable