| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| POST | /voss/usage/{Id}/termination | Create voss usage termination | Add new product to company invoicing. Sends that product to VOSS System. |
|---|
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| CompanyId | body | Guid | Yes | The company id |
| Id | path | string | Yes | Usage Id |
| InvoiceLineTexts | body | List<string> | Yes | |
| TerminationReasonComment | body | string | Yes | |
| TerminationReasonId | body | Guid | No | |
| Behaviour | body | UsageBehaviourEnum | Yes | Credit behaviour: <br /> 1. Full - usage will be credited in full <br /> 2. None - no credit will be created |
| CreditKind | body | CreditKindEnum | Yes | Credit kind: <br /> 1. Normal - default credit type <br /> 2. Internal - corresponding credit will be marked as internal in invoice file line |
| Full | |
| None |
| Normal | |
| Internal |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ScheduledDate | form | DateTime | No | |
| Reason | form | SubscriptionItemTerminationReasonDto | Yes | |
| CreditOptions | form | UsageCreditOptionsDto | Yes | |
| CustomerBalanceChange | form | CustomerBalanceChangeDto | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ReasonId | form | Guid | No | |
| ReasonName | form | string | Yes | |
| ReasonExternalId | form | string | Yes | |
| SubReasonId | form | Guid? | No | |
| SubReasonName | form | string | Yes | |
| SubReasonExternalId | form | string | Yes | |
| Comment | form | string | Yes |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| UsageBehaviour | form | UsageBehaviourEnum | No | |
| CreditKind | form | CreditKindEnum | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| Items | form | List<CustomerBalanceChangeItemDto> | Yes | |
| TotalAmount | form | double | No | |
| TotalDiscountAmount | form | double | No |
| Name | Parameter | Data Type | Required | Description |
|---|---|---|---|---|
| ProductType | form | ProductTypeEnum | No | |
| Id | form | Guid | No | |
| Name | form | string | Yes | |
| ProductGroupId | form | Guid | No | |
| ProductGroupName | form | string | Yes | |
| Quantity | form | double | No | |
| Amount | form | double | No | |
| DiscountAmount | form | double | No | |
| TotalAmount | form | double | No | |
| InvoiceRecipientCustomerId | form | Guid | No |
| Main | |
| Addon | |
| License | |
| Usage |
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /voss/usage/{Id}/termination HTTP/1.1
Host: api.bookmore.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateVossUsageTermination xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<Behaviour>Full</Behaviour>
<CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
<CreditKind>Normal</CreditKind>
<Id>String</Id>
<InvoiceLineTexts xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</InvoiceLineTexts>
<TerminationReasonComment>String</TerminationReasonComment>
<TerminationReasonId>00000000-0000-0000-0000-000000000000</TerminationReasonId>
</CreateVossUsageTermination>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CreateUsageTerminationResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.VossIntegration.ApiTools.Model"> <creditOptions i:nil="true" /> <customerBalanceChange i:nil="true" /> <reason i:nil="true" /> <scheduledDate>0001-01-01T00:00:00</scheduledDate> </CreateUsageTerminationResult>