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": "e4271353-29e3-4515-b361-9d9ef3268605",
      "DesiredDiscountRate": 2
    },
    {
      "LoanPartId": "e4271353-29e3-4515-b361-9d9ef3268605",
      "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>e4271353-29e3-4515-b361-9d9ef3268605</LoanPartId>
    </SecondMarketSell>
    <SecondMarketSell>
      <DesiredDiscountRate>2</DesiredDiscountRate>
      <LoanPartId>e4271353-29e3-4515-b361-9d9ef3268605</LoanPartId>
    </SecondMarketSell>
  </Items>
</SecondMarketSaleRequest>

application/x-www-form-urlencoded

Sample:
Items[0][LoanPartId]=e4271353-29e3-4515-b361-9d9ef3268605&Items[0][DesiredDiscountRate]=2&Items[1][LoanPartId]=e4271353-29e3-4515-b361-9d9ef3268605&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": "1988aa24-a60b-40b0-af7e-448610dfb63e",
      "LoanPartId": "f70683e0-f3bd-49e3-9b10-919b096d537b",
      "DesiredDiscountRate": 3
    },
    {
      "Id": "1988aa24-a60b-40b0-af7e-448610dfb63e",
      "LoanPartId": "f70683e0-f3bd-49e3-9b10-919b096d537b",
      "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>1988aa24-a60b-40b0-af7e-448610dfb63e</Id>
      <LoanPartId>f70683e0-f3bd-49e3-9b10-919b096d537b</LoanPartId>
    </SecondMarketSaleResponse>
    <SecondMarketSaleResponse>
      <DesiredDiscountRate>3</DesiredDiscountRate>
      <Id>1988aa24-a60b-40b0-af7e-448610dfb63e</Id>
      <LoanPartId>f70683e0-f3bd-49e3-9b10-919b096d537b</LoanPartId>
    </SecondMarketSaleResponse>
  </Payload>
</ApiResultSecondMarketSale>