Create Commission

POST /v1/transactions/{transactionId}/tiers/{tierId}/commissions

Path parameters

  • transactionId string(uuid) Required

    The id of the transaction.

  • tierId string(uuid) Required

    The id of the tier.

application/json

Body

The commission to create.

  • id string(uuid)

    The unique id.

  • createdTimestamp string(date-time) | null

    The date and time of creation in UTC time.

  • modifiedTimestamp string(date-time) | null

    The date and time last modification in UTC time.

  • agentId string(uuid) Required

    The unique id of the agent that gets the commission.

  • amount number(currency)

    The total commission amount the agent is receiving. This includes any fees that were subtracted.

  • percentage number(double)

    The percentage of the total commission for the agent. This will be specified as a decimal. For example, 5% will be specified as 0.05.

  • endCode string Required

    The code representing the end or side of the transaction.

    Values are B or S.

  • endCount number(double) Required

    The total number of ends or sides this commission represents.

    Minimum value is 0, maximum value is 2.

  • calculationMethodCode string | null

    The code representing the calculation method used for the commission. This will be "A" for amount or "P" for percentage.

    Values are A or P.

  • taxAmount number(currency)

    The total amount in tax applied to the commission.

  • totalFeeAmount number(currency)

    The total amount of fees applied to the commission.

  • totalFeeTaxAmount number(currency)

    The total amount in tax applied to just the fees for the commission.

  • fees array[object] | null

    The list of fees associated with the commission.

    Represents a fee that is related to a commission.

    Hide fees attributes Show fees attributes object
    • id string(uuid)

      The unique id.

    • createdTimestamp string(date-time) | null

      The date and time of creation in UTC time.

    • modifiedTimestamp string(date-time) | null

      The date and time last modification in UTC time.

    • percentage number(double)

      The percentage of the commission. This will be specified as a decimal. For example, 5% will be specified as 0.05.

    • amount number(currency)

      The amount of the fee.

    • calculationMethodCode string | null

      The code for the method used to calculate the fee.

      Values are A or P.

    • taxAmount number(currency)

      The amount of tax applied to the fee.

    • taxPercentage number(double)

      The tax rate applied to the fee. This will be specified as a decimal. For example, 5% will be specified as 0.05.

    • paymentMethodCode string | null

      The code for the method used to pay the fee.

    • fee object

      A read only representation of a fee associated with a transaction.

      Additional properties are NOT allowed.

  • agent object

    A read only representation of an agent.

    Additional properties are NOT allowed.

  • office object

    A read only representation of an office.

    Additional properties are NOT allowed.

Responses

  • 200

    OK

  • 201 application/json

    Request succeeded.

    Hide response attributes Show response attributes object
    • id string(uuid)

      The unique id.

    • createdTimestamp string(date-time) | null

      The date and time of creation in UTC time.

    • modifiedTimestamp string(date-time) | null

      The date and time last modification in UTC time.

    • agentId string(uuid) Required

      The unique id of the agent that gets the commission.

    • officeId string(uuid)

      The unique id of the office with which the agent is associated.

    • amount number(currency)

      The total commission amount the agent is receiving. This includes any fees that were subtracted.

    • percentage number(double)

      The percentage of the total commission for the agent. This will be specified as a decimal. For example, 5% will be specified as 0.05.

    • endCode string Required

      The code representing the end or side of the transaction.

      Values are B or S.

    • endCount number(double) Required

      The total number of ends or sides this commission represents.

      Minimum value is 0, maximum value is 2.

    • calculationMethodCode string | null

      The code representing the calculation method used for the commission. This will be "A" for amount or "P" for percentage.

      Values are A or P.

    • taxAmount number(currency)

      The total amount in tax applied to the commission.

    • totalFeeAmount number(currency)

      The total amount of fees applied to the commission.

    • totalFeeTaxAmount number(currency)

      The total amount in tax applied to just the fees for the commission.

    • fees array[object] | null

      The list of fees associated with the commission.

      Represents a fee that is related to a commission.

      Hide fees attributes Show fees attributes object
      • id string(uuid)

        The unique id.

      • createdTimestamp string(date-time) | null

        The date and time of creation in UTC time.

      • modifiedTimestamp string(date-time) | null

        The date and time last modification in UTC time.

      • percentage number(double)

        The percentage of the commission. This will be specified as a decimal. For example, 5% will be specified as 0.05.

      • amount number(currency)

        The amount of the fee.

      • calculationMethodCode string | null

        The code for the method used to calculate the fee.

        Values are A or P.

      • taxAmount number(currency)

        The amount of tax applied to the fee.

      • taxPercentage number(double)

        The tax rate applied to the fee. This will be specified as a decimal. For example, 5% will be specified as 0.05.

      • paymentMethodCode string | null

        The code for the method used to pay the fee.

      • fee object

        A read only representation of a fee associated with a transaction.

        Additional properties are NOT allowed.

        Hide fee attributes Show fee attributes object
        • shortName string | null

          The short name of the fee.

        • name string | null

          The name of the fee.

    • agent object

      A read only representation of an agent.

      Additional properties are NOT allowed.

      Hide agent attributes Show agent attributes object
      • firstName string | null

        The first name of the agent.

      • middleName string | null

        The middle name of the agent.

      • lastName string | null

        The last name of the agent.

    • office object

      A read only representation of an office.

      Additional properties are NOT allowed.

      Hide office attributes Show office attributes object
      • name string | null

        The name of the office.

      • code string | null

        The code for the office.

  • 400 application/json

    Invalid request. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

  • 401 application/json

    Unauthorized. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

  • 403 application/json

    Permission denied. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

  • 404 application/json

    Not found. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

  • 409 application/json

    Conflict. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

  • 422 application/json

    Validation failed. See response body for details.

    Hide response attributes Show response attributes object
    • id string

      The unique identifier for the error.

    • code integer(int32)

      A code used to help identify the type of error. This is typically set to the same value as the http status code.

    • message string

      A summary or short message describing the error.

    • details array[string] | null

      A list of more detailed errors messages.

POST /v1/transactions/{transactionId}/tiers/{tierId}/commissions
curl \
 --request POST 'https://api.lwolf.com/backoffice/v1/transactions/{transactionId}/tiers/{tierId}/commissions' \
 --header "Content-Type: application/json" \
 --data '{"id":"string","fees":[{"id":"string","fee":{"name":"string","shortName":"string"},"amount":0,"taxAmount":0,"percentage":0,"taxPercentage":0,"createdTimestamp":"string","modifiedTimestamp":"string","paymentMethodCode":"string","calculationMethodCode":"A"}],"agent":{"lastName":"string","firstName":"string","middleName":"string"},"amount":0,"office":{"code":"string","name":"string"},"agentId":"string","endCode":"B","endCount":0,"officeId":"string","taxAmount":0,"percentage":0,"totalFeeAmount":0,"createdTimestamp":"string","modifiedTimestamp":"string","totalFeeTaxAmount":0,"calculationMethodCode":"A"}'
Request example
{
  "id": "string",
  "fees": [
    {
      "id": "string",
      "fee": {
        "name": "string",
        "shortName": "string"
      },
      "amount": 0,
      "taxAmount": 0,
      "percentage": 0,
      "taxPercentage": 0,
      "createdTimestamp": "string",
      "modifiedTimestamp": "string",
      "paymentMethodCode": "string",
      "calculationMethodCode": "A"
    }
  ],
  "agent": {
    "lastName": "string",
    "firstName": "string",
    "middleName": "string"
  },
  "amount": 0,
  "office": {
    "code": "string",
    "name": "string"
  },
  "agentId": "string",
  "endCode": "B",
  "endCount": 0,
  "officeId": "string",
  "taxAmount": 0,
  "percentage": 0,
  "totalFeeAmount": 0,
  "createdTimestamp": "string",
  "modifiedTimestamp": "string",
  "totalFeeTaxAmount": 0,
  "calculationMethodCode": "A"
}
Response examples (201)
{
  "id": "string",
  "fees": [
    {
      "id": "string",
      "fee": {
        "name": "string",
        "shortName": "string"
      },
      "amount": 0,
      "taxAmount": 0,
      "percentage": 0,
      "taxPercentage": 0,
      "createdTimestamp": "string",
      "modifiedTimestamp": "string",
      "paymentMethodCode": "string",
      "calculationMethodCode": "A"
    }
  ],
  "agent": {
    "lastName": "string",
    "firstName": "string",
    "middleName": "string"
  },
  "amount": 0,
  "office": {
    "code": "string",
    "name": "string"
  },
  "agentId": "string",
  "endCode": "B",
  "endCount": 0,
  "officeId": "string",
  "taxAmount": 0,
  "percentage": 0,
  "totalFeeAmount": 0,
  "createdTimestamp": "string",
  "modifiedTimestamp": "string",
  "totalFeeTaxAmount": 0,
  "calculationMethodCode": "A"
}
Response examples (400)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}
Response examples (401)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}
Response examples (403)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}
Response examples (404)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}
Response examples (409)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}
Response examples (422)
{
  "id": "string",
  "code": 0,
  "details": [
    "string"
  ],
  "message": "string"
}