Credable API Hub

Credable API Documentation

Welcome to the Credable API Documentation. You'll find comprehensive guides and documentation to help you start working with Credable® as quickly as possible, as well as support if you get stuck. If you need any help, or would like to request an API key for one of our API's, email developer@credable.se.

    
Suggest Edits

Using the Connect API

Learn how to use the Connect API to enable sellers on your platform to get quotes for insurance sent directly to their mailbox.

 

Credable's Connect API enables partners and affilates of Credable to send an insurance quote for a single invoice direct to an email address. The email will include the name of the buyer, the unique identifier of the buyer and a premium or "insurance price". To activate the insurance, a user must complete the on-boarding process and pay the premium within 24 hours.

Credable verifies the identity of any new users and requires the user to sign an insurance policy before paying the premium. After successful purchase of insurance, a user gets a receipt sent to their email address and can view their insurance anytime in their dashboard.

This insurance is active for invoices sent 15 days before and 15 days after purchase date up to the invoice amount specified and only for that single buyer.

All future quotes will only require a payment to activate unless a new policy has been issued for the user to sign.

The request/user flow is as follows:

1. Request a quote
2. Review your mailbox to view your quote
3. Click to purchase insurance direct on Credable's platform

1. Request a quote

You can request a quote using your Connect API key and the /quote-requests/ method.

Credable current requires:

  • payment terms
  • invoice amount
  • invoice currency
  • invoice number (seller's invoice number)
  • invoice reference (your internal unique reference number)
  • seller email address
  • seller country
  • seller identifier (See: Seller/Buyer Identifiers).
  • buyer country
  • buyer identifier (See: Seller/Buyer Identifiers).

Optional parameters include:

  • invoice issue date
  • invoice due date
  • discount code
  • seller first name
  • seller last name
  • seller language (lowercase two letter code, i.e. "en". See ISO 639-1 codes)

2. Review your mailbox to view your quote

The seller email will receive the quote direct to their mailbox. The view will look similar to the image below:

View of a quote sent to email from a Connect request.

View of a quote sent to email from a Connect request.

3. Click to purchase insurance

The seller now has the option to insure the invoice and finish the on-boarding process on Credable's platform. Based on the seller's relationship to Credable, they will either be asked to sign our insurance policy and/or complete a KYC process before having the option to purchase insurance with different payment methods.

Suggest Edits

/quote-requests/

Create Quote Request

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/connect/v1/quote-requests/
curl --request POST \
  --url https://staging.credable.se/connect/v1/quote-requests/
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/connect/v1/quote-requests/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/connect/v1/quote-requests/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/connect/v1/quote-requests/");

xhr.send(data);
import requests

url = "https://staging.credable.se/connect/v1/quote-requests/"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": "g7j19xz48a6dAM",
    "seller_identifier": "5591293013",
    "seller_country": "SE",
    "seller_email": "hello@credable.se",
    "seller_language": "sv",
    "seller_first_name": "Hello",
    "seller_last_name": "Credable",
    "buyer_identifier": "5567104046",
    "buyer_country": "SE",
    "invoice_amount": "10000",
    "invoice_amount_currency": "SEK",
    "invoice_payment_terms": 30,
    "invoice_number": null,
    "invoice_issue_date": "2018-05-01",
    "invoice_due_date": "2018-07-01",
    "discount_code": null,
    "pending": true,
    "success": false,
    "new_user": true
}
{
    "seller_identifier": [
        {
            "message": "This field is required.",
            "code": "required"
        }
    ]
}

Body Params

seller_identifier
string
required

Unique identifier of the seller. The identifier type is dependent on the seller_country.

seller_country
string
required

Two letter country code of the seller. Currently only SE is supported.

seller_email
string
required

Email of the seller used for offering the quote.

seller_language
string

Preferred language of the seller. Determines the language used in all direct communication.

seller_first_name
string

First name of the seller used in direct communication.

seller_last_name
string

Last name of the seller. Currently unused.

buyer_identifier
string
required

Unique identifier of the buyer. The identifier type is dependent on the buyer_country.

buyer_country
string
required

Two letter country code of the buyer.

invoice_payment_terms
int32
required

Payment terms of the sellers invoice in full days. Must be between 7 and 120 days.

invoice_amount
string
required

Amount of the sellers invoice. Must be greater than 1.0. Cannot have more than 2 decimals.

invoice_amount_currency
string
required

Currency of the invoice amount. Must be one of ['DKK', 'EUR', 'GBP', 'NOK', 'SEK'].

invoice_number
string
required

The invoice number issued by the seller for this unique invoice.

invoice_issue_date
date

Date the invoice was issued.

invoice_due_date
date

Date the invoice is due.

discount_code
string

Discount code to be applied to the premium amount.

 
Suggest Edits

/quote-requests/:id

Poll for quote status

 

Header Auth

 Authentication is required for this endpoint.
gethttps://staging.credable.se/connect/v1/quote-requests/id
curl --request GET \
  --url https://staging.credable.se/connect/v1/quote-requests/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://staging.credable.se/connect/v1/quote-requests/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/connect/v1/quote-requests/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://staging.credable.se/connect/v1/quote-requests/id");

xhr.send(data);
import requests

url = "https://staging.credable.se/connect/v1/quote-requests/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "id": "qmJ53xe6pP2n6R",
    "seller_identifier": "5591293013",
    "seller_country": "SE",
    "seller_email": "hello@credable.se",
    "seller_language": "sv",
    "seller_first_name": "Hello",
    "seller_last_name": "Credable",
    "buyer_identifier": "5567104046",
    "buyer_country": "SE",
    "invoice_amount": "10001.00",
    "invoice_amount_currency": "SEK",
    "invoice_payment_terms": 11,
    "invoice_number": null,
    "invoice_issue_date": "2018-05-01",
    "invoice_due_date": "2018-07-01",
    "discount_code": null,
    "pending": false,
    "success": true,
    "new_user": false
}
{
    "message": "Not Found.",
    "code": "not_found"
}

Path Params

id
string
required

Quote Request id acquired from the POST endpoint.

 
Suggest Edits

Using the Reinsure API

Learn how to use Credable's Reinsure API to purchase spot insurance, invoice by invoice.

 

Flowchart for Reinsure API

Credable's Reinsure API is designed for partners looking to insure invoices direct with Credable. The API client is treated as the policy holder with Credable. Partners who operate an invoice financing platform, such as a factoring operation, can signup with Credable and request reinsurance per invoice.

The basic request flow is as follows:

1. Request a quote
2. Poll and review the quote status
3. Activate the cover
4. Settle or claim the cover

1. Request a quote

You can request a quote using your Reinsure API key and the /quotes/ Create Quote method that utilises standardised invoice data.

Credable current requires:

  • user reference (your internal unique reference number for your employee)
  • seller reference (your internal unique reference number for the seller company)
  • seller country
  • seller identifier (See: Seller/Buyer Identifiers)
  • buyer reference (your internal unique reference number for the buyer company)
  • buyer country
  • buyer identifier (See: Seller/Buyer Identifiers)
  • invoice reference (your internal unique reference number for the invoice)
  • invoice amount
  • invoice currency
  • invoice issue date
  • invoice due date

Rules to follow:

  • You cannot insure an invoice that is past its due date.
  • Issue date cannot be older than 15 days before the request date or more than 15 days into the future. (15+/-)
  • Due date must be in the future and no more than 180 days from issue date.

When your request is received by Credable, a response will be provided that includes an "id" field. This id value should be used to track the status of your quote request in the next steps. Your quote is currently in quote.pending status.

2. Poll and review quote status

After receiving your "id" from the initial /quotes/ method, use this id and the /quotes/:id/ method to begin polling.

Once your quote status changes to quote.offered, your premium price and actions array will be populated.

If Credable cannot provide insurance at this time your quote will be in quote.rejected status.

3. Activate the quote

Use the /quotes/:id/activate method to activate your insurance coverage. This quote is now converted into a "cover" and your insurance status is cover.activated.

If you would not like to purchase the insurance, use the /quotes/:id/reject method to reject the insurance. You can always request insurance again on this invoice so long as the timeframe matches the rules for getting a quote.

If you do nothing with this quote eventually the quote will expire. Standard expiration period is 48 hours. After this period the quote status will be quote.rejected with a reason field saying quote_expired.

4. Settle or claim the insurance

After the due date has passed, you have a period of time to make a claim. This period is determined by our contract terms. Standard claim period is currently 30 days after due date.

If you have been paid, or no longer need the insurance, use the /quotes/:id/settle method to settle your insurance. This will open up additional coverage to purchase insurance again on the same buyer, by you or other clients.

If you need to make a claim, use the /quotes/:id/claim method and your cover will get the status claim.pending. Credable will process your claim and if we can accept the claim the status will be changed to claim.approved. We will need to collect payment information to payout the claim directly to the seller unless another payment arrangement has been established.

If you do not settle or claim your insurance before the claim period ends, your insurance will automatically be settled.

Responses

Listed below are the possible responses from using the Reinsure API.

Possible links or actions for each response will show up in the arrays links[] or actions[]. Links are to be passed to the end user for viewing while actions can be executed by the client.

Status
Description
Actions / Reasons

quote.pending

Start state of a quote request.

quote.offered

Quote has been processed.

cover.activated

Normal state of a cover after a successful activation.

quote.rejected

The state of the cover if the quote was rejected.

  • insurance_unavailable
  • offer_rejected
  • quote_expired

claim.pending

The state of the cover after a claim action has been called.

claim.rejected

The state of the cover when a claim is rejected.

claim.approved

The state of the cover after a successful claim.

cover.settled

The state of the cover after the due date has passed and settled has been called.

  • invoice_paid
  • claim_period_expired
  • claim_cancelled
Suggest Edits

/quotes/

Creating a new quote for insurance.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/reinsure/v2/quotes/
curl --request POST \
  --url https://staging.credable.se/api/reinsure/v2/quotes/
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/reinsure/v2/quotes/");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": null,
  "premium_amount_currency": null,
  "status": {
    "code": "quote.pending",
    "reason": null
  },
  "actions": [],
  "links": []
}
{
  "buyer_identifier": [
    {
      "message": "This field is required.",
      "code": "required"
    }
  ]
}

Body Params

user_reference
string
required

Unique reference id for the user. Usually an internal id in your database.

seller_reference
string
required

Unique reference id for the seller. Usually an internal id in your database.

seller_identifier
string
required

Unique identifier of the seller. The identifier type used is dependent on the seller_country.

seller_country
string
required

Capitalised two letter country code of the seller.

buyer_reference
string
required

Unique reference id for the buyer. Usually an internal id in your database.

buyer_identifier
string
required

Unique identifier of the buyer. The identifier type is dependent on the buyer_country.

buyer_country
string
required

Two letter country code of the buyer.

invoice_reference
string
required

Unique identifier of the invoice specified by the platform. This is not the sellers invoice number. Usually used for internal use on the platform to uniquely identify the invoice in a platform's database.

invoice_amount
string
required

Amount of the sellers invoice. Amount of the seller's invoice. Must be greater than "1.0". Cannot have more than 2 decimals.

invoice_amount_currency
string
required

Currency of the invoice amount. 3 letter string ['DKK', 'EUR', 'GBP', 'NOK', 'SEK'].

invoice_issue_date
date
required

Date the invoice was issued.

invoice_due_date
date
required

Date the invoice is due.

 
Suggest Edits

/quotes/:id

Check the status of your quote and review possible actions.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://staging.credable.se/api/reinsure/v2/quotes/id
curl --request GET \
  --url https://staging.credable.se/api/reinsure/v2/quotes/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://staging.credable.se/api/reinsure/v2/quotes/id");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "quote.offered",
    "reason": null
  },
  "actions": [
    {
    	"type": "activate",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/activate"
    },
    {
    	"type": "reject",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/reject"
    }
  }],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": null,
  "premium_amount_currency": null,
  "status": {
    "code": "quote.rejected",
    "reason": "insurance_unavailable"
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.activated",
    "reason": null
  },
  "actions": [
    {
    	"type": "claim",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/claim"
    },
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.settled",
    "reason": "invoice_paid"
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.pending",
    "reason": null
  },
  "actions": [
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.rejected",
    "reason": null
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.approved",
    "reason": null
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Pending Status

All pending statuses are postfixed by .pending. That means the processing has not completed or it is awaiting user input, for example signing the insurance policy.

quote.pending
activation.pending
claim.pending

Automatic Rejection

After an insurance has been quote.offered the quote is valid for 24 hours. If the insurance has not be activated or rejected after this time period, Credable will automatically reject the insurance quote.

Automatic Settlement

After the claim window for an insurance has passed and the insurance is still in cover.activated the insurance will automatically be settled by Credable. The claim window is open for 30 days after the invoice_due_date.

Suggest Edits

/quotes/:id/activate

Activating an insurance quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/reinsure/v2/quotes/id/activate
curl --request POST \
  --url https://staging.credable.se/api/reinsure/v2/quotes/id/activate
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/id/activate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/id/activate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/reinsure/v2/quotes/id/activate");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/id/activate"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.activated",
    "reason": null
  },
  "actions": [
    {
    	"type": "claim",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/claim"
    },
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}

Path Params

id
string
required
 
Suggest Edits

/quotes/:id/reject

Rejecting an insurance quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/reinsure/v2/quotes/id/reject
curl --request POST \
  --url https://staging.credable.se/api/reinsure/v2/quotes/id/reject
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/id/reject' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/id/reject")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/reinsure/v2/quotes/id/reject");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/id/reject"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "quote.rejected",
    "reason": "offer_rejected"
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Possible quote.rejected reasons

  • insurance_unavailable : Credable is unable to offer insurance at this time.
  • offer_rejected : The offer was rejected by the client.
  • quote_expired : The time period to activate the quote has expired.
Suggest Edits

/quotes/:id/settle

Settling an insurance on an invoice that has been paid or when the insurance is no longer needed.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/reinsure/v2/quotes/id/settle
curl --request POST \
  --url https://staging.credable.se/api/reinsure/v2/quotes/id/settle
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/id/settle' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/id/settle")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/reinsure/v2/quotes/id/settle");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/id/settle"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.settled",
    "reason": "invoice_paid"
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Possible cover.settled reasons

  • invoice_paid : The client has settled the cover because the invoice was paid.
  • claim_cancelled : The client has cancelled the claim because the invoice was paid.
  • claim_period_expired : The time period to file a claim has expired.
Suggest Edits

/quotes/:id/claim

Make a claim on this insurance. This is for all types of claims, such as late payment or non-payment, except for bankruptcy claims. See the bankruptcy_claim method.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/reinsure/v2/quotes/id/claim
curl --request POST \
  --url https://staging.credable.se/api/reinsure/v2/quotes/id/claim
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/reinsure/v2/quotes/id/claim' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/reinsure/v2/quotes/id/claim")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/reinsure/v2/quotes/id/claim");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/reinsure/v2/quotes/id/claim"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.pending",
    "reason": null
  },
  "actions": [
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/reinsure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}

Path Params

id
string
required
 

Cancel Pending Claim

To cancel the pending claim you can call the settle action. This will settle the cover and cancel the claiming process.

Suggest Edits

Using the Insure API

Learn how to use Credable's Reinsure API to offer invoice insurance direct to your users.

 

Flowchart for Insure API

Credable's Insure API is designed for platforms who want to offer invoice insurance directly to their users. The seller client is treated as the policy holder with Credable. Partners who operate an e-invoice service or handle invoice data can integrate with Insure and allow users to purchase insurance through their platform.

The basic request flow is as follows:

1. Request a quote
2. Poll and review the quote status
3. Activate the cover
4. Settle or claim the cover

1. Request a quote

You can request a quote using your Insure API key and the /quotes/ quote request method that requires standardised invoice data.

Data required:

  • user reference (your internal unique reference number for your customer)
  • seller reference (your internal unique reference number for your customer's company)
  • seller country
  • seller identifier (See: Seller/Buyer Identifiers)
  • buyer reference (your internal unique reference number for the buyer company)
  • buyer country
  • buyer identifier (See: Seller/Buyer Identifiers)
  • invoice reference (your internal unique reference number for the invoice)
  • invoice amount
  • invoice currency
  • invoice issue date
  • invoice due date

Rules for requesting a quote

  • You cannot insure an invoice that is past its due date.
  • Issue date cannot be older than 15 days before the request date or more than 15 days into the future. (15+/-)
  • Due date must be in the future and no more than 180 days from issue date.

When your request is received by Credable, a response will be provided that includes an "id" field. This id value should be used to track the status of your quote request in the next steps. Your quote is currently in quote.pending status.

2. Poll and review quote status

After receiving your "id" from the initial /quotes/ method, use this id and the /quotes/:id/ method to begin polling.

Once your quote status changes to quote.offered, your premium price and actions array will be populated.

If Credable cannot provide insurance at this time your quote will be in quote.rejected status.

3. Activate the quote

Use the /quotes/:id/activate method to activate your insurance coverage. This quote is now converted into a "cover" and your insurance status is cover.activated.

If the user is new to Credable and has not signed our insurance policy you will be given the option to use the action /quotes/:id/sign_and_activate. A link to a policy document should be passed directly to the user for viewing our policy in a browser and signing the document. After the user successfully signs the document the insurance will then be cover.activated. This occurs only the first time they buy insurance and if Credable updates our policy.

If you would not like to purchase the insurance, use the /quotes/:id/reject method to reject the insurance. You can always request insurance again on this invoice so long as the timeframe matches the rules for getting a quote.

If you do nothing with this quote eventually the quote will expire. Standard expiration period is 48 hours. After this period the quote status will be quote.rejected with a reason field saying quote_expired.

4. Settle or claim the insurance

After the due date has passed, you have a period of time to make a claim. This period is determined by our contract terms. Standard claim period is currently 30 days after due date.

If you have been paid, or no longer need the insurance, use the /quotes/:id/settle method to settle your insurance. This will open up additional coverage to purchase insurance again on the same buyer, by you or other clients.

If you need to make a claim, use the /quotes/:id/claim method and your cover will get the status claim.pending. Credable will process your claim and if we can accept the claim the status will be changed to claim.approved. We will need to collect payment information to payout the claim directly to the seller unless another payment arrangement has been established.

If you do not settle or claim your insurance before the claim period ends, your insurance will automatically be settled.

Responses

Listed below are the possible responses from using the API.

Possible links or actions for each response will show up in the arrays links[] or actions[]. Links are to be passed to the end user for viewing while actions can be executed by the client.

For example: If you are requesting a quote and the seller has not signed a policy with Credable, only the /quotes/:id/sign-and-activate method will be shown in the links[] array. After the seller has signed the policy, only the /quotes/:id/activate method will be shown in the actions[] array and can be called to activate the insurance.

Status
Description
Actions / Reasons

quote.pending

Start state of a quote request.

activation.pending

The state of the cover after activate action has been called and the seller needs to sign the insurance policy.

cover.activated

Normal state of a cover after a successful activation.

quote.rejected

The state of the cover if the quote was rejected.

  • insurance_unavailable
  • offer_rejected
  • quote_expired

claim.pending

The state of the cover after a claim action has been called.

claim.rejected

The state of the cover when a claim is rejected.

claim.approved

The state of the cover after a successful claim.

cover.settled

The state of the cover after the due date has passed and settled has been called.

  • invoice_paid
  • claim_period_expired
  • claim_cancelled
Suggest Edits

/quotes/

Creating a new quote for insurance.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": null,
  "premium_amount_currency": null,
  "status": {
    "code": "quote.pending",
    "reason": null
  },
  "actions": [],
  "links": []
}
{
  "buyer_identifier": [
    {
      "message": "This field is required.",
      "code": "required"
    }
  ]
}

Body Params

user_reference
string
required

Unique reference id for the user. Usually an internal id in your database.

seller_reference
string
required

Unique reference id for the seller. Usually an internal id in your database.

seller_identifier
string
required

Unique identifier of the seller. The identifier type used is dependent on the seller_country.

seller_country
string
required

Capitalised two letter country code of the seller.

buyer_reference
string
required

Unique reference id for the buyer. Usually an internal id in your database.

buyer_identifier
string
required

Unique identifier of the buyer. The identifier type is dependent on the buyer_country.

buyer_country
string
required

Two letter country code of the buyer.

invoice_reference
string
required

Unique identifier of the invoice specified by the platform. This is not the sellers invoice number. Usually used for internal use on the platform to uniquely identify the invoice in a platform's database.

invoice_amount
string
required

Amount of the sellers invoice. Amount of the seller's invoice. Must be greater than "1.0". Cannot have more than 2 decimals.

invoice_amount_currency
string
required

Currency of the invoice amount. 3 letter string ['DKK', 'EUR', 'GBP', 'NOK', 'SEK'].

invoice_issue_date
date
required

Date the invoice was issued.

invoice_due_date
date
required

Date the invoice is due.

 
Suggest Edits

/quotes/:id

Check the status of your quote and review possible actions.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://staging.credable.se/api/insure/v2/quotes/id
curl --request GET \
  --url https://staging.credable.se/api/insure/v2/quotes/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://staging.credable.se/api/insure/v2/quotes/id");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "quote.offered",
    "reason": null
  },
  "actions": [
    {
    	"type": "activate",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/activate"
    },
    {
    	"type": "reject",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/reject"
    }
  }],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": null,
  "premium_amount_currency": null,
  "status": {
    "code": "quote.rejected",
    "reason": "insurance_unavailable"
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "activation.pending",
    "reason": null
  },
  "actions": [],
  "links": [
    {
      "type": "sign-policy-page",
      "method": "GET",
      "url": "https://staging.credable.se/app/sign-policy/dPn96VldVXbeRW"
    }
  ]
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.activated",
    "reason": null
  },
  "actions": [
    {
    	"type": "claim",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/claim"
    },
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.settled",
    "reason": "invoice_paid"
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.pending",
    "reason": null
  },
  "actions": [
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.rejected",
    "reason": null
  },
  "actions": [],
  "links": []
}
{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.approved",
    "reason": null
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Pending Status

All pending statuses are postfixed by .pending. That means the processing has not completed or it is awaiting user input, for example signing the insurance policy.

quote.pending
activation.pending
claim.pending

Automatic Rejection

After an insurance has been quote.offered the quote is valid for 24 hours. If the insurance has not be activated or rejected after this time period, Credable will automatically reject the insurance quote.

Automatic Settlement

After the claim window for an insurance has passed and the insurance is still in cover.activated the insurance will automatically be settled by Credable. The claim window is open for 30 days after the invoice_due_date.

Suggest Edits

/quotes/:id/activate

Activating an insurance quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/id/activate
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/id/activate
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id/activate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id/activate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/id/activate");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id/activate"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.activated",
    "reason": null
  },
  "actions": [
    {
    	"type": "claim",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/claim"
    },
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}

Path Params

id
string
required
 
Suggest Edits

/quotes/:id/sign_and_activate

Signing the insurance policy and activating an insurance quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id/sign-and-activate"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "activation.pending",
    "reason": null
  },
  "actions": [],
  "links": [
    {
      "type": "sign-policy-page",
      "method": "GET",
      "url": "https://staging.credable.se/app/sign-policy/dPn96VldVXbeRW"
    }
  ]
}

Path Params

id
string
required

Body Params

user_email
string
required

Email address of the signing user

user_first_name
string
required

First name of the signing user

user_last_name
string
required

Last name of the signing user

 

First time sellers

The links array will include a sign object with a URL leading to the Credable insurance policy. This link is only shown for first time sellers or if the Credable policy has been updated.

Suggest Edits

/quotes/:id/reject

Rejecting an insurance quote.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/id/reject
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/id/reject
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id/reject' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id/reject")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/id/reject");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id/reject"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "quote.rejected",
    "reason": "offer_rejected"
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Possible quote.rejected reasons

  • insurance_unavailable : Credable is unable to offer insurance at this time.
  • offer_rejected : The offer was rejected by the client.
  • quote_expired : The time period to activate the quote has expired.
Suggest Edits

/quotes/:id/settle

Settling an insurance on an invoice that has been paid or when the insurance is no longer needed.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/id/settle
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/id/settle
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id/settle' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id/settle")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/id/settle");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id/settle"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "cover.settled",
    "reason": "invoice_paid"
  },
  "actions": [],
  "links": []
}

Path Params

id
string
required
 

Possible cover.settled reasons

  • invoice_paid : The client has settled the cover because the invoice was paid.
  • claim_cancelled : The client has cancelled the claim because the invoice was paid.
  • claim_period_expired : The time period to file a claim has expired.
Suggest Edits

/quotes/:id/claim

Make a claim on this insurance. This is for all types of claims such as late payment, non-payment and bankruptcy claims.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://staging.credable.se/api/insure/v2/quotes/id/claim
curl --request POST \
  --url https://staging.credable.se/api/insure/v2/quotes/id/claim
var request = require("request");

var options = { method: 'POST',
  url: 'https://staging.credable.se/api/insure/v2/quotes/id/claim' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://staging.credable.se/api/insure/v2/quotes/id/claim")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://staging.credable.se/api/insure/v2/quotes/id/claim");

xhr.send(data);
import requests

url = "https://staging.credable.se/api/insure/v2/quotes/id/claim"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "dPn96VldVXbeRW",
  "user_reference": "d8f82lfli8wd",
  "seller_reference": "g7j19xz48a6dAM",
  "seller_identifier": "5567549125",
  "seller_country": "SE",
  "buyer_reference": "123kfl3kjfl23",
  "buyer_identifier": "5567104046",
  "buyer_country": "SE",
  "invoice_amount": "10010.00",
  "invoice_amount_currency": "SEK",
  "invoice_reference": "ABC123",
  "invoice_issue_date": "2018-06-20",
  "invoice_due_date": "2018-07-20",
  "premium_amount": "145.00",
  "premium_amount_currency": "SEK",
  "status": {
    "code": "claim.pending",
    "reason": null
  },
  "actions": [
    {
    	"type": "settle",
      "method": "POST",
      "url": "https://staging.credable.se/api/insure/v2/quotes/dPn96VldVXbeRW/settle"
    }
  ],
  "links": []
}

Path Params

id
string
required
 

Cancel Pending Claim

To cancel the pending claim you can call the /quotes/:id/settle action. This will settle the cover and cancel the claiming process.