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
- Use
GETon/v1/obligationsfor obligation id's you will use to validate or submit and order. - Use
POSTon/v1/orders/validateto send order parameters and determine if it would succeed. - Use
POSTon/v1/ordersto send us an order. - Use
GETon/v1/orders/<order id>to look up an order. - Use
GETon/v1/orders/<order id>/documentsto retrieve documents for an order. - Use
GETon/v1/orders/<order id>/documents/<identifier>to retrieve a specific document for an order.
Quote commercial bond
- Use
GETon/v1/obligationsfor obligation id's you will use to validate or submit and order. - Use
GETon/v1/obligations/<obligation id>to find out what optional fields are avaiable on the obligation. - Use
POSTon/v1/quotesto 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.
- Use
PATCHon/v2/orders/<order id>to send request with a JSON payload of attributes you want to change.
Issue commercial bond
- Use
POSTon/v1/orders/<order id>/issueto bind the quote and issue the bond. This only works if the order status is 'approved'. - Use
GETon/v1/orders/<order id>/documentsto retrieve documents for an order. - Use
GETon/v1/orders/<order id>/documents/<identifier>to retrieve a specific document for an order.
Cancel commercial bond
- Use
POSTon/v1/commercial_bonds/<bond number/cancelto cancel the bond.
Reinstate commercial bond
- Use
POSTon/v1/commercial_bonds/<bond number/reinstateto reinstate the bond. It will be reinstated as of the date of cancellation.
Endorse or update commercial bond
- Use
PATCHon/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
- Use
POSTv1/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 |