POST api/v1/secondarymarket/sell

Sell your loans to secondary market.

Requires authorization!

Requires scope SmSell

Response Codes

  • 202 - Successfully accepted sell request.
  • 400 - No items specified
  • 400 - Too many items. Max items 100
  • 401 - User is not Authorized
  • 403 - User has no rights
  • 404 - Not found
  • 409 - Investment cannot be sold

Request Information

URI Parameters

None.

Body Parameters

SecondMarketSaleRequest
NameDescriptionTypeAdditional information
Items

LoanParts to sell

Collection of SecondMarketSell

None.

CancelItemOnPaymentReceived

Allows auto cancellation of loans on sale if they receive new repayments

boolean

None.

CancelItemOnReschedule

Allows auto cancellation of loans on sale if they are rescheduled

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Items": [
    {
      "LoanPartId": "23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c",
      "DesiredDiscountRate": 2
    },
    {
      "LoanPartId": "23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c",
      "DesiredDiscountRate": 2
    }
  ],
  "CancelItemOnPaymentReceived": true,
  "CancelItemOnReschedule": true
}

application/xml, text/xml

Sample:
<SecondMarketSaleRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models">
  <CancelItemOnPaymentReceived>true</CancelItemOnPaymentReceived>
  <CancelItemOnReschedule>true</CancelItemOnReschedule>
  <Items>
    <SecondMarketSell>
      <DesiredDiscountRate>2</DesiredDiscountRate>
      <LoanPartId>23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c</LoanPartId>
    </SecondMarketSell>
    <SecondMarketSell>
      <DesiredDiscountRate>2</DesiredDiscountRate>
      <LoanPartId>23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c</LoanPartId>
    </SecondMarketSell>
  </Items>
</SecondMarketSaleRequest>

application/x-www-form-urlencoded

Sample:
Items[0][LoanPartId]=23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c&Items[0][DesiredDiscountRate]=2&Items[1][LoanPartId]=23b5004a-ff96-4c5b-bb1b-7a690c7d3a7c&Items[1][DesiredDiscountRate]=2&CancelItemOnPaymentReceived=True&CancelItemOnReschedule=True

Response Information

Resource Description

Sell your loans to secondary market.

ApiResultSecondMarketSale
NameDescriptionTypeAdditional information
Payload

The payload of the response. Type depends on the API request.

Collection of SecondMarketSaleResponse

None.

Success

Indicates if the request was successfull or not. true if the request was handled successfully, false otherwise.

boolean

Required

Errors

Error(s) accociated with the API request.

Collection of ApiError

None.

Response Formats

application/json, text/json

Sample:
{
  "Payload": [
    {
      "Id": "6b43f3a7-7067-4b04-b057-0e8ac6a5ae32",
      "LoanPartId": "51c1fbaa-b3b4-4abb-b852-c69e75d6c9dd",
      "DesiredDiscountRate": 3
    },
    {
      "Id": "6b43f3a7-7067-4b04-b057-0e8ac6a5ae32",
      "LoanPartId": "51c1fbaa-b3b4-4abb-b852-c69e75d6c9dd",
      "DesiredDiscountRate": 3
    }
  ],
  "Success": true,
  "Errors": [
    {
      "Code": 1,
      "Message": "sample string-2",
      "Details": "sample string-3"
    },
    {
      "Code": 1,
      "Message": "sample string-2",
      "Details": "sample string-3"
    }
  ]
}

application/xml, text/xml

Sample:
<ApiResultSecondMarketSale xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models">
  <Errors>
    <ApiError>
      <Code>1</Code>
      <Details>sample string-3</Details>
      <Message>sample string-2</Message>
    </ApiError>
    <ApiError>
      <Code>1</Code>
      <Details>sample string-3</Details>
      <Message>sample string-2</Message>
    </ApiError>
  </Errors>
  <Success>true</Success>
  <Payload>
    <SecondMarketSaleResponse>
      <DesiredDiscountRate>3</DesiredDiscountRate>
      <Id>6b43f3a7-7067-4b04-b057-0e8ac6a5ae32</Id>
      <LoanPartId>51c1fbaa-b3b4-4abb-b852-c69e75d6c9dd</LoanPartId>
    </SecondMarketSaleResponse>
    <SecondMarketSaleResponse>
      <DesiredDiscountRate>3</DesiredDiscountRate>
      <Id>6b43f3a7-7067-4b04-b057-0e8ac6a5ae32</Id>
      <LoanPartId>51c1fbaa-b3b4-4abb-b852-c69e75d6c9dd</LoanPartId>
    </SecondMarketSaleResponse>
  </Payload>
</ApiResultSecondMarketSale>