Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
POST | /rebatecodes/transactions | Create transaction for the rebate code | Create transaction for the rebate code |
---|
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
CompanyId | body | Guid? | Yes | |
RebateCodeId | body | int | Yes | Rebate code id to which you wish to add transaction |
Amount | body | double | Yes | |
Usage | body | int | Yes | |
BookingId | body | int? | No | |
ChangeType | body | AmountChangeType | Yes | If you want to Increase = 0 or Decrease = 1 the value |
Increase | |
Decrease |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
ResponseStatus | form | ResponseStatus | No | |
RebateCodeTransactionItem | form | RebateCodeTransactionQueryResponse | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
CompanyId | form | Guid | No | |
Note | form | string | No | |
RebateCodeId | form | int | No | |
RebateCodeSign | form | string | No | |
RebateCodeTypeId | form | int? | No | |
RebateCodeTypeName | form | string | No | |
Amount | form | double | No | |
BookingId | form | int? | No | |
UpdatedDate | form | DateTime | No | |
CreatedDate | form | DateTime | No | |
Service | form | RebateCodeServiceResponse | No | |
Customer | form | RebateCodeCustomerResponse | No | |
PriceSign | form | string | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | int | No | |
Name | form | string | No | |
Description | form | string | No | |
Active | form | bool | No |
Name | Parameter | Data Type | Required | Description |
---|---|---|---|---|
Id | form | Guid | No | |
Firstname | form | string | No | |
Lastname | form | string | No | |
form | string | No | ||
Phone | form | string | No | |
ImageUrl | form | string | No |
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /rebatecodes/transactions HTTP/1.1
Host: api.bokamera.se
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
CompanyId: 00000000-0000-0000-0000-000000000000,
RebateCodeId: 0,
Amount: 0,
Usage: 0,
BookingId: 0,
ChangeType: Increase
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { ResponseStatus: { ErrorCode: String, Message: String, StackTrace: String, Errors: [ { ErrorCode: String, FieldName: String, Message: String, Meta: { String: String } } ], Meta: { String: String } }, RebateCodeTransactionItem: { Id: 0, Note: String, RebateCodeId: 0, RebateCodeSign: String, RebateCodeTypeId: 0, RebateCodeTypeName: String, Amount: 0, BookingId: 0, Service: { Id: 0, Name: String, Description: String, Active: False }, Customer: { Firstname: String, Lastname: String, Email: String, Phone: String, ImageUrl: String }, PriceSign: String } }