Creates a commission rate
Header parameters
Brand-URLstringRequiredExample:
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Auth-KeystringRequiredExample:
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
YOUR_AUTH_KEY
Body
This class represents the commission rate command request DTO.
typestring · enumOptionalPossible values:
unitstring · min: 1Required
The unit of the commission rate.
quantityFrominteger · int32 | nullableOptional
The quantity from.
quantityTointeger · int32 | nullableOptional
The quantity to.
percentagenumber · doubleRequired
The percentage.
descriptionstring | nullableOptional
The description.
isDefaultbooleanOptional
The default commission rate. By default, it is set to false.
Responses
200
The request was successful.
application/json
401
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
application/json
403
The user's access was denied.
application/json
404
The user was not found in the database.
application/json
post
POST /api/v1/commission-rates HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 122
{
"type": "1 - Discount",
"unit": "text",
"quantityFrom": 1,
"quantityTo": 1,
"percentage": 1,
"description": "text",
"isDefault": true
}
{
"success": true,
"statusCode": 200,
"message": "The request was successful.",
"data": {
"id": "sApKpllz4sAplsmzha",
"brandId": "BRAND-ID",
"user": {
"id": "Plamxinzg18snza",
"code": "EXAMPLE",
"avatar": "https://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50",
"packageId": "1Plamxinzg18snza",
"packageCode": "PACKAGE",
"emailAddress": "[email protected]",
"nickName": "example",
"roles": [
"admin",
"support"
]
},
"type": "Discount",
"description": "description",
"quantityFrom": 1,
"quantityTo": 10,
"unit": "unit",
"percentage": 10,
"isDefault": true
},
"errors": []
}
Last updated
Was this helpful?