BokaMera.API.Host

<back to all web services

CreateRebateCodeTransaction

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
POST/rebatecodes/transactionsCreate transaction for the rebate codeCreate transaction for the rebate code
CreateRebateCodeTransaction Parameters:
NameParameterData TypeRequiredDescription
CompanyIdbodyGuid?Yes
RebateCodeIdbodyintYesRebate code id to which you wish to add transaction
AmountbodydoubleYes
UsagebodyintYes
BookingIdbodyint?No
ChangeTypebodyAmountChangeTypeYesIf you want to Increase = 0 or Decrease = 1 the value
AmountChangeType Enum:
Increase
Decrease
RebateCodeTransactionResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
RebateCodeTransactionItemformRebateCodeTransactionQueryResponseNo
RebateCodeTransactionQueryResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CompanyIdformGuidNo
NoteformstringNo
RebateCodeIdformintNo
RebateCodeSignformstringNo
RebateCodeTypeIdformint?No
RebateCodeTypeNameformstringNo
AmountformdoubleNo
BookingIdformint?No
UpdatedDateformDateTimeNo
CreatedDateformDateTimeNo
ServiceformRebateCodeServiceResponseNo
CustomerformRebateCodeCustomerResponseNo
PriceSignformstringNo
RebateCodeServiceResponse Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo
ActiveformboolNo
RebateCodeCustomerResponse Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
FirstnameformstringNo
LastnameformstringNo
EmailformstringNo
PhoneformstringNo
ImageUrlformstringNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
Content-Type: application/json
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: application/json
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"}}