NAV
shell
  • Introduction
  • Work Flow
  • Authentication
  • Errors
  • API Reference
  • Introduction

    Merchants Bonding API.

    Definitions

    Term Meaning
    Obligation Identifier used to specify a specific instance of a bond. Usually tied to a particular state or bond amount.
    API key Identifier used by software during requests that identify the requestor.
    Order A collection of information used to validate information or obtain a bond.
    Quote A type of order that will be submitted for approval but requires an additional step to issue the bond.
    Correction A minor change to an existing bond or order. These updates are only available within 60 days of the submission date and only on certain fields.
    Updateable Field Fields that can be updated by the updates API.
    Correctable Field Fields that can changed by the corrections API.

    Work Flow

    The expected use of this API depends on what you are looking to do.

    Order commercial bonds

    1. Use GET on /v1/obligations for obligation id's you will use to validate or submit and order.
    2. Use POST on /v1/orders/validate to send order parameters and determine if it would succeed.
    3. Use POST on /v1/orders to send us an order.
    4. Use GET on /v1/orders/<order id> to look up an order.
    5. Use GET on /v1/orders/<order id>/documents to retrieve documents for an order.
    6. Use GET on /v1/orders/<order id>/documents/<identifier> to retrieve a specific document for an order.

    Quote commercial bond

    1. Use GET on /v1/obligations for obligation id's you will use to validate or submit and order.
    2. Use GET on /v1/obligations/<obligation id> to find out what optional fields are avaiable on the obligation.
    3. Use POST on /v1/quotes to send request for a quote on a specific obligation for an applicant. This will return an order id.

    Edit quote

    You can edit approved quotes and orders. You cannot edit an issued or fulfilled order.

    1. Use PATCH on /v2/orders/<order id> to send request with a JSON payload of attributes you want to change.

    Issue commercial bond

    1. Use POST on /v1/orders/<order id>/issue to bind the quote and issue the bond. This only works if the order status is 'approved'.
    2. Use GET on /v1/orders/<order id>/documents to retrieve documents for an order.
    3. Use GET on /v1/orders/<order id>/documents/<identifier> to retrieve a specific document for an order.

    Cancel commercial bond

    1. Use POST on /v1/commercial_bonds/<bond number/cancel to cancel the bond.

    Reinstate commercial bond

    1. Use POST on /v1/commercial_bonds/<bond number/reinstate to reinstate the bond. It will be reinstated as of the date of cancellation.

    Endorse or update commercial bond

    1. Use PATCH on /v1/commercial_bonds/<bond number> to update the bond with changes. The changes are passed in as JSON with attributes of the changed fields.

    Contract bond Work In Progress reports

    1. Use POST v1/documents/<principal or contractor name>/MM/YYYY/<type> to send WIP documents for a particular month and year.

    Authentication

    Merchants Bonding uses API keys to allow access to the API.

    Our API expects for the API key to be included in all API requests to the server in a header that looks like the following:

    API_KEY: keykeykeykey

    Your API key also controls whether you can submit work in progress updates, commercial bond information, or both.

    This is maintained by Merchants Bonding company.

    Errors

    {
      "success": false,
      "errors": {
        "field": [
          "a reason",
          "another reason"
        ],
        "another_field": [
          "a reason",
        ]
      }
    }
    

    There will be an errors key in the response, which will typically have a field or attribute name (bond_amount), with possibly multiple error messages.

    Error Code Meaning
    400 Bad Request
    401 Unauthorized
    403 Forbidden
    404 Not Found
    405 Method Not Allowed
    406 Not Acceptable
    500 Internal Server Error

    API Reference