Permånad Partner API (1.1.4)

Download OpenAPI specification:Download

Permånad <Leasecloud AB>: hello@permanad.se URL: https://www.leasecloud.com

About our REST API

Our REST API is a core building block of the LeaseCloud Platform. You can use it to create, retrieve and update orders from your sales or e-commerce platform. How to integrate LeaseCloud into your own product is completely up to you.

API functionality

This API enables you to integrate Permånad services into your e-commerce or sales platform. With this API you can:

  • Retrieve payment terms and tariffs.
  • Calculate pricing for products and leasing duration including buyout cost and insurance cost.
  • Create new orders.
  • Retrieve information about a specific order.
  • Retrieve all orders with information about their statuses, contract information, contract length and months to expiry.
  • Update orders with your own unique internal order ID.

Rate limiting

This API enforces a rate limit of 100 requests per 5 minutes per IP.

Polling for order data updates

  • Polling Frequency: Limit polling to once every 1 minutes per order. Frequent polling (e.g., every second) is discouraged as it may lead to rate-limiting or throttling.
  • Retry on Failures: In case of a failed request, implement an exponential backoff strategy (e.g., wait 1 minute, then 2 minutes, etc.) to retry. Avoid immediate retries to prevent overwhelming the API.
  • Rate-Limiting Awareness: Respect our rate-limiting policy of 100 requests per 5 minutes. Requests exceeding the limit will receive a 429 Too Many Requests response.

API keys

The API utilizes a secure bearer token authentication for access.

LeaseCloud supports ordering in Sweden, Denmark, Norway and Finland. You need a separate API key for each market that can be obtained from the LeaseCloud Dev team. We offer a Sandbox development environment for testing.

Order Process

  1. Create Order: Submit a new order request.
  2. Monitor Order Status: Repeatedly query the “Get Order Details” endpoint until the status changes to “readyToShip”
  3. Handle Declined Orders: If the order status is “declined” leasing cannot be offered to the customer for the specified amount. Information has been send to end customer.

Partner

Calculate monthly amount of price

Authorizations:
bearerAuth
Request Body schema: application/json
required
price
integer

The total price of the product or service in cents

Responses

Request samples

Content type
application/json
{
  • "price": 0
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Partner Information

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Orders

Create Order

Authorizations:
bearerAuth
Request Body schema: application/json
required
partnerId
string

The partner's identifier

internalOrderId
string

The partner's internal order identifier

months
required
number

The number of months for which the order applies

invoiceInterval
string
Enum: "MONTHLY" "QUARTERLY"

The invoicing interval

ownInsurance
required
boolean

Whether the customer has their own insurance

company
required
string

The company name

orgNumber
required
string

The company's organization number

nin
required
string

The orderer's national identification number in the format YYYYMMDD(-)XXXX, used to check for blacklisted customers and board members

authorizedSignatory
string

The authorized signatory's email address (optional)

firstName
required
string

The customer's first name

lastName
required
string

The customer's last name

email
required
string

The customer's email address, also used to check for blacklisted customers

phone
required
string

The customer's phone number, also used to check for blacklisted customers

billingAddress
required
string

The billing address

billingAddress2
string

Additional billing address line (optional)

billingCity
required
string

The billing city

billingPostalCode
required
string

The billing postal code

billingCountry
required
string

The billing country (ISO 2-letter code)

shippingFirstName
string

The shipping first name (optional)

shippingLastName
string

The shipping last name (optional)

shippingAddress
string

The shipping address (optional)

shippingAddress2
string

Additional shipping address line (optional)

shippingCity
string

The shipping city (optional)

shippingPostalCode
string

The shipping postal code (optional)

shippingAmount
number

The shipping amount in cents (optional)

shippingVAT
number

The shipping VAT in cents (optional)

customerIp
string

The customer's IP address (optional). Used to check for blacklisted customers

required
Array of objects

Array of order items

statusTrigger
enum
Enum: "READY_TO_SHIP" "ACTIVE" "CANCELLED" "DECLINED"

The status trigger for the order (optional, only for testing)

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string",
  • "internalOrderId": "string",
  • "months": 0,
  • "invoiceInterval": "MONTHLY",
  • "ownInsurance": true,
  • "company": "string",
  • "orgNumber": "string",
  • "nin": "string",
  • "authorizedSignatory": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "phone": "string",
  • "billingAddress": "string",
  • "billingAddress2": "string",
  • "billingCity": "string",
  • "billingPostalCode": "string",
  • "billingCountry": "string",
  • "shippingFirstName": "string",
  • "shippingLastName": "string",
  • "shippingAddress": "string",
  • "shippingAddress2": "string",
  • "shippingCity": "string",
  • "shippingPostalCode": "string",
  • "shippingAmount": 0,
  • "shippingVAT": 0,
  • "customerIp": "string",
  • "items": [
    ],
  • "statusTrigger": "READY_TO_SHIP"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Orders

Fetch paginated partner orders.

Authorizations:
bearerAuth
query Parameters
page
integer >= 1
Default: 1

The page number

limit
integer [ 1 .. 100 ]
Default: 50

The number of items per page

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get Order Details

Authorizations:
bearerAuth
path Parameters
publicId
required
string

The order's public identifier

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update Order

Authorizations:
bearerAuth
path Parameters
publicId
required
string
Request Body schema: application/json
required
internalOrderId
string

The partner's internal order identifier

Responses

Request samples

Content type
application/json
{
  • "internalOrderId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    }
}